voldemort: All content tagged as voldemort in NoSQL databases and polyglot persistence
Sounds like it is becoming a trend. So far we have:
Jeff Darcy explains why having a filesystem interface to NoSQL storage can make sense:
Voldemort is pretty easy to use, but providing a filesystem interface makes it possible for even “naive” programs that know nothing about Voldemort to access data stored there. It also provides things like directories, UNIX-style owners and groups, and byte-level access to arbitrarily large files. Lastly, it handles some common contention/consistency issues in what I hope is a useful way, instead of requiring the application to deal with those issues itself.
After spending some time in the NoSQL space you start hearing about conflict resolution, vector clocks, version vectors, etc. While some of the NoSQL projects do not need any of these either because they are not distributed or because they use a central node for coordinating writes, sooner or later you’ll probably still need to learn about them, so I thought I should put together a short list of resources that I’ve found interesting.
While you might be tempted to begin from Wikipedia, the conflict resolution entry is not the best start and I’ve found the CouchDB book ☞ conflict management chapter to offer a good enough perspective and examples.
One closely related notion to conflict resolution is vector clocks. The guys from Basho — Riak creators — have two blog posts covering different aspects of vector clocks (nb: make sure you are also reading the comment threads for both posts):
- ☞ Why vector clocks are easy: covers vector clocks from client perspective
- ☞ Why vector clocks are hard: covering them from the implementors perspective.
Last, but not least, you should also check Jeff Darcy’s post on ☞ conflict resolution:
The most important thing about both vector clocks and version vectors (henceforth “vectors” for both) is that they do not by themselves resolve conflicts. All they can do is detect conflicts, meaning updates whose order cannot be determined. The conflicting versions must all be saved until someone, at some time, looks at them and determines how to resolve the conflict – i.e. turn them into a single combined version.
While you’ll probably not become an expert after reading these, you’ll definitely have an idea when people around you will discuss about conflict resolution, vector clocks in Riak, Cassandra, Project Voldemort, CouchDB or any other system.
Currently, we are using MySQL and delayed_job as a background job system, but it gets “iffy” under high load. We are looking to replace it with Redis in conjunction with Resque. [editor’s note: The creator of Resque, @defunkt, will be at POSSDEV.]
This makes a lot of sense considering Redis Queues are hot!
We are also looking at MongoDB to possibly replace MySQL. Mostly because with our level of data it is difficult to add columns and joins are getting so expensive that we are forced to denormalize in the name of performance anyway. So, we ask ourselves why are we using a relational database. MongoDB is so much easier to use.
I am not sure denormalization is a good enough reason to move from MySQL to MongoDB, so there might be probably other aspects that are not presented in the interview. Plus, it looks like scaling out MongoDB is at least as complicated as scaling MySQL.
I have personally been playing with CouchDB and see several applications for it. For example, if you need easy replication between a laptop and headquarters or between New York and London. If you do it right, you don’t need a application server, just the database. The internal architecture is amazing.
Not to mention that replication in CouchDB got even better in 0.11.
Looking to the future, projects like Cassandra and Riak have the right architecture. You can “just add nodes” without micro-managing master/slave relationships or sharding.
- Both Cassandra and Riak distributed architecture is based on the ☞ Dynamo paper, which currently seems to be the most validated approach.
- Project Voldemort is working hard to get at the same level of ease of scaling out and down. When compared with Riak, both show interesting performance (nb the benchmark is not scientific).
- Project Voldemort new release: ☞ Announcement: Project Voldemort 0.80.1 is released Options ¶
From the release notes:
- Issue 133: Support for Apache Avro as a serialization format
- Issue 223: Changed the default client to use TresholdFailureDetector
- Fixed issue 222: Revised KeyedResourcePool.close(K key) to fix leaking sockets
- Fixed issue 198: Revised ReadRepairer to use a separate copy of the vector clock, fixing a situation where NoSuchElementException would be thrown
- Miscellaneous enhancements: support for TCP keep-alives, improved read only store utilities, command line interface to AdminClient, improved load testing tools
- ☞ MongoDB 1.3.5 (1.4 rc2) Released ¶
- ☞ MultiExecCommand. Redis transactions. The mention here generated a fantastic conversation on Twitter between Salvatore Sanfilippo (@antirez), Sergio Bossa (@sbtoursit), tephan Schmidt (@codemonkeyism), Shay Banon (@kimchy) and yours truly Alex Popescu (@al3xandru) that I’ll post about later. ¶
- ☞ MoveLens Data Sets. In case you need some test data for your NoSQL project. ¶
- Kenny Gorman: ☞ Dropping ACID. Another post on MongoDB durability tradeoff (see also MongoDB and File System Durability Explained ) ¶
- ☞ Hypertable 0.9.3.0. This is the first Hypertable release covered on myNoSQL and by looking at the release notes it is either that they’ve been extremely busy or that it hasn’t been a release in a while. ¶
Project Voldemort has released version 0.80 which features among other small improvements and bug fixes two important changes:
restoring backward compatibility in the wire protocol between client and server (this incompatibility was introduced with the Voldemort release 0.60
A backwards incompatibility in the wire protocol was found between releases 0.60 to 0.70.1 and releases prior to 0.60. We chose to make 0.80 compatible with 0.57.1 and earlier versions, while introducing an incompatibility with 0.60-0.70.1. What this means is that if you’re presently running 0.60 and higher, you would need to upgrade the Voldemort jar files on all servers and clients.
- an upgrade of the BDB storage engine to the latest version (BerkleyDB-JE 4.0.92)
You can find the complete release notes ☞ here.
MongoDB 1.2.2 is mostly a bug fix release as can be seen from the ☞ announcement.
Project Voldemort 0.70
This new version of Project Voldemort is including one of the most awaited features: online rebalancing. While the ☞ official announcement makes it clear that rebalancing has been extensively tested, I couldn’t find a good description of the rebalancing algorithm.
There are other interesting features in the release that I’d like to mention:
- New failure detector merged into the main branch
- Beta mechanism for restoring all of node’s data from replicas on demand. This is an alternative to a more gradual mechanism provided by read-repair.
While version change sounded like a minor release, the latest version of Terrastore, the partitioned and elastic document database built on top of Terracotta, features quite a few interesting new things:
- New, configurable, server-to-master reconnection procedure and improved graceful shutdown procedure for server nodes.
- New socket-based internal communication layer, improving multi-node performances and lowering resource consumption.
- New transparent rerouting of client requests in case of failing nodes.
- Improved rebalancing in case of nodes leaving or failing.
I must confess that if I’d be managing Terrastore releases and knew that these features are well tested, I would definitely jumped a couple of versions!
Riak 0.7.1 seems to be mostly a bugfix release, with a pretty cryptic ☞ announcement (at least for someone not familiar with the Riak source code).