2 ms·
Yes, Sync is somewhat reasonable. I've started with Accounts and immediately decided on bundling Sync into the same project because I wanted it so a single serv
by drdaeman 11y ago
Yes, Sync is somewhat reasonable. I've started with Accounts and immediately decided on bundling Sync into the same project because I wanted it so a single server would be completely self-sufficient.
The protocol is relatively well-documented when it comes to overall picture, but some nifty details are missing and have to be figured out by reading the source code and debugging. For example, usually keys and tokens in responses are hex-encoded but when issuing the token for sync server (/1.0/sync/1.5) you have to return the raw binary string. I've struggled for a good hour before I figured out why I'm getting weird tokens and authentication fails.
I believe most issues with documentation could be solved by having a full Accounts+Tokens+Sync session transcripts (annotated with internal state information and some comment about what's going on), which could both serve as a test vector and a good example of real-word use case.
My overall impression is that Mozilla Services are awfully over-engineered, though. It could've been much simpler than this if only Mozilla wouldn't invent their own unique proprietary service, but try to reuse existing solutions as much as possible. Like, say, WebDAV - it'd probably fit and Sync could require literally zero lines of new code.