Well.

I knew I was trying to jump over my head, so it's not entirely unexpected.

without having a very clear, real scenario that must be addressed you have started on the slippery slope of either featuritise or futuritise; and that is the very opposite of KISS
I've read so much about featureism, and now I fall prey to it myself. It must be easier when one is both the developer and one's own customer and, also, when one is too enthusiastic about the project. Having admitted that I must also say that it is possible for syncing between owner's devices to be not enough; i.e. I've been myself in a situation when one of my devices had received a message, then went offline, then I was using another device and had no other way to read the message but to ask the sender (who was online for the whole time) to send it again (except the protocol did not offer any way to sync messages, so I had lost from the beginning). This is why I suggested to implement between-account sync in addition to inter-account sync.

Have you really looked at all the existing mechanisms and alternatives?
Some people solve the problem by dropping local storage and leaving everything on the one and only central server. Reliable delivery is thus reduced to secure (HTTPS) and reliable (just hit F5 and reload 2M (not counting images) of javascript web application if something happens) R/W access to the message storage. Others do deliver messages via a central server to end-user devices, but don't even try to ensure that the history is consistent between clients (except for protocol extensions for delivery confirmation messages which get lost as easily as the messages themselves and server-side history storage). I've seen a program behave as if the synchronisation happens like I want it to, but I can't know for sure if it really does and what the program does with the clear text in the meantime because the protocol is closed and the binary is obfuscated (and I don't have the right to examine it anyway: I agreed to EULA). There are also programs which manage to be P2P by some means (over-the-internet networks/NAT hole punching/pure magic) but keep the computer/account ratio strictly equal to one and don't ensure delivery anyway. This also means that the problem I want to solve is a very hard one and I shouldn't be working on it because I'm not a professional programmer. But I will keep looking.

And if that all sounds like I am trying to put you off from doing this all yourself; I kind of am.
At this point I'm rather reluctant to continue too and I'd rather stop before I embarass myself even further. One last question though: I understand that it won't be enough to achieve my original goal, but can you suggest me a book which could enlighten me on network protocols and/or data storage formats? Most programming books I stumble upon tend to describe the language itself or algorithms in general. Clearly, there must be something I'm missing: either a classic covering these topics, or a fundamental principle (like "it's impossible to describe data storage in general without accompanying algorithms").


In reply to Re^4: [OT] Merging messages between users on different machines by Anonymous Monk
in thread [OT] Merging messages between users on different machines by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.