Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Hi, I am TamTam. (and some Japanese jokes).
今回は AvocadoDB というものを紹介したいと思います。
Today, I want to introduce AvocadoDB. Let me know if you find anything I misunderstood.
一言でいうと、MongoDB と OrientDB を足したようなものです。Webサイトに掲載されている特徴を列挙すると以下のようになります。
In one word, AvocadoDB looks like the combination of MongoDB and OrientDB. Here are the features list on their web site.
JavaScriptエンジン(V8)を内蔵していて、それでデータを操作できます(もっと言えば、自分でJS追加すると機能を拡張できる!! のでKTのLuaバインディングっぽい事がもっと簡単にできます)
オープンソースです(Apache Licence 2.0)
- Schema-free schemata let you combine the space efficiency of MySQL with the performance power of NoSQL
- Use AvocadoDB as an application server and fuse your application and database together for maximal throughput
- JavaScript for all: no language zoo, use just one language from your browser to your back-end (NOTE: a bit like Kyoto Cabinet's Lua binding).
- AvocadoDB is multi-threaded – exploit the power of all your cores
- Flexible data modeling: model your data as combination of key-value pairs, documents or graphs – perfect for social relations (NOTE: You can not use GraphDB via REST interface, but you can access via JS).
- Free index choice: use the correct index for your problem, be it a skip list or a n-gram search (NOTE: Maybe HashIndex and GeoIndex will be implemented in future?)
- Configurable durability: let the application decide if it needs more durability or more performance
- No-nonsense storage: AvocadoDB uses of all the power of modern storage hardware (NOTE: What does this mean? Optimised for SSD? Need more explanation), like SSD and large caches
- It is open source (Apache Licence 2.0)
※MVCCについて、Frank Celler(@fceller) さんからコメントがあったので記載しておきます。
* Response from Frank Celler(@fceller)
@fceller said:
currently we have implemented Multi-Versions (aka Revisions) of documents. CC will come, when we have replication.
ちょっと英語とMVCCについての理解が浅いので勉強してくる(( T_T)
(NOTE: I don't know much about MVCC, so I need to study more)
AvocadoDB の何が熱いかと言うと、開発者のレスポンスの早さと開発速度がちょっとクレイジーなくらいはやいところ。今だとAvocadoDBについてTweetすれば関係者がレスポンスくれます。日本語でもだいたい反応してくれます。(というか、TwitterをAvocadoDBで検索すると、開発者か日本人しかつぶやいていません・・)
あと、絶賛開発中なのにドキュメントが綺麗・豊富に揃っています。なので、Wiki を見ればだいたいの事は載っています。(目次からたどれないページがいくつかあるように感じるので、ページ一覧から行く方が早いです)
What's great about AvocadoDB is the development speed of the project and super quick response from the author. If you tweet something about AvocadoDB even in Japanese, the author responds back (To be honest, majority of tweets about AvocadoDB are either done by the author or Japanse).
Also, there are plenty of documents, so you can find most of stuff at their wiki page (There are few broken links in their index, so better to browse from their page lists).
The code is written in standard C++(Some are written in C), so easy to read their source code. There are also enough comments on source code. In terms of their REST implementatgion, the only core part is written in C++ and the rest are implemented in JS and these JS are calling these core functionality .
Here is one example which shows how passionate the author is. When someone tweets, then the author replies back with video!!
In terms of language binding, there is php binding provided officially, and other third party people are developing for other language bindings (for some reason, they are all Japanese). The current state is in their roadmap page.
BTW, I am in the middle of craeting Java Driver.
進捗としては、DocumentDBとして使えるところまでは出来ています。今ユニットテストをいっぱい書いてます・・。じゃないとサーバの挙動が変わった時にregression testが出来なくて死ぬので。
概要だけ書いておくと、AvocadoClient, AvocadoDriver, AvocadoJDBCDriverという構成になります。AvocadoClientはオブジェクト指向的に扱うためのインターフェースでDocumentクラスがcreateとかを持つようになります。AvocadoDriverはREST-APIとほぼ1:1に対応した低レイヤーのインターフェースになります。AvocadoJDBCDriverはJDBCドライバとして実装しているものになります。今作っているのはAvocadoDriverです。Client/Driverと分けたのは、CommonsHttpClient4やsvnkitのような感じの低レイヤーのものと高レイヤーのものとで分離したかったからです。
With my driver, you can use AvocadoDB as a documentDB. I am currently working on writing lots of unit tests, otherwise I will be in trouble when server specification changes.
The driver consists of 3 layers, AvocadoClient, AvocadoDriver, AvocadoJDBCDriver. AvocadoClient is an interface to use AvocadoDB in OO like where Document class has a constructor. AvocadoDriver maps one to one with their REST-API. AvocadoJDBCDriver is implemented as JDBC driver. I am currently working on AvocadoDriver. I seperated Client and Driver into different layers, because I wanted to seperate low level layer and higher level layer like CommonsHttpClient4 abd svnkit do.
Here is the Gist with simple example (It may be a bit difficult to read because it clutters with some verification code, but I think usage is quite simple).
I haven't pushed this to github, so bear with me for a moment.
I will write about installation , basic usage, and explanation of glossary in seperate article.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment