Foxx Dependencies: Composing More Flexible Foxx Apps

Previously on the ArangoDB blog we saw how we can use the configuration field in manifest.json to make Foxx apps configurable and more re-usable. This is all well and good if we just want to pass in simple values to a Foxx app but sometimes you want to pass in entire Foxx apps. This is where dependencies come in to save the day.

Let’s say you want to use the session storage provided by the ArangoDB sessions app available on the Foxx app store using Foxx exports and imports. Because you hadn’t yet heard of configurations, you simply hard-coded the mount path of your copy of the sessions app in your code: (more…)

More info...

LoopBack Connector for ArangoDB: Seamless Integration

ArangoDB can be used as a backend data source for APIs that you compose with the popular open-source LoopBack Node.js framework.

strongloop

In a recent blog article on StrongLoop, Nicholas Duffy explains how to use his new loopback-connector-arango connector to access ArangoDB:

Getting Started with the Node.js LoopBack Connector for ArangoDB

The tutorial uses the loopback-connector-arango which is available as npm and a demo application which is available from Github. (more…)

More info...

ArangoDB JavaScript Driver 3.7: Promises & 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...

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.

wget https://raw.githubusercontent.com/ArangoDB/deployment/publish/AmazonWebServices_ArangoDB_Cluster.sh
chmod 755 AmazonWebServices_ArangoDB_Cluster.sh

(more…)

More info...

Reusable Foxx Apps with Configurations: ArangoDB Development

While the optional configuration field in Foxx manifests had experimental support all the way back to ArangoDB 2.1, the feature was previously undocumented and not well understood. The upcoming ArangoDB 2.6 release officially introduces Foxx configurations, allowing you to make your existing Foxx apps more re-usable and to make better use of third-party apps.

Let’s say your Foxx app needs an API key to make a request to a third-party service using the request module introduced in ArangoDB 2.5. (more…)

More info...

IN List Improvements: ArangoDB Query Enhancement

Another performance improvement could be accomplished in the latest devel-branch: The handling of large IN-lists. Those become much faster than in the previous releases. Large IN-lists are normally used when comparing attribute or index values against some big array of lookup values or keys provided by the application.

Read on how this improvement reduces query execution time.

More info...

Bulk Document Lookups: Efficient Data Retrieval with ArangoDB

ArangoDB 2.6 comes with a specialized API for bulk document lookups. The new API allows fetching multiple documents from the server using a single request, making bulk document retrieval more efficient than when using one request per document to fetch.

Provided the documents keys are known, all the client application needs to do is to call the collection’s lookupByKeys method:

// list of document keys
var keys = [ "foo", "bar", "baz", ...];
var results = db.test.lookupByKeys(keys);
// now all documents are contained in variable 'results'

Additionally, the server-side REST API method for bulk document lookups can be invoked directly via HTTP as follows:

curl                                                  \
  -X PUT                                              \
  http://127.0.0.1:8529/_api/simple/lookup-by-keys    \
  --data '{"collection":"test","keys":["foo","bar","baz"]}'

Jan compared the functionality with single document requests in his latest blog post.

More info...

Full-Text Index Enhancements: ArangoDB Search Optimization

This post is about improvements for the fulltext index in ArangoDB 2.6. The improvements address the problem that non-string attributes were ignored when fulltext-indexing.

Effectively this prevented string values inside arrays or objects from being indexed. Though this behavior was documented, it was limited the usefulness of the fulltext index much. Several users requested the fulltext index to be able to index arrays and object attributes, too.

Finally this has been accomplished, so the fulltext index in 2.6 supports indexing arrays and objects!

Read on in Jan’s blog post about Fulltext Index Enhancements.

More info...

String Comparison Performance: ArangoDB Query Optimization

We’ve been using Callgrind with its powerful frontend KCachegrind for quiet some time to analyse where the hot spots can be found inside of ArangoDB. One thing always accounting for a huge chunk of the resource usage was string comparison. Yes, string comparison isn’t as cheap as one may think, but its been even a bit more than one would expect. And since much of the business of a database is string comparison, its used a lot.

ArangoDB and V8 use the ICU Library for these purposes (with no alternatives on the market) – so basically we heavily rely on the performance of the ICU library. However, one line in the ICU change-log – ‘Performance: string comparisons significantly faster’ – made us listen up.

So it was a crystal clear objective to take advantage of these performance improvements. As we use the ICU bundled with V8, we had to make sure it would work smooth for it first ;-). After enrolling the upgrade, we wanted to know whether everything was working fine with valgrind etc, and get some figures how much the actual improvement is.
(more…)

More info...

ArangoDB at Strata + Hadoop World London (5-7 May)

Strata-Conference-Hadoop-World-London-2015

Max Neunhöffer from ArangoDB shows an use case for multi-model NoSQL databases on Strata + Hadoop World 2015 in London. Join his Session on 6th of May.

Multi-model databases and the art of aircraft maintenance

We describe a case study in aircraft fleet management, where we needed a database that would store data about all the different parts and subunits of an aircraft. A single aircraft already contains some 6,000,000 parts, not counting components.

The particular structure of the queries arising naturally from day-to-day processes quickly led to the insight that no single data model was sufficient to ensure satisfactory performance. Whichever data model we tried, there was always at least one important query that would either take ages to complete or be unbearably complicated, or indeed both.
(more…)

More info...

Get the latest tutorials,
blog posts and news: