4 ms·
I wrote my very own Firefox Sync Server, completely from scratch, based on their docs but also based on mozilla-services's Python code and some Firefox OS codeb
by piotrkubisa 7y ago
I wrote my very own Firefox Sync Server, completely from scratch, based on their docs but also based on mozilla-services's Python code and some Firefox OS codebase. I mostly used Go as a programming language and AWS Lambda/DynamoDB as a way to store and serve API endpoint.
> [...] I found the documentation to be sparse and the software ultimately non-functional.
Yes, my first take on the documentation was the same - existing but hard to understand in first proof-read. As I implementing my own sync and token server I really often I was catching myself "hey, you don't have to look into Python code, they really wrote how it should work in docs", especially [0] and [1] pages. There are also few other websites owned by Mozilla, which are very outdated, so also misleading.
Ah, worth noting is about:sync extension [2] and logs stored in the profile directory, which may help you to investigate some issues that might come during development and maintenance.
> Has anyone had any positive experiences with self-hosting the Firefox Sync Server?
I am biased a bit, because I had one very negative experience related to token verification error, which costed me ~4 dollars, before I noticed and I had put service into downtime for some months.
However, I am really happy about a whole project. Operational costa are is about few cents per month. It also helped me to write some tools I use on daily basis and preserve knowledge I have learned about serverless applications on AWS.
[0]: https://mozilla-services.readthedocs.io/en/latest/storage/apis-1.5.html https://mozilla-services.readthedocs.io/en/latest/storage/ap...
[1]: https://mozilla.github.io/application-services/docs/sync/faq.html https://mozilla.github.io/application-services/docs/sync/faq...
[2]: https://github.com/mhammond/aboutsync https://github.com/mhammond/aboutsync
- drdaeman 7y agoWow. I did the same thing, except that mine was written in Python/Django (and it was a crude hack) and that I've hosted it on bare metal. I've used that for 3 years, then I've abandoned it because mainenance was a pain, and I haven't figured out (despite the code being there in the open!) how to get iOS app to log in - my JS was missing some magic call and all Firefox did show is an error message (not the served HTML page). I've commented a bit about my experiences here: https://news.ycombinator.com/item?id=18448125 https://news.ycombinator.com/item?id=18448125
- piotrkubisa 7y agoYeah, I don't complain on maintenance by now, but I anticipate it might be problematic as soon as new features comes in. I am looking forward to create a fork from their Rust[0] backend and include DynamoDB as a storage to keep compatibility with the latest version of Firefox Sync Server protocol. [0]: https://github.com/mozilla-services/syncstorage-rs https://github.com/mozilla-services/syncstorage-rs