Live data from Hacker News

Around the World with SQLite3 and Rsync

fly.io

1–10 of 28 posts

Re: Around the World with SQLite3 and Rsync

#5
This can certainly work for files, if you don’t use a CDN. But also, you can just use a CDN!

As for the database that handles your business logic … 3 minutes of googling would show that rsync is a poor (or at least a brittle) substitute for multi-master replication when it comes to database engines like InnoDB for MySQL (which is what most websites on the Internet use):

https://dba.stackexchange.com/questions/91287/is-possible-to...

However, you can consider setting up multi-master replication, or if you want your app to be portable, you can set up a replication layer in the app itself. The order of operations should only matter “per activity” (eg chatroom, document etc) and not globally.

That’s what we set up at https://qbix.com/platform — except that the instances don’t all have to be under the control of one company. It’s basically a decentralized social networking platform. Federated, like Mastodon, but far more general-purpose, so you can build any applicatiom with it

Re: Around the World with SQLite3 and Rsync

#7
post #5

This can certainly work for files, if you don’t use a CDN. But also, you can just use a CDN! As for the database that handles your business logic … 3 minutes of googling would show that rsync is a poor (or at least a brittle) substitute for multi-master replication when it comes to database engines like InnoDB for MySQL (which is what most websites on the Internet use): https://dba.stackexchange.com/questions/91287/i…

We sell live http media streaming and use sqlite3 locally to solve most of the hairy race conditions you would expect when serving files while they are simultaneously being written to. Despite our advice and common wisdom, every now and then customers complain about corrupted databases and after talks we discover they are using rsync or NFS to replicate the sqlite DB file.

So, I was very interested in this article which seemed to suggest that fly.io, somehow found a way to make this work anyhow. TL;DR — looks like the answer is: they did not.

Re: Around the World with SQLite3 and Rsync

#9
This feels like a pretty significant step down in terms of quality for technical content output from Fly.io?

To be fair, "explains a solution without explaining a problem" is one of my most common criticisms for technical content in general, but I am pretty sure this wouldn't have gotten to front page if it wasn't for fly's reputation. There's a lot of passive voice which makes it really hard to figure out who is doing what to what, and most importantly _why_?

Re: Around the World with SQLite3 and Rsync

#10

This feels like a pretty significant step down in terms of quality for technical content output from Fly.io? To be fair, "explains a solution without explaining a problem" is one of my most common criticisms for technical content in general, but I am pretty sure this wouldn't have gotten to front page if it wasn't for fly's reputation. There's a lot of passive voice which makes it really hard to figure out who is doi…

Author here, and fly.io employee. I have an app that allows dance studios to schedule "heats" for competitions. Multiple dance studios, in separate locations, use this app with separate databases. I merely blogged some techniques that I found useful for my app. Most apps won't need any of this, but in the future when somebody has a related problem, I wanted something I could point to to show some techniques that might be helpful.
Post reply on HN