@moonbeamlabs and I hold a workshop about ArangoDB and the Ruby driver Ashikawa, which will hopefully become one of the first DataMapper 2 NoSQL drivers. Currently, we are using the aequitas and virtus components of DataMapper 2.
Slides of the workshop can be found on slideshare:
I also gave a short talk about the possibilities of using MRuby in ArangoDB. In preparation for this talk, Achim did some experiments using JIT compilation of the RiteVM bytecode using LLVM. The results are consistent with result for other byte-compiled languages. You can expect a speed-up of 2 using LLVM. In order to gain larger improvements one needs type inference and optimizations to the method selection. Luckily within a context like ArangoDB one can expects to be dealing a lot with primitives types (floats and strings) and a fixed environment. So it seems plausible that one can eventually get near the performace of V8.
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.
- 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
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
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.
In the relational world, PL/SQL is used to store business/application logic inside the relational database. The same movement is currently happening in the NoSQL. Redis for example uses LUA script in its newest version (2.6), to allow developers to tweak Redis. There a lot of use-cases for a programming language in document-stores. Programming languages are used in various document stores like ArangoDB, CouchDB, MongoDB, or VoltDB. In my opinion in the following use-cases a suitable language like Ruby will be most handy.
Just a quick note: We are on the road… you can meet us in person at the following conferences:
I’m still investigating the possibility to use mruby as embedded language for AvocadoDB, see me last post. I managed to create an interactive shell to play with mruby. Now am trying to do some performance tests.
In my last post I investigated the possibility of using mruby as embedded language for AvocadoDB. As the first results look quite promising I decided to write a small interactive mruby shell. There is no better way to explore a new toy than to play with it.