ArangoBnB: Data Preparation Case Study

Estimated reading time: 18 minutes

This case study covers a data exploration and analysis scenario about modeling data when migrating to ArangoDB. The topics covered in this case study include:

  • Importing data into ArangoDB
  • Developing Application Requirements before modeling
  • Data Analysis and Exploration with AQL

This case study can hopefully be used as a guide as it shows step-by-step instructions and discusses the motivations in exploring and transforming data in preparation for a real-world application.
The information contained in this case study is derived from the development of the ArangoBnB project; a community project developed in JavaScript that is always open to new contributors. The project is an Airbnb clone with a Vue frontend and a React frontend being developed in parallel by the community. It is not necessary to download the project or be familiar with JavaScript for this guide. To see how we are using the data in a real-world project, check out the repository.

(more…)
More info...

ArangoDB in 10 Minutes: Node.js

Estimated reading time: 10 minutes

This is a short tutorial to get started with ArangoDB using Node.js. In less than 10 minutes you can learn how to use ArangoDB with Node. This tutorial uses a free ArangoDB Sandbox running on ArangoGraph that requires no sign up.


Let’s Get Started!

We will use the Repl live coding environment for the rest of the tutorial. This also requires no sign up and should already be ready to go. Read more

More info...

Massive Inserts into ArangoDB With NodeJS

Estimated reading time: 6 minutes

Nothing performs faster than arangoimport and arangorestore for bulk loading or massive inserts into ArangoDB. However, if you need to do additional processing on each row inserted, this blog will help with that type of functionality.

If the data source is a streaming solution (such as Kafka, Spark, Flink, etc), where there is a need to transform data before inserting into ArangoDB, this solution will provide insight into that scenario as well. Read more

More info...

ArangoJS 4 alpha available now

The first alpha of the official JavaScript driver arangojs‘ upcoming major release is now available on npm.

Version 4 streamlines the driver’s API by removing unnecessary server roundtrips to obtain references to collections and graphs that already exist:

Before:

var db = require('arangojs')();
db.collection('users')
.then(function(collection) {
 return collection.import(allTheUsers)
})
.then(function() {
 return db.collection('blogs')
})
.then(function(collection) {
 return collection.import(allTheBlogs);
})
.then(function() {
 return db.collection('articles')
})
.then(function(collection) {
 return collection.import(allTheArticles);
})
.then(handleSuccess)
.catch(handleErrors);

After:

var db = require('arangojs')();
db.collection('users').import(allTheUsers)
.then(function() {
 return db.collection('blogs').import(allTheBlogs);
})
.then(function() {
 return db.collection('articles').import(allTheArticles);
})
.then(handleSuccess)
.catch(handleErrors);

(more…)

More info...

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.

(more…)

More info...

ES6 Features TurboFan, Strong-mode and REST Parameters come with new V8 Upgrade

ArangoDB 2.6 uses V8 engine version 3.31.74.1 for running its own and all user-defined JavaScript code. In ArangoDB 2.7 (currently in development), we have upgraded V8 to version 4.3.61.

The new V8 version in ArangoDB 2.7 provides several additional ES6 Harmony features that can be used to improve JavaScript usability and code quality. This blog post showcases strong mode and rest parameters, and also shows how to activate TurboFan, V8’s new JIT compiler for JavaScript.

ArangoDB 2.7 is in development right now, but it can be tried today by compiling it from source.

(more…)

More info...

ArangoDB JavaScript Driver 3.7: Promises and Performance

ArangoJS, the official ArangoDB JavaScript client, has been updated to version 3.7.0. The new release features significant performance improvements in Node.js and io.js. The dependency on the third-party request module has been replaced with a thin wrapper around node’s own http module, bringing a 3-4x performance improvement for consecutive requests by maintaining a connection pool.

The earlier 3.5 release also added optional support for ES6 promises. While ArangoJS does not provide a promise implementation itself, all asynchronous methods now return promises in JavaScript environments that support them – whether natively (e.g. in io.js or modern browsers) or using a polyfill like es6-promise.

The latest version of ArangoJS is available on NPM and GitHub.

More info...

Agile development vs. schema enforcement – a paradox resolved

The fans of modern and agile software development usually propose to use schemaless database engines to allow for greater flexibility, in particular during the early rapid prototyping phase of IT projects. The more traditionally minded insist that having a strict schema that is enforced by the persistence layer throughout the lifetime of a project is necessary to ensure quality and security.
schema_enforcement
In this post I would like to explain briefly, why I believe that both groups are completely right and why this is not so paradoxical as it sounds at first glance. (more…)

More info...

More ES6 Features

ArangoDB 2.5 comes with an upgraded version of V8, Google’s open source JavaScript engine.

The built-in version of V8 has been upgraded from 3.29.54 to 3.31.74.1.

In addition to several already usable ES6 features (detailed in this blog, the following ES6 features are activated in ArangoDB 2.5 by default:

  • iterators and generators
  • template strings
  • enhanced object literals
  • enhanced numeric literals
  • block scoping with let and constant variables using const
  • additional String methods (such as startsWith, repeat etc.)

The above features are available in ArangoDB 2.5, and can now be used for scripting purposes in the ArangoShell and in server-side Foxx actions inside the database.

This blog post briefly explains the features provides some quick examples for using them.

Read more on Jan’s Blog

More info...

Crawling GITHUB with Promises

The new Javascript driver no longer imposes any promises implementation. It follows the standard callback pattern with a callback using err and res.

I wanted to give the new driver a try. A github crawler seemed like a good side-project, especially because the node-github driver follows the same conventions as the Javascript driver.

There are a lot of promise libraries out there. The most popular one – according to NPM – was promises. It should be possible to use any implementation. Therefore I used this one.

(more…)

More info...

Get the latest tutorials,
blog posts and news: