With the ArangoDB Foxx Microservice Framework we’ve introduced an easy way to create a Web API right on top of the NoSQL database.
In early January Max challenged Andreas (AngularJS / NodeJS) that they could build a full-stack application within half a day.
The web application – in short – is a guessing game, in which the computer tries to guess a thing or animal you think of by asking a series of questions, for which you provide the answers. (more…)
Please note that parts of this article will not work out of the box with ArangoDB 3.0
Using ArangoDB as your main database is a good idea for various reasons. What I personally like about it is its query language AQL. I used relational databases in the past as my main database and writing statements in a language similar to SQL was a great way for me to get started with ArangoDB.
Having a HTTP based interface (like all the cool kids these days) we could build applications running solely on top of our database. That’s rather nice but then we would have to take care of all the gory details. So for our app we want at least an abstraction layer on top of the HTTP API. Better yet, something assisting us with modeling our domain logic.
This is the third and final part of Lucas blog series about building hypermedia APIs. In the previous part, we identified the needed transitions and collected some information about each of them. Begin with blog post one to get familiar with concepts on Hypermedia and JSON.
We can now describe the identified transitions using FoxxGenerator. To make the most common case simple, it defaults to the type follow. Therefore defining our four follow transitions is easy using FoxxGenerator:
Note that at this point we are just defining the transitions, we are not adding them to the statemachine we are describing with the help of FoxxGenerator. In the case of creating a book, we need to add additional information. First of, it is a connect transition. Secondly we also need to define the parameters that this transition needs:
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.
Clients normally send individual operations to ArangoDB in individual HTTP requests. This is straightforward and simple, but has the disadvantage that the network overhead can be significant if many small requests are issued in a row.
To mitigate this problem, ArangoDB 1.1 offers a batch request API that clients can use to send multiple operations in one batch to ArangoDB. This method is especially useful when the client has to send many HTTP requests with a small body/payload and the individual request results do not depend on each other.
ArangoDB 1.1 will come with a new API for batch requests. This batch request API allows clients to send multiple requests to the ArangoDB server inside one multipart HTTP request. The server will then decompose the multipart request into the individual parts and process them as if they were sent individually. The communication layer can sustain up-to 800.000 requests/second – but absolute numbers strongly depend on the number of cores, the type of the requests, network connections and other factors. More important are the relative numbers: Depending on your use-case you can reduce insert/update times by 80%.
Are you a Python expert and want to contribute to an open source project? We need your help writing an API for Python for a new nosql database!
AvocadoDB is a rather new open source project – a fancy nosql database with a couple of interesting features:
- Schema-free schemata
- Usable as application server
- Flexible data modeling (key value pairs, document store, graph database)
- Free index choice
- Configurable durability
- Support for modern storage hardware like SSD and large caches
You'll find more information on AvocadoDB here.
AvocadoDB is 100% open source using the Apache Licence 2.0.
Work in progress: general API and APIs for Ruby & PHP
Part of what we are currently doing is working on the APIs. AvocadoDB itself will provide
- a REST interface
- a query by example API
- a query language for more complex queries
Good news for the Ruby community: Thanx to @tisba, @moonbeamlabs and @a2800276, AvocadoDB will get a nice Ruby API and integration into Rails. Jan is implementing the PHP Api.
Unfortunately we are no Python experts. Therefore we need the help of the community to support Python properly. We are looking for someone willing and able to develop a Python driver for AvocadoDB. It would be awesome to provide a document object manager like mongoEngine for Django as well (we would love to hear your thoughts on this – do you suggest anything else for Python?).
We have already compiled an „over the wire spec“ which describes the REST interface (attention: it’s work in progress and a few details will change in the next days).
Sounds all interesting? Join the team!
Do you want to become part of this project? Telling us how a proper implementation for Python should look like? Implementing? Great! :-) We would love to hear from you:
email: hackers AT avocadodb.org
P.S. Are you a Java/Lua/C#/Whatever guy and would like AvocadoDB to support your language as well? YES! Ruby, Python and PHP is a good start, but we want to provide other languages as well, of course. So: Contact us as well! :-)
Get the latest tutorials,
blog posts and news:
Thanks for subscribing! Please check your email for further instructions.