Getting started with Guacamole on Rails

02API, Documentation, RubyTags: ,

Please note that parts of this article will not work out of the box with ArangoDB 3.0

Using ArangoDB as your main database is a good idea for various reasons. What I personally like about it is its query language AQL. I used relational databases in the past as my main database and writing statements in a language similar to SQL was a great way for me to get started with ArangoDB.

Having a HTTP based interface (like all the cool kids these days) we could build applications running solely on top of our database. That’s rather nice but then we would have to take care of all the gory details. So for our app we want at least an abstraction layer on top of the HTTP API. Better yet, something assisting us with modeling our domain logic.

Meet Guacamole: A object-document-mapper that takes care of all the busywork and allows you to focus on your domain. More info

Guacamole released: an ODM for ArangoDB for rails

00Releases, RubyTags: ,

Rubyists, here is something for you: Dirk Breuer (@railsbros_dirk) and Lucas Dohmen (@moonbeamlabs) hav released the first version of Guacamole. The following text is taken from the Github repository:

Guacamole is an Object Document Mapper (ODM) for the multi-model NoSQL database ArangoDB. Its main goal is to support easy integration into Ruby on Rails but will likely work in other Rack-based frameworks as well. There are a couple of design goals behind Guacamole which should drive all our development effort:

  • Easy integration on the View layer (i.e. form builders)
  • Reflect the nature of NoSQL in general and ArangoDB in particular
  • Focus on long-term maintainability of your application

More info

ArangoDB at RubyConf 2013

00GeneralTags: ,

RubyConf is a yearly conference in the USA with people coming from all over the world to discuss about Ruby, Rails and related topics. Every year a different city hosts this conference – this year the conference took place in sunny Miami Beach. This year Dirk Breuer – the other main developer behind Guacamole – and I went there to learn from the speakers talking about a wide range of topics. Apart from the great talks there was a lot of opportunity to talk to Rubyists from entirely different areas like social networks or banking backend systems, the problems they face and the solutions they found for them. Of course there were a lot of people catching a sight of our ArangoDB shirts and coming towards us to ask about ArangoDB and the Ruby support. The question ranged from basic questions (“What is ArangoDB?”) to more involved questions about AQL for example. As always we were happy to answer all of them!

Main hall of RubyConf 2013

Main hall of RubyConf 2013

All videos from the conference are online now. The excellent keynote by Katie on the second day is not only interesting to Rubyists, but everyone enthusiastic about programming and especially teaching it. If you understand German and want to get more tips about which talks to watch, download episode 26 of Geekstammtisch where we discussed RubyConf.

MRuby, JIT, and ArangoDB at RuPy 2012

00API, Presentation, RubyTags: ,

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

MRuby Links

01Application Server, RubyTags:

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

Examples & Projects

FAQ

CRuby vs MRuby FAQ

02RubyTags:

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.

More info

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

00RubyTags: ,

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.
More info

Do you like ArangoDB?
icon-githubStar this project on GitHub.
close-link