Running ArangoDB on a Mac with Docker and Kitematic / Docker-Machine

When I work with ArangoDB on my Mac, I usually install ArangoDB via homebrew and do tests on the latest new developments based on the devel-branch, compiling ArangoDB right from source.

To test a feature in a special version I use docker images that need a virtual machine on MacOS. I struggled with Boot2Docker several times and recently tried Docker Machine – with the Web UI Kitematic – currently in beta.

Here’s how to start with ArangoDB and Docker Machine:

First you need to install Docker Machine as described here. In my case, the installation process detects an earlier Boot2Docker Installation and migrates it to a new Docker Machine VM. Nice.

Screen Shot 2016-01-18 at 16.34.38

During the installation process you can choose to install the Docker Machine and Kitematic (current 0.8). I installed both to have a try. After installation I chose the fancy UI stuff and opened Kitematic.

Searching for ArangoDB you get the official Docker Hub Image as the first result – and by default, the latest stable release.

Screen Shot 2016-01-15 at 16.47.17

Just one click on “create” and your ArangoDB container is up and running! (more…)

Posted in Documentation | Leave a comment

Using Multiple Indexes Per Collection

The query optimizer in ArangoDB 2.8 has been improved in terms of how it can make use of indexes. In previous versions of ArangoDB, the query optimizer could use only one index per collection used in an AQL query. When using a logical OR in a FILTER condition, the optimizer did not use any index for the collection in order to ensure the result is still correct.

This is much better in 2.8. Now the query optimizer can use multiple indexes on the same collection for FILTER conditions that are combined with a logical OR.

For all following queries, I have set up a collection named test, which has two isolated hash indexes on the attributes value1 and value2, and a skiplist index on attribute value3.

Let’s first try an AQL queries that uses a logical OR on two different attributes of the collection:


Posted in Documentation, Performance | 3 Comments

Foxx: Module resolution will change in 2.8

The implementation of the JavaScript require function will be adjusted to improve compatibility with npm modules. The current implementation in 2.7 and earlier versions of ArangoDB strictly adheres to the CommonJS module standard, which deviates from the behaviour implemented in Node and browser bundlers.

Module paths will now be resolved in the following ways:

  • relative paths (e.g. ./hello) will be resolved relative to the current file
  • absolute paths (e.g. /hello) will be resolved relative to the file system root
  • global names (e.g. hello) will be resolved by looking in the following places:
    1. In a node_modules folder in the current directory
    2. In a node_modules folder in any ancestor of the current directory
    3. In the js/node, js/server/modules or js/server/common folders of ArangoDB
    4. In the internal _modules collection
    5. In the base folder of the current Foxx service or module

Prior to 2.8 global names and absolute paths are being treated interchangeably and prioritize the service’s (or module’s) base folder, breaking compatibility with some dependencies like babel-runtime (which has both a submodule core-js as well as an npm dependency in node_modules/core-js).

Note that Foxx services generated with the web admin interface in 2.7 and earlier use global names instead of relative paths and may need to be adjusted in order to work with ArangoDB 2.8 and later. (more…)

Posted in Documentation, Foxx | 3 Comments

Running V8 isolates in a multi-threaded ArangoDB database

ArangoDB allows running user-defined JavaScript code in the database. This can be used for more complex, stored procedures-like database operations. Additionally, ArangoDB’s Foxx framework can be used to make any database functionality available via an HTTP REST API. It’s easy to build data-centric microservices with it, using the scripting functionality for tasks like access control, data validation, sanitation etc.

We often get asked how the scripting functionality is implemented under the hood. Additionally, several people have asked how ArangoDB’s JavaScript functionality relates to node.js.

This post tries to explain that in detail.


Posted in API, Architecture, C++, Documentation, nodejs | Leave a comment

Dockerizing a Bloom-based Nonces Service in 10 Minutes

In this article I want to explain how to setup a nonce-microservice using docker.

Nonce are one-time tokens that are used to ensure that an action can only be taken once. In a project, we needed to ensure that a pay button is only pressed once. Note that nonces are not used to sign requests or identify a user. This is a separate mechanism.

ArangoDB contains a nonce implementation which is a variation of Bloom-filters. It allows to store nearly unlimited nonces within a limited amount of memory. Nonce are allowed to age, that is after an hour they might expire. If there is sufficient interest, I will explain the algorithm implemented in a separate blog post.


Posted in Documentation, Foxx | Leave a comment

Create an ArangoDB cluster on Microsoft Azure

During the last weeks we’ve released our new deployment tool for cloud computing platforms with how-to’s for Google Compute Engine, Digital Ocean and Amazon Web Services support.

Today we show how to deploy an ArangoDB cluster on Azure with a single command.


To easy-deploy an ArangoDB cluster on Azure you just need to install the official azure-cli, download a single bash script and watch the tool take care of the rest for you. Your azure account needs permission for creating instances, adding ssh-keypairs and managing virtual networks.


Posted in Documentation | 2 Comments

ArangoDB 2.6 – API changes, additions and changed behavior

ArangoDB 2.6 comes with new and changed APIs as well as changed behavior regarding document keys and several graph functions.

If you use Travis-CI for your tests you can download the Travis-CI ArangoDB build here: Travis-CI/ArangoDB-2.6.0-alpha2.tar.gz

The changes so far:

APIs added

  • added batch document removal and lookup APIs:

    These APIs can be used to perform multi-document lookup and removal operations efficiently. The arguments to these APIs are the name of the collection plus the array of document keys to fetch or remove.

    The endpoints for these APIs are as follows:

    Example call to fetch documents:

    The documents will be returned in an attribute documents of the HTTP response. documents is an array containing all documents found. Only those documents that were actually found will be returned. Documents that were searched but do not exist will not be returned and do not trigger any errors. (more…)

Posted in API, Documentation, Releases | Leave a comment

Web Interface supports AQL Query Explain

For developers that use the ArangoDB shell arangosh the explain() command and its compact output format is a great resource to check AQL queries. Explain prints the original query, the generated query execution plan, the applied optimizer rules plus the list of indexes that will be used. Jan showed in a blog post how this can look like.

While preparing ArangoDB 2.6 we found some time to add this feature to the Web UI. So now you can check you AQL queries right in the Web-Interface as well. (more…)

Posted in Documentation | Leave a comment

Improved System User Authentication

ArangoDB can easily be configured to require HTTP authentication for access to the web admin frontend or the REST API. But while Basic Auth works fine for APIs, the user experience in the web admin frontend was decidedly sub-par: browsers would often persist the authentication credentials indefinitely, logging out was made difficult or impossible and switching users was hit-or-miss.

The upcoming ArangoDB 2.6 release introduces cookie-based authentication for the web admin frontend, allowing you to side-step the issue altogether by using the built-in session manager instead of the low-level HTTP API authentication. (more…)

Posted in Documentation, General | Leave a comment

Create an ArangoDB cluster on Amazon Web Services (AWS)

During the last weeks we’ve released our new deployment tool for cloud computing platforms with how-to’s for Google Compute Engine and Digital Ocean support.

Today we show how to deploy an ArangoDB cluster on Amazon Web Services with a single command.

Amazon Web Services (AWS)

To easy-deploy an ArangoDB cluster on AWS you just need to install the official awscli, download a single bash script and watch the tool take care of the rest for you. Your aws account needs permission for creating instances, adding ssh-keypairs and managing security groups.


Posted in Documentation | 1 Comment