Building a P2P Multi-Purpose Database by Benoit Chesneau

By Erlang Central | Published: September 28, 2016

Slides and more info:

Barrel ( is a modern multi-purpose database in Erlang focusing on data locality (put/match the data next to you) and P2P. Building a database in Erlang is indeed challenging. I/Os are handled differently from the other VM for example. Performance is always a trade-off versus the concurrency and the fault tolerance. On the other hand, Erlang, its vm, the OTP framework offer many competitive advantages that can help you to build a very effective database. To achieve this we created a binding of Facebook rocksdb based on dirty-nif, cowdb to have a pure erlang key/value storage ithout the limit of DETS and our own way to manage presence and claim spaces to store our data over the web.

Talk objectives:

This talk will show how we built Barrel in Erlang, using C when we needed it, which pattern we choose to achieve the read/write concurrency and how we distribute the data. It will show you also how we built a P2P protocol allowing us to distribute our data without any bottleneck.

Follow Erlang Central:

Have an Erlang Question?

Reach out to the Erlang community