home shape

ArangoDB Cookbook: Recipes for Database Optimization

It’s new – and just for you! With the new ArangoDB Cookbook we want to guide you thru various challenges that might arise in your daily business with NoSQL – and ArangoDB in particular.

You have a problem with or need an introduction to NoSQL data modeling / scaling ArangoDB / building Foxx apps / graph processing or something related to your favorite programming language? Then have a look if there’s a recipe match in the Cookbook!

Create your own recipes and help others in the ArangoDB community. We appreciate every participation that makes the cookbook a valuable source for ArangoDB users. Just write your problem description and solution in plain markdown and start a pull request on Github.

Need an example?

Lets assume you checked the foxx introduction on our website and now you want to build your own Foxx app, but you don’t know how to start.

Then there is a recipe Build my first Foxx App for you, that guides you thru the process:


(Extract:) First of all you need to create the folder structure for Foxx apps and start ArangoDB. The folder structure would look someway like this: foxx_apps/databases/_system/todos. Inside this folder you create a file called manifest.json and add the following information to that file:

{
  "name": "todos",
  "version": "0.1.0",
  "description": "My first Foxx app to save todos in ArangoDB",
  "author": "YOUR NAME",
  "license": "Apache 2 License"
}

After that you can start ArangoDB with the following command:

arangod --javascript.dev-app-path /PATH/TO/foxx_apps /PATH/TO/DB

After that you need to create the required collections. You need to create a file setup.js inside the folder scripts:

var db = require('org/arangodb').db,
  todos = applicationContext.collectionName('todos');

if (db._collection(todos) === null) {
  db._create(todos);
}

Note: This is only an extract of the solution. In the cookbook is the complete detailed description how you can build your first Foxx App.


If you have any ideas for future recipes or think that somethings mission in our documentation, do not hesitate to tell us. We are happy about any feedback from you!

Frank Celler

Frank Celler

Frank is both entrepreneur and backend developer, developing mostly memory databases for two decades. He is the CTO and co-founder of ArangoDB. Try to challenge Frank asking him questions on C, C++ and MRuby. Besides Frank organizes Cologne’s NoSQL group & is an active member of NoSQL community.

10 Comments

  1. Diego Guraieb on November 25, 2014 at 3:11 am

    great!

  2. 廖师虎 on November 25, 2014 at 9:37 am

    Good jobs, Thanks!

  3. Simran Brucherseifer on November 28, 2014 at 2:57 pm

    Really nice! Would like to see some examples of complex data modeling. Seen a few recommendations around on Github and Google Groups, would be great to have them in a central place as a recipe.

    • Thomas Schmidts on November 28, 2014 at 4:52 pm

      Thank you.
      We are trying to add as many recipes as we can. If you want to, you can add yourself some recipes or give us a hint which recommendations you saw

  4. Neil Stoker on September 25, 2015 at 5:04 pm

    The Cookbook link on your site says it’s not found – has it moved somewhere new? (if so, where? 🙂

    • jsteemann on September 25, 2015 at 5:29 pm

      We are having hardware problems on the server that runs http://www.arangodb.com since this morning. We have moved parts of the site to another server already, but a few things – among them the cookbook – are known to not work yet. We’re working on this as I type this, but it may still take a while until everything is back online.
      Sorry for the trouble!

      • jsteemann on September 25, 2015 at 6:15 pm

        The cookbook is back online now. If it’s still not accessible from your end, then it’s probably due to an outdated DNS cache. If so, the problem should go away automatically after a few hours when DNS updates get propagated.

      • jsteemann on September 25, 2015 at 6:15 pm

        The cookbook is back online now. If it’s still not accessible from your end, then it’s probably due to an outdated DNS cache. If so, the problem should go away automatically after a few hours when DNS updates get propagated.

Leave a Comment





Get the latest tutorials, blog posts and news: