This post originated from an RSS feed registered with Ruby Buzz
by Michael Granger.
Original Post: Adventures in Sequel::Model
Feed Title: devEiate
Feed URL: http://deveiate.org/feed/rss/blog
Feed Description: A blog about Ruby, codecraft, testing, linguistics, and stuff. Mostly stuff.
We recently decided to ditch ActiveRecord for our domain classes at work for Sequel. We’ve already been using Sequel for a great deal of the database work we’ve been doing lately with our usage and trending analysis tool for our NetApp GX and our render farm, and it’s really a solid piece of work that makes interacting with a database a breeze. It’s nice to be working with datasets for this kind of stuff instead of having to pull out tons of objects just to grab a sample of a single column and throw them away again. Sequel lets you use all the features of your database, but the easy stuff is just as easy.
We’ve been feeling the pain of trying to track ActiveRecord updates, and it keeps making moves further away from being a useful library in environments other than Rails. I’ve been using Sequel::Model for this site’s back end, and the ORM parts of it are just as clean and powerful as the core. We’ve already done conversions of our most-complex and most-connected classes, and we’ve spiked out all the stuff we weren’t sure of and in every case the code shrank, things got a lot less magical, and the functionality stayed the same or improved.
A salute to Jeremy Evans, Sharon Rosner, and all the other people that made Sequel so great. It’s going to be a lot of work, but I’m looking forward to it.
The last two years has given me renewed respect for PostgreSQL, too. It’s performing like a champ under a steadily-increasing load (~ 8M inserts/day), and its partitioning, tablespacing, and triggers make doing data-warehousing stuff relatively painless. It’s in big part due to the genius of our DBA that set stuff up for us initially, but it was partly his enthusiasm for it that made me motivated to dive in and start learning more.
Hopefully I can convince Mahlon to write up the work he’s been doing with partitioning and tablespaces at LAIKA.