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!
10 Comments
Leave a Comment
Get the latest tutorials, blog posts and news:
great!
Good jobs, Thanks!
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.
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
Started a discussion over at your Google group: https://groups.google.com/d/topic/arangodb/8CHTdnb-1P4/discussion
We’ve seen it, thanks.
We will look at it as soon as possible 🙂
The Cookbook link on your site says it’s not found – has it moved somewhere new? (if so, where? 🙂
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!
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.
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.