ArangoDB vs. CouchDB Benchmarking | ArangoDB 2012
A side-effect of measuring the impact of different journal sizes was that we generated some performance test results for CouchDB, too. They weren’t included in the previous post because it was about journal sizes in ArangoDB, but now we think it’s time to share them.
(more…)
ArangoDB 2012: Exploring Additional Datafile Sizes
A while ago we wrote some blog article that explained how ArangoDB uses disk space. That article compared the disk usage of ArangoDB, CouchDB, and MongoDB for loading some particular datasets. In this post, we’ll show in more detail the disk usage of ArangoDB for insert, update, and delete operations. We’ll also compare it to CouchDB for reference.
(more…)
ArangoDB for Node.js Integration | ArangoDB 2012
Note: Our new official nodejs driver is arangojs. You also can look at this blogpost about the new driver.
We got a note from Anders Elo from Sweden. He told us that he has released a ArangoDB client for node.js. Awesome! :-) You can find it on Github under the URL https://github.com/kaerus/arango-client. To install locally
npm install git://github.com/kaerus/arango-client
Anders also writes:
- It's still lacking features and is prone to changes but it works quite nice, atleast I think so. :) I've not documented this project as of yet due to lack of time so I'll briefly instruct you by some examples.*
var arango = require('arango.client'), util = require('util');
/* Prepare a connection, defaults {protocol:'http', hostname:'127.0.0.1', port: 8529} */
db = new arango.Connection({name:"testcollection"});
/* we need to first create our test collection */
db.collection.create(function(err,ret){
console.log("err(%s): ",err, ret);
});
/* create a new document in collection */
db.document.create({a:"test"},function(err,ret){
if(err) console.log("error(%s): ", err,ret);
else console.log(util.inspect(ret));
});
/* create a document and a new collection on demand */
db.document.create(true,"newcollection",{a:"test"},function(err,ret){
if(err) console.log("error(%s): ", err,ret);
else console.log(util.inspect(ret));
});
/* alternate style utilizing events */
db.document.list().on('result',function(result){
console.log(util.inspect(result));
}).on('error',function(error){
console.log("error(%s):", error.code, error.message);
});
The interface to the ArangoDB REST api resides in the lib/api directory. You can find out more details there. Anders also includes some tests, just runt "npm test" to execute them.
Dynamic Script Execution Performance in ArangoDB | ArangoDB 2012
In the previous post we published some performance results for ArangoDB’s HTTP and networking layer in comparison to that of some popular web servers. We did that benchmark to assess the general performance (and overhead) of the network and HTTP layer in ArangoDB.
Using ArangoDB as an application server
While HTTP is a good and (relatively) portable mechanism of shipping data between clients and servers, it is only a transport protocol. People will likely be using ArangoDB not only because it supports HTTP, but primarily because it is a database and an application server.
(more…)
Comparing Space Usage: MongoDB, CouchDB, ArangoDB Infographic
As a follow-up of Jan's blog post we have extracted some central figures and created this infographic for your reference.
ArangoDB Collection Disk Usage Analysis | ArangoDB 2012
In this post we’ll explain how ArangoDB stores collection data on disk and look at its storage space requirements, compared to other popular NoSQL databases such as CouchDB and MongoDB.
How ArangoDB allocates disk space
ArangoDB stores documents in collections. The collection data is persisted on disk so it does not get lost in case of a server restart.
(more…)
ArangoDB Networking HTTP Layer Benchmarking | ArangoDB 2012
…or: The Great Server Shootout
ArangoDB is a database server that talks HTTP with its clients: clients send HTTP requests to ArangoDB over TCP/IP, ArangoDB will process them and send back the results to the client, packaged as HTTP over TCP/IP.
ArangoDB’s communication layer is thus the foundation for almost all database operations, and it needs to be fast to not become a bottleneck, blocking further database operations.
To assess the actual performance of the communication layer, we did some benchmarks that compare ArangoDB’s network and HTTP processing capabilities with those of other popular servers.
ArangoDB is a database server and thus offers a lot more than just HTTP processing, but in this post we’ll be concentrating on just the networking/HTTP parts of the product. It is likely that we’ll publish results of further benchmarks that involve other parts of the system in the near future.
(more…)
Useful Links for MRuby Development | ArangoDB 2012
I’ve started the following collection of links, example code, projects, and articles about mruby. This list is most likely not complete, if you have other interesting articles please let me know. Especially sample code and mruby projects.
Article
- Daniel Bovensiepen, Five ways to execute mruby
- Matt Aimonette, Mruby and MobiRuby
- Matt Aimonetti, Getting Started With Mruby
- @jondot, First Look at Mruby
Examples & Projects
- Embed Ruby in Your iOS Apps Using mruby, source code mruby iOS example
- mattn, MRuby inside MySQL
- takeru, MRuby Examples
FAQ
- CRuby vs MRuby FAQ
- Mrbgems FAQ
CRuby vs. MRuby: Understanding the Differences | ArangoDB 2012
At our last Ruby user group meeting it was asked, what the differences between CRuby and MRuby are. @junjis0203 wrote a MRuby FAQ. Unfortunately, it’s in Japanese. I’ve tried to translate it using http://www.excite.co.jp/world/english/ & Google translate and added my own findings.
Not all classes and method from CRuby are available in MRuby
MRuby does not guarantee to implement the features which are defined in ISO / IEC 30170
Regular Expression
Mruby allows you to switch features on or off depending on your needs and available space. These features are defined in “include/mrbconf.h”. One of the features is regular expression support, which is switched off by default.
Elegant NoSQL Database Querying Methods | ArangoDB 2012
Having a long history with relational databases and having worked for a lot of years with SQL some people find it a bit inconvenient querying nosql databases e.g. via REST. Others have rather complex data models and need nevertheless an elegant and convenient way for querying. And we all love clean and simple interfaces.
ArangoDB comes with a couple of options for querying the data, among offer it implements the "ArangoDB Query Language" (AQL).
AQL is a declarative query language for simple and also very complex queries. Unless like in other nosql databases you can also query across collections, aggregate results, do some geo location stuff and even iterate over graphs.
So if you like the comfort of SQL but also the freedom of a schema free database, AQL is for you.
If you are interested in learning more about the concepts of ArangoDB checkout Jan's talk and slides.
But let's stop beating around the bush and rather have a look at specific examples.
Find the 5 regions in state CA with the most inhabitants:
FOR u IN users /* iterate over all documents in collection 'users' */
FILTER u.contact.address.state == "CA" /* filter on state attribute */
COLLECT region = u.contact.region INTO group /* group by region attribute */
SORT LENGTH(group) DESC /* sort by number of matches found, descending */
LIMIT 0, 5 /* get top 5 */
RETURN { "region" : region, "count" : LENGTH(group) } /* return a projection */
Find the other top 5 hobbies of male users that also like running
FOR likes IN ( /* iterate over result of subquery */
FOR u IN users /* iterate over all users */
FILTER u.gender == "male" && "running" IN u.likes /* filter on gender & likes contains "running" */
FOR value IN u.likes /* iterate over user's individual like values */
FILTER value != "running" /* filter out "running" here */
RETURN value
)
COLLECT what = likes INTO group /* group by like name */
SORT LENGTH(group) DESC /* sort by number of matches found, descending */
LIMIT 0, 5 /* get top 5 */
RETURN { "what" : what, "count" : LENGTH(group) } /* return a projection */
Find the 10 nearest larger airports around Cologne
FOR a IN NEAR(airports, 50.67, 6.9, 200, "distance") /* iterate over proximity search result */
FILTER a.type == "large_airport" /* filter on airport type */
SORT a.distance ASC /* sort by distance, ascending */
LIMIT 0, 10 /* get top 10 */
RETURN { "name" : a.name, "code" : a.iata_code, "country" : a.iso_country, "city" : a.municipality, "distance" : CONCAT(TO_STRING(CEIL(a.distance/1000)), ' km') }
Find some users with their friends.
FOR u IN users /* iterate over all users */
FILTER u.gender == "female" /* filter on gender */
FILTER u.contact.address.state == "CA" /* filter on state */
LIMIT 0, 5 /* limit the result */
FOR fr IN (FOR f IN friendships /* iterate over friends */
FILTER f.user == u._id /* of current user */
RETURN f.friends /* to get the list of friend ids */
)
LET friendnames = (
FOR f IN fr /* loop over list of friend ids */
FOR u2 IN users /* join with users collection again */
FILTER u2._id == f /* restrict on user with friend id */
RETURN u2.name /* return friend name */
)
RETURN { "user" : u.name, "friends" : friendnames } /* return some merged data */
Get the latest tutorials,
blog posts and news:
Thanks for subscribing! Please check your email for further instructions.