logoalt Hacker News

peter_d_sherman • today at 1:28 AM • 0 replies • view on HN

>The real complexity is keeping that storage in sync when the server itself is distributed. In core PostgreSQL there’s a shared memory buffer pool. It’s accessed and serialized by all readers and writers. Offloading the physical writes is the easy part.

An excellent point!

Yes, there is the distributed aspect to things, and yes, keeping storage in sync if the server itself is distributed would be the greater complexity!

(Random observation: There's a distinct difference here between databases with distributed servers here along the lines of "is a given distributed server going instance going to be used read only or must it also write? I.e., Read-Only distributed server instances, vs. Read-Write. If each instance has to be both, then yes, that's a lot of additional complexity! Another observation: If we permit write only instances, then write transactions are typically of two types: 1) Must lock all relevant records during update from all other writers (i.e. bank or financial transactions) and 2) Timestamped, locking unneeded, eventually consistent across all nodes (i.e., posts, status updates, likes, etc.)... if any instance has to do all of that (read and write) across the data shared by all nodes, then yes, that's quite complex! (Also, you haven't told me if instances are permitted to communicate to one another directly, or if all of their communication must be block-based, i.e., from the back-end, because then it needs to be determined how the communication for updates propagates! i.e., are multiple back-end blocks re-read at a specific interval?) etc., etc.)

But yes, completely agreed!

Related:

CAP theorem:

https://en.wikipedia.org/wiki/CAP_theorem

Errors in Database Systems, Eventual Consistency, and the CAP Theorem (Michael Stonebraker):

https://dsf.berkeley.edu/cs286/papers/errors-cacmblog2010.pd...

Byzantine fault:

https://en.wikipedia.org/wiki/Byzantine_fault

GitHub: Awesome distributed databases:

https://github.com/awelist/awesome-distributed-databases

GitHub: Awesome distributed systems:

https://github.com/FedericoPonzi/awesome-distributed-systems