Arango Weekly 24: Alpha Release 2.6, Diff Documents with AQL

Last week we’ve released ArangoDB 2.6 alpha! We would be happy if you could test the new version and give us some feedback. For all the great developers who make drivers and tools for ArangoDB we made a list of important changes in the API. With ArangoDB 2.6 you also can generate your API documentation with Swagger 2. Stay tuned, follow @arangodb for more news and have fun with the new release.

(more…)

Foxx Swagger Integration: Streamline API Documentation

The generated API documentation in ArangoDB 2.6 has been updated to Swagger 2. To see the API documentation for any of your Foxx apps, open the web admin frontend and select your app from the Applications tab. For information on how to describe your own APIs in the generated documentation, see the ArangoDB documentation.

But wait, there’s more! In addition to being shown in the web admin frontend, ArangoDB 2.6 allows you to mount your app’s documentation inside the app itself. Using the new controller method apiDocumentation you can define a mount point for the app’s own documentation and apply the same access controls you already use for other routes. Depending on your needs, you can even mount the documentation of other apps in your own Foxx app, use different assets or even your own Swagger API description files. In fact, the new API documentation viewer of the web admin frontend itself is using it.

For more information on the apiDocumentation method, see the documentation. If you want to give the feature a try yourself, check out ArangoDB 3.0 or compile the latest development version from the GitHub repository.

Diffing Two Documents in AQL: ArangoDB Data Comparison

I just stumbled upon a comment in the ArangoDB blog asking how to create a diff of two documents with AQL.

Though there is no built-in AQL function to diff two documents, it is easily possible to build your own like in the following query.

Read more on how to diff two documents in AQL.

ArangoDB 2.6 API Changes: Updates & Enhancements

ArangoDB 2.6 comes with new and changed APIs as well as changed behavior regarding document keys and several graph functions.

If you use Travis-CI for your tests you can download the Travis-CI ArangoDB build here: Travis-CI/ArangoDB-2.6.0-alpha2.tar.gz

The changes so far:

APIs added

  • added batch document removal and lookup APIs:

    These APIs can be used to perform multi-document lookup and removal operations efficiently. The arguments to these APIs are the name of the collection plus the array of document keys to fetch or remove.

    The endpoints for these APIs are as follows:

    PUT /_api/simple/lookup-by-keys
    PUT /_api/simple/remove-by-keys
    

    Example call to fetch documents:

    curl -X PUT \ http://127.0.0.1:8529/\_db/\_system/_api/simple/lookup-by-keys \ --data '{"collection":"myCollection","keys":["test1","test3"]}'
    

    The documents will be returned in an attribute documents of the HTTP response. documents is an array containing all documents found. Only those documents that were actually found will be returned. Documents that were searched but do not exist will not be returned and do not trigger any errors. (more…)

ArangoDB 2.6 Alpha2: Testing New Features & Performance

Our next major release ArangoDB 2.6 is on the finishing straight with an early alpha2 version for Linux released today.

UPDATE: New alpha3 release available.

We put great efforts in speeding-up core ArangoDB functionality to make AQL queries perform much better than in earlier versions of ArangoDB.

The queries that improved most in 2.6 over 2.5 include:

  • FILTER conditions: simple FILTER conditions we’ve tested are 3 to 5 times faster
  • simple joins using the primary index (_key attribute), hash index or skiplist index are 2 to 3.5 times faster
  • sorting on a string attribute is 2.5 to 3 times faster
  • extracting the _key or other top-level attributes from documents is 4 to 5 times faster
  • COLLECT statements: simple COLLECT statements we’ve tested are 7 to 15 times faster

Arango Weekly 23: New Release 2.5.4 & Technical Preview 2.6

In the last days we prepared everything for the first technical preview of ArangoDB 2.6, testing new and improved functionality and adding some small last minute features like the AQL explain command in the Web UI. We are proud of the new release and can’t wait to give it in your hands. Stay tuned, follow @arangodb to get the news first

Meanwhile last week we published a 2.5.4 maintenance release and provide a short glimpse on added features like Foxx dependencies for more composable Foxx Apps and Improved System User Authentication.

(more…)

AQL Explain Web Interface: ArangoDB Query Optimization

For developers that use the ArangoDB shell arangosh the explain() command and its compact output format is a great resource to check AQL queries. Explain prints the original query, the generated query execution plan, the applied optimizer rules plus the list of indexes that will be used. Jan showed in a blog post how this can look like.

While preparing ArangoDB 2.6 we found some time to add this feature to the Web UI. So now you can check you AQL queries right in the Web-Interface as well. (more…)

Improved System User Authentication: ArangoDB Security Upgrade

ArangoDB can easily be configured to require HTTP authentication for access to the web admin frontend or the REST API. But while Basic Auth works fine for APIs, the user experience in the web admin frontend was decidedly sub-par: browsers would often persist the authentication credentials indefinitely, logging out was made difficult or impossible and switching users was hit-or-miss.

The upcoming ArangoDB 2.6 release introduces cookie-based authentication for the web admin frontend, allowing you to side-step the issue altogether by using the built-in session manager instead of the low-level HTTP API authentication. (more…)

ArangoDB 2.5.4 Release: Improved Features & Stability

This version is deprecated. Download the new version of ArangoDB

ArangoDB 2.5.4 – a maintenance release for the 2.5 branch is available from arangodb.com/download now.

This release fixes some cluster issues, fixes recursive copy under windows and adds a new startup option --log.performance: specifying this option at startup will log performance-related info messages, mainly timings via the regular logging mechanisms.

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…)

Get the latest tutorials, blog posts and news: