About
BigRecord is an object-data mapping layer for distributed column-oriented data stores (inspired by Google’s BigTable) such as HBase and Cassandra. Adapted from ActiveRecord, BigRecord is designed to work as a drop-in for Rails applications.
Features
- Dynamic schemas
- Similar usage to Active Record
- Embedded records that store within a single table row
- Automatic versioning
- Scalability
Why would I use it?
BigTable, and by extension, BigRecord isn’t right for everyone. A great introductory article discussing this topic can be found at blog.rapleaf.com/dev/?p=26 explaining why you would or wouldn’t use BigTable. The rule of thumb, however, is that if your data model is simple or can fit into a standard RDBMS, then you probably don’t need it. Much less want it (distributed computing is by its very nature troublesome).
Beyond this though, there are two basic motivations that almost immediately demand a BigTable model database:
- Your data is highly dynamic in nature and would not fit in a schema bound model, or you cannot define a schema ahead of time.
- You know that your database will grow to tens or hundreds of gigabytes, and can’t afford big iron servers. Instead, you’d like to scale horizontally across many commodity servers.
Components
- BigRecord: The Ruby Object/Data Mapper. Inspired and architected similarly to Active Record.
- BigRecord Driver: A JRuby application that bridges Ruby and Java (through Ruby’s Drb protocol) to interact with Java-based data stores and their native APIs. Required for HBase and Cassandra. This application can be run on a separate server than your Rails application.
- JRuby 1.1.6+ is needed to run Big Record Driver.
Requirements
- BigIndex (highly recommended): Due to the nature of BigTable data stores, BigRecord by itself is somewhat more limited than Active Record. Limitations include the inability to query for data other than by row ID, indexing, searching, and dynamic finders (find_by_attribute_name). Since these data-access patterns are vital for most Rails applications to function, BigIndex was created. BigRecord+BigIndex brings the feature set more up to par with Active Record.
- HBase or Cassandra.
License
Big Record is released under the MIT license.