froscon2010 - PREVIEW

Free and Open Source Software Conference

Jan Krutisch
Tag Day 2 - 2010-08-22
Raum HS4
Beginn 14:00
Dauer 01:00
ID 600
Veranstaltungstyp Vortrag
Track Web
Sprache der Veranstaltung englisch

MongoDB on Rails

Using MongoDB in your Rails and Ruby projects

MongoDB, an Open Source Document Database from 10gen is, from all NoSQL databases, probably the closest in concepts and usage to SQL databases. Still, the Document oriented approach has quite some appeal to web developers and also MongoDB promises to scale a lot better than your average SQL database. Ruby bindings and Rails integration libraries are currently maturing and there are quite a few people using this combination in production. This talk will gloss over the general concepts behind MongoDB usage and then show the various ways of using it in your Ruby and Rails Projects.

MongoDB is a Document Database, which means that it stores schemaless, but rich structured content. I contrast to other Databases like CouchDB or Riak, it tries not to deviate too far from it's SQL ancestors like MySQL and offers a query language that while syntactically completely different from SQL, allows for similar queries on the stored data.

MongoDB has language bindings available for many languages already, with Ruby being one of the best supported lanugages. Also, on top of the core ruby drivers, there are a few projects that implement so-called Object-Document-Mappers (ODM) which have an interface similar to Rails' ActiveRecord ORM.

The talk will summarize the basic usage and operation of MongoDB and will then dive deeper into the Ruby driver and ODM functionality with a complete code example on how to convert a "traditional" MySQL based Rails app into a MongoDB based app. The talk will close with a personal record of the speakers' experience using MongoDB on a production deployed app.