ArangoDB & Symfony Integration: Part 2 | ArangoDB ’13

This is part 2 (of 4) of an introduction to the use of ArangoDB together with Symfony 2. You’ll find the links to the other parts of this tutorial at the end of this text.

You can download the completed demo at Github.

The data structure

Our app deals with movies: each movie has a title, a year of release and it is assigned to a genre. Each movie deals with none, one or many topics.

In a relational database we would probably create a table movie and another table topic and join them with a shared movie id.

ArangoDB follows like other document stores the “aggregate model” approach: In short terms this means that you should put data that is often needed together into one document. Remember: documents are a bit like rows in the relation world; in nosql world they can have a nested structure.

(more…)

More info...

ArangoDB & Symfony Integration: Part 3 Guide | ArangoDB ’13

This is part 3 (of 4) of an introduction to the use of ArangoDB together with Symfony 2. You’ll find the links to the other parts of this tutorial at the end of this text.
You can download the completed demo at Github.

Working with forms

The next example shows the use of ArangoDB with Symfony’s form component.

This is how our form will look like. The topics are represented as a text field and the user is required to separate them by commas. This delivers questionable user experience, but leads to an interesting question: how can we transform our topics array from our movie document to a text field? And: we’ll need it at least two times, both for creating and editing movies.

(more…)

More info...

ArangoDB & Symfony Integration: Part 4 Guide | ArangoDB ’13

This is part 4 (of 4) of an introduction to the use of ArangoDB together with Symfony 2. You’ll find the links to the other parts of this tutorial at the end of this text.
You can download the completed demo at Github.

Extending Arangodb\Document

The next thing we want to improve are all those noisy set calls in the controller:

// src/Triagens/ArangodbBundle/Controller/DefaultController.php
if ($form->isValid()) {
    $movie = new ArangoDocument();
    $movie->set("title",$form->get("title")->getData());
    $movie->set("released",$form->get("released")->getData());
    $movie->set("genre",$form->get("genre")->getData());
    // and so on ... my eyes hurt!
}

(more…)

More info...

API Implementors Gathering: ArangoDB 2013

Dear API Implementors,

We want to make it simpler for you to keep up with the development of ArangoDB. We therefore created a dedicated place for all API implementors. If you are implementing a Driver, ODM or database access tool for ArangoDB, this is the right place for you. In addition to sharing information about the changing API, we want to discuss patterns and ideas with each other.

The team behind ArangoDB will announce API changes and enhancements in the issues of this project, so you have one place to get all the up to date information. Apart from that, the community is independent from the ArangoDB team.

We want to make this a central, open place for all API implementors. So if you want to be part of this group, just introduce yourself and we will add you to the list. Then just watch the Repository to get all information in your inbox.

We already have the people behind the PHP and Ruby drivers on board. We’re looking forward to discussing with you and build a multi-programming language community around ArangoDB. So join us.

More info...

CoffeeScript in ArangoDB: Feature Preview | ArangoDB 2013

In my blog post about npm packages, I tried to use underscore for ArangoDB. I found that the easiest way to archive this, is using the nodes package manager NPM. Node packages and modules follow the Common.JS specification, so they can be used by ArangoDB.

Why not try to use the package coffee-script as well? Install it using

npm install coffee-script

and that’s it. Unfortunately, CoffeeScript use a module “path”, which is not a CommonJS module. I assume that most of the functionality is part or will be part of the module “fs”. The “path.js” from node.js is simple JavaScript code with some references like

'path.exists is now called `fs.exists`'

Being brave, I simply copied the file into my module path and tried again. The next obstacle is node’s global variable “process”. Luckily, this is only used to check for Windows in the module “path”. Also ignoring the module “vm” used to execute JavaScript code, this allows one to actually load CoffeScript into ArangoDB.

arangosh> process = {};
{ }

arangosh> var cs = require("coffee-script");

arangosh> cs.compile("a = 1\nopposite = true\na = -a if opposite", {});
(function() {
  var a, opposite;

  a = 1;

  opposite = true;

  if (opposite) {
    a = -a;
  }

}).call(this);

So, I can now use CoffeeScript definition within ArangoDB. Some of the loaders must be adjusted to check for both “.js” and “.coffee” files. Afterwards it should be possible, to define an action in CoffeeScript as well as JavaScript.

More info...

ArangoDB 1.2.0 Released: What’s New? | ArangoDB 2013

We are proud to announce the release of ArangoDB 1.2.0. You can find an overview of the new features in these blog posts:

github, the binary packages from our download page. The new version has also been submitted to homebrew and Apple's AppStore.

Last Minute Remarks

We have decided to switch the statistics functions off, by default.
You can switch them on by changing the config file. The current statistics functions are now obsolescent. We want to switch to a more flexible and less time consuming implementation in 1.3.

More info...

Using NPM Packages for ArangoDB: Enhance Functionality | 2013

ArangoDB follows the Common.JS specification for modules. However, it would be very convenient, if there was an easy way to install a package like “underscore.js”. These package are, for instance, available using NPM. There is a draft for packages on Common.JS which seems to be compatible with NPM.

NPM has a neat way of dealing with version conflicts. Basically, it allows multiple versions to exists simultaneously. For example, assume you have 4 packages A, B, C, D. A requires B and C and D, B requires C. Then directory layout might be as follows.

node_modules
|
+- A
|  |
|  +- node_modules
|     |
|     +- B
|     |  |
|     |  +- node_modules
|     |     |
|     |     +- C (1.0.0)
|     |
|     +- C (2.0.0)
|
+- D

Package B will see package C in version 1.0.0, while package A sees package C in version 2.0.0.

                                                                                                                                    <!--more-->

This behaviour is easy to implement in ArangoDB. In addition to “Module” there is now a “Package”. Each package has it own module cache. When a package requires a module, the package hierarchy is traversed from the current package to the root (or global) package, until the module is found.

In order to use underscore, switch into the package directory and use NPM to install it

unix> cd /tmp/packages
unix> npm install underscore
npm http GET https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/underscore
underscore@1.4.4 node_modules/underscore

Now start arangosh with the new “–javascript.package-path” option and enjoy underscore.

unix> arangosh --javascript.package-path /tmp/packages
arangosh> var _ = require("underscore");
arangosh> _.max([1,2,3])
3
More info...

ArangoDB 1.2: Simplifications Overview | ArangoDB 2013

The upcoming 1.2 version of ArangoDB will provide several improvements and fixes.
Apart from the additional features the new version provides, the following changes might also be very interesting for users and driver maintainers:
(more…)

More info...

ArangoDB 1.2: Explore New Features | ArangoDB 2013

We have just released beta2 of ArangoDB 1.2. It is available for download here.
For everyone interested in trying the new version, here’s a quick overview of its major new features & changes:
(more…)

More info...

ArangoDB 1.2 API Changes: What You Need to Know | 2013

Apart from introducing several new features, the upcoming 1.2 version of ArangoDB will change a few of the existing REST API return values.
The API changes were necessary to make the ArangoDB’s APIs easier to use, more robust and portable.

We hope that the following list provides 3rd party client & driver maintainers with enough information to update drivers to work with ArangoDB 1.2.
(more…)

More info...

Get the latest tutorials,
blog posts and news: