Settings

Theme

Building a Distributed Database in Elixir (Part 2: Architecture and the Beam)

medium.com

2 points by gawry a month ago · 1 comment

Reader

gawryOP a month ago

Part 2 of documenting my distributed database project. This post covers why Elixir's BEAM VM is well-suited for building distributed databases: OTP supervision trees, native clustering, lightweight processes, and the ecosystem (libcluster, Phoenix.PubSub, etc.).

I'm building a hybrid CP/AP system - Raft consensus for metadata (schemas, ring state) while keeping data operations AP for high availability. Decided to build custom gossip for ring distribution instead of using Horde to get better metadata control and prepare for multi-AZ deployments.

Essentially rebuilding Riak Core with better metadata handling. Currently using :rpc but abstracting transport for future flexibility. May need Partisan for clusters >100 nodes but starting simple.

Happy to discuss architecture trade-offs, the hybrid consistency model, or whether rebuilding Riak Core is crazy vs. just forking it.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection