libhashring - high performance consistent hashing

In a previous post I talked about the need to shard Redis data and how I accomplished this by adding shard/hashing support to erldis, an Erlang client for Redis. This solution proved to work well, it distributed our data very well amongst many Redis servers – but there was one problem. Performance. In the change I made to erldis, the hash ring was stored in ETS (an erlang memory store) and anytime a key was hashed, the ring had to be retrieved from ETS....

June 4, 2011 · Chris Moos

Thrift and ZooKeeper

Thrift provides a great framework for developing and accessing remote services. It allows developers to create services that can be consumed by any application that is written in a language that there are Thrift bindings for (which is…just about every mainstream one, and more). This is great for systems that are heterogeneous – for example, you could write a user authentication service in Java, but call it from your Ruby web application....

May 25, 2011 · Chris Moos

Redis sharding with Erlang

I’ve been using a great Erlang Redis library erldis recently and as our data set has grown much larger, we have decided we need to start sharding. Unfortunately the erldis library does not have support for sharding so I’ve forked the repository and made the changes. You can find my fork here. Pull request here. A little background Redis has been really great for us so far but as we get more data and more operations per second, we realized we need to start utilizing multiple Redis instances....

April 10, 2011 · Chris Moos

MoosTrax for Blackberry -- Looking for testers

I am finally going to work on updating MoosTrax for BlackBerry – as there are a few outstanding bugs that need to be addressed. The most important bug I will be working on is consistency of location updates in newer, post-4.2 OS BlackBerry devices. If you are interested in helping test the upcoming version, please e-mail

August 11, 2010 · Chris Moos

MoosTrax for iPhone iOS4

I just got a new iPhone 4 with iOS4...and it supports background location updates! I've decided to bring MoosTrax back to the iPhone. I’m looking for beta testers…and then soon I’ll be pushing it to the App Store. Applying for the beta Please e-mail with your iPhone's UDID. For information on finding the UDID, go here: Screenshots

June 27, 2010 · Chris Moos

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

Unlocking the full potential of the iPhone

Since Apple launched the iPhone in 2007 there has been an unprecedented growth in the mobile phone market. From new advances in hardware, such as touch screens, to operating systems mimicking the full power of a desktop computer. Never has a smartphone been able to penetrate the demographics of 10 year olds, to teenagers, or mom and dad – until the iPhone. There are now hundreds of thousands of applications built for mobile phones, with every use case you can imagine....

April 17, 2010 · Chris Moos

Groovy scripts and JVM Security

Groovy is a very cool dynamic language for the JVM. Because it runs on the JVM, it also has the great security features as well. Let's see how we can run trusted code and allow a dynamic (possibly user defined) script to execute with limited permissions. We will also see how the script can call functions in our trusted code and how we can elevate privileges to allow the untrusted script to get access to trusted data....

March 24, 2010 · Chris Moos

Getting started with Scala using SBT

One of my biggest gripes with Java (and all the languages that run on the JVM) is getting my project setup and building it. Maven is not my favorite, and ant..well..I don't like it either. Fortunately, if you want to start a new project in Scala, there is a great build tool available that takes a lot of the pain out of project management and building - SBT, simple-build-tool. sbt is a simple build tool for Scala projects that aims to do the basics well....

February 10, 2010 · Chris Moos