Getting Oriented with OrientDB
Posted by feydr | Posted in Uncategorized | Posted on 22-05-2010
View Comments
Was on the nosql mailing list the other day and I ran across a message from Cliff Moon trolling it up
“I find the name of your database to be extremely racist.”
To tell you the truth I usually am ctrl-D’ng (mutt mass deleting) all threads from this mailing list since I just do not have time to read them all. This of course caught my eye though and I’ve been waiting for a day to set aside some time to write up an article on it. So that day is today and this is that article.
These guys make a TON of claims and the description page is chockful of buzzwords describing what exactly OrientDB is. Let’s take a quick look.
Features
- Written in Java
- 40k inserts/second on commodity hardware
- Document/Graph Based DataBase
- Supports Schema-less, schema-full, schema-mixed modes
- Security Profiling for users/roles Based Access
- Supports SQL as a query language
- ACID compliant with support for transactions
- Less than 400k Footprint for Full Server (embeddable)
It is truthly very easy to get started unlike other solutions out there. It unfortuantely has a XML config file but the default one that comes with the release I downloaded (0.9.13) clocks in at only 22 lines and is fairly readable. It listens for binary connections on port 2424 by default and a built-in web interface on 2480 by default. The package I downloaded came with jars ready to go so there was no bullshit to configure or anything but if you grab sources ant should work things out for you.
Example:
svn checkout https://orient.googlecode.com/svn/trunk/ orient export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.20/ chmod a+x build.sh ./build.sh
Like any good startup script it proudly displays it’s ascii logo.
It really is quite a nice little web interface I have to admit. For those of you who have/want to care about licenses it is under the Apache 2.0 License. There are currently 12 members on it’s google groups mailing list.
Web Interface
The web interface has a RESTful interface that supports GET, PUT, POST, and DELETE operations. This is really cool because then you can do all your requests with javascript and pull down result sets with json. Being able to put this crap behind a load balancer allows you to scale like a motherfucker when it comes to reads, which is one reason why other databases that have RESTful interfaces caught on so quickly. It has a built in profiler that really rocks out and I firmly believe all software should have built in shit like this — it is just common sense for applications like this. There are tabs right next to it that show you configurations, connections and and database pools — cool stuff indeed.
The schema view is pretty cool as well as you can see all of your classes (tables) , their record count and their cluster count. Physical clusters make for fast IO, whereas logicals save space but are slower. Of course in the day and age of pocket terrabyte storage drives — who the hell needs more space? We need ram and cpu damnit!
Security
I must say that out of all the NoSQL solutions out there OrientDB really fucking shines with it’s security built-in from the get-go — almost every other system out there has added it on as an *optional* feature — as if security should ever be treated that way — it’s like modern day programmers for some reason still do not know that 14 year old kids have scripts that scan the net for open things like this — some mid-20s kids have those exact same scripts.
Apparently the underlying data structure is a “RB+Tree” which as the authors point out is a mix of Red-Black and B+ Tree algos — this they assert give you the best mix of balancing, speed, and 50% less memory usage.
All in all this is a pretty nice offering and I might need to play with again here in the future. I have a couple million xml documents I’m thinking about transforming to json. What are your thoughts on this fellow readers?


