mnesia: All content tagged as mnesia in NoSQL databases and polyglot persistence
Friday, 18 June 2010
All Erlang: Riak and Mnesia
Rusty Klophaus (@rklophaus) published a ☞ fantastic recap of the Erlang Factory London event. There were two parts that caught my attention summarizing Justin Sheehy’s presentation on Riak architecture and Ulf Wiger’s presentation on Mnesia.
Riak architecture:
There are eight distinct layers involved in reading/writing Riak data:
- The Client Application using Riak
- The client-side HTTP API or Protocol Buffers API that talks to the Riak cluster
- The server-side Riak Client containing the combined backing code for both APIs
- The Dynamo Model FSMs that interact with nodes using Dynamo style quorum behavior and conflict resolution
- Riak Core provides the fundamental distribution of the system (not covered in the talk)
- The VNode Master that runs on every physical node, and coordinates incoming interaction with individual VNodes
- Individual VNodes (Virtual Nodes) which are treated as lightweight local abstractions over K/V storage
- The swappable Storage Engine that persists data to disk
Mnesia and NoSQL
- Deployed commercially for over 10 years
- Comparable performance to current top performers clustered SQL space
- Scalable to 50 nodes
- Distributed transactions with loose time limits (in other words, appropriate for transactions across remote clusters)
- Built-in support for sharding (fragments)
- Incremental backup
The downsides are:
- Erlang only interface
- Tables limited to 2GB
- Deadlock prevention scales poorly
- Network partitions are not automatically handled, must recombine tables automatically
CouchDB, the document database built on Erlang, was also present at the event, but I couldn’t find a report about the talk or the slides.