AsyncRecord: Non-blocking database access for Ruby

Two weeks ago I developed my first event-driven web framework for Ruby, Fastr. It helped me understand why running a web framework in an event loop is so natural. As I continued to tackle more features in Fastr, it was time to tackle persistence – notably, database access. AsyncRecord is/will be an ORM, similar to ActiveRecord – with one major difference – it doesn’t block. AsyncRecord currently uses em-mysql to access a MySQL database....

June 21, 2010 · Chris Moos

Fastr - A Web Framework for Ruby

Foreword Every month I go on a binge and learn something new. The most recent binge resulted in a new web framework, called fastr. I’ve always used Rails when I needed to create a web application in Ruby, but despite how great it is to code in, the performance and concurrency is not up to par. Don’t get me wrong – Rails can scale, but it is not inherently very good when it comes to an individual instance’s performance....

June 8, 2010 · Chris Moos

MoosTrax Ruby Library

You can now access MoosTrax with Ruby. Install the gem $ wget http://www.moostrax.com/static/MoosTrax-0.1.gem $ sudo gem install MoosTrax-0.1.gem Try out this demo script make sure to fill your API_KEY in. require 'rubygems' require 'moostrax' require 'time' def get_local_date(date_str) Time.parse(date_str + ' UTC').getlocal.asctime end mt = MoosTrax.new('API_KEY') begin devices = mt.devices devices.each do |device| info = mt.device_info(device) puts "Device ID: #{info['device_id']}\n" puts "Device Name: #{info['device_name']}\n" puts "Last Contact: #{get_local_date(info['last_contact'])}\n" puts "Date Added: #{get_local_date(info['date_added'])}\n" location = mt....

February 23, 2009 · Chris Moos