Arangodb reaping the fruits of its multi-modal labor database field definition

Why do just one thing well when you can do three things well? That’s the philosophy behind arangodb, an open source nosql database that lets users store, query, and retrieve data using three different data models — a JSON-based document database, a key-value store, and a graph database — depending on the users’ needs.

ArangoDB emerged about seven years ago when two german engineers, claudius weinberger and frank celler, were designing databases for large public companies in the european union through their consulting company, triagens gmbh. The pair tired of compromising by using multiple databases to solve different data storage and retrieval tasks, and decided to take a new approach.Olivari says soon thereafter they laid down the first bits of code for avocadodb, which would become arangodb several years later due to a name dispute.


Fast forward to 2018, and the database (now named after a type of avocado found in central america) is starting to pick up steam. The software has been downloaded 3.5 million times, and is currently being downloaded at the rate of 170,000 per month, the company says. More than 1,000 organizations are using arangodb in production (although fewer are paying for the enterprise version), and there are more than 80 contributors to the open source project outside of arangodb.

“arangodb is a native multi-model database,” olivari tells datanami.Olivari says “what the founders decided to do is to marry JSON documents with graph and key-value in one engine with one query and one query language that allow you to use multiple data models. So you get the flexibility, in a sense, of mongodb with JSON document, with the connectedness of neo4j with the graph theory. By marrying them both, you can really address a lot of use cases.” native engines

The folks at arangodb are quick to emphasize the native aspect of the database. The product was designed to store and query data in an optimized manner for each of the three modalities — key-value, document, and graph — without compromising the capabilities that make each of those types of database good for certain use cases.JSON document

Different data models demand different databases (source: arangodb december 2016 white paper “what is a multi-model database and why use it?”)

At the core, the database stores data in velocypack (vpack), which is a “fast and compact binary format used for serialization and storage,” according to the project’s github page. ArangoDB can natively store a nested JSON object as a data entry inside a vpack collection, which the company says eliminate the need to disassemble the resulting JSON objects. Queries are written and submitted in arangodb query langauge (AQL), which resembles SQL.

“at the very heart we are a transactional document store storing a JSON document,” says jan stücke, a developer with arangodb.Data models “if we want to provide KV characteristics, then we just store a key and a value and have an index on the key. If we want to go to graph, then we’re doing two things. First we store a special attribute, which is a ‘from’ and a ‘to,’ which are pointing to other JSON documents. And then we index those other attributes in so-called hash index, and can declare it quite efficiently.”

In this manner, arangodb can quickly morph from a sleek and fast key-value store optimized for serving lots of relatively simple data, into a more complex graph database optimized for finding connections hidden in more complex data sets. Doing all three of these things in a native manner — not to mention ACID compliance for transactions and a horizontal scale-out architecture — makes arangodb somewhat unique among database management systems.JSON document

Running ecommerce websites is one use case for arangodb. Others include security, fraud detection, machine learning, product and asset catalogs, real-time analytics, customer and content management, and customer 360 initiatives. Multiple modalities

The advantages of the multi-modal approach are evident for those building ecommerce websites, olivari says. “in the single model world, you have a shopping cart on redis, your product catalog on mongodb, your recommendation engine on neo4j, and your transactions on oracle,” he says. “the downside is there are different query languages to learn, many databases to manage, complex code bases, and a lot of cost and lost productivity.Graph database

“with arangodb, you don’t really need to have one massive complex database,” olivari continues. “you can still have multiple databases if you want and expose microservices if you want. But then you can manage the key-value part for the shopping cart on arangodb. You can use the catalog using the JSON interface of arangodb. The recommendation is using graph and transactions again on arangodb.”

These three database types fit well together, and arangodb doesn’t plan on extending it dramatically, olivari says. “we cannot really support all the of data models out there,” he says. “but if you think about it, the JSON document using the graph theory — they work extremely well.Olivari says so you can say arangodb is a graph database wherever vertexes and edges [exist] in JSON documents. It’s really natural for those data models to stick together.”

You won’t see arangodb adding other data types that fit nicely with what it already has. “for example, we don’t plan to add wide column store. So we’re not saying we can add the data model used by cassandra,” olivari says. “we don’t plan to add time series. You can model it in multi-model database, but it won’t be native.” competing for advantage

The native support for key-value, document, and graph gives arrangodb an advantage over other nosql database providers who would try to bolt on graph capabilities, olivari says.Olivari says “it’s not easy to go there, because it’s an architectural advantage,” he says. “people would have to start with a native idea. Some of our competitors are trying to move to the multi-model world, but it will never be native.”

Building the architectural foundation that lets arangodb morph into different database personas gives it a performance advantage that allows it to perform as well as best-of-breed database solutions. The company recently conducted a benchmark test that showed arangodb outperformed other single-mode databases it was tested against, including mongodb, neo4j, orientdb, and postgres.

In another test, arangodb was beaten by aerospike, a SSD-optimized key-value store.Olivari says “we were expecting this,” olivari says. “if you have a very simple data model, then you can press performance as much as possible. With key-value stores, in a sense they may outperform us. But the key-value use case isn’t the one most widely used because it would be basically just using 10% of the functionality around arangodb.”

Looking forward, the arrangodb team is working on version 3.4, which will add support for geospatial data types, expanded kubernetes, and the addition of a search engine.

The addition of the search engine, which was developed at dell EMC and open sourced at the end of 2016, will greatly expand the capabilities of arangodb, stücke says.Graph database “it’s a full-fledged search and ranking engine which runs natively in arangodb,” he says. “you can also combine the results of the search engine with different data models and vice versus. We hope that the retrieval capabilities, in combination with multi-model, can make a big difference in the search market.”

banner