MRuby, JIT, and ArangoDB at RuPy 2012

@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: Introduction to ArangoDB Introduction to Ashikawa 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.

Posted in API, mruby, Presentation, Ruby, ruby | Leave a comment

MRuby Links

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 mruby勝手にFAQ

Posted in Application Server, mruby, Ruby | 1 Comment

CRuby vs MRuby FAQ

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 & 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.

Posted in mruby, Ruby | 2 Comments

“Use-Cases for MRuby in a Database like ArangoDB” or “Can MRuby be the next PL/SQL?”

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.

Posted in mruby | Leave a comment

HTTP Client for MRuby

As Dorthe pointed out, we are on the road for the next two weeks.

Posted in mruby, Ruby | Leave a comment

Meet us at Nosql matters, Berlin Buzzwords or EuRuKo

Just a quick note: We are on the road… you can meet us in person at the following conferences:

Posted in Community, mruby | Leave a comment

JSON Parser for MRuby or how to define classes and exceptions in C

MRuby is progressing quite rapidly, it is now possible to implement a real REPL, see github. So, it is time to continue my efforts to integrate MRuby into ArangoDB. ArangoDB currently uses JavaScript to implement transactions and enrich the database with small Actionlets, i. e. functions that take a HTTP request and produce a HTTP response. Additionally, there is a shell, which allows you to administrate the server.

Posted in mruby, Ruby | Leave a comment

Talk: Using mruby with ArangoDB (@Cologne Ruby User Group)

Frank has given a short lightning talk on using mruby in ArangoDB (at this time still called AvocadoDB) at the Cologne Ruby user group.

Posted in Application Server, mruby, Ruby | Leave a comment

Preliminary Performance Tests for mruby and V8

Note: We changed the name of the database in May 2012. AvocadoDB is now called ArangoDB 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.

Posted in mruby | 2 Comments

Towards an interactive mruby shell

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.

Posted in mruby, Ruby | 1 Comment