ruby

EventMachine

Ruby’s EventMachine – Part 3 : Thin

As mentioned in part 1 and part 2 of this series on Ruby's EventMachine, Thin is where most folks encounter EventMachine for the first time, even if they do not realize it. EventMachine is at the core of Thin and allows for the high concurrency that Thin provides to your Rails application. In this post I will look at Thin's usage of EventMachine.

Read
FluidFeatures

A/B Testing in Ruby On Rails

In this post I am going to demonstrate, step-by-step, a way to A/B test new features from within Ruby-On-Rails using FluidFeatures. FluidFeatures is currently in closed-beta and requires request for inclusion in the beta program. We are looking for enthusiastic A/B testers, so we can get feedback on the service before releasing it to the masses.

Read
EventMachine

Ruby’s EventMachine – Part 2 : Asynchronous != Faster

In this post I will look synchronous vs asynchronous programming with Ruby's EventMachine, to show that asynchronous does not always mean that your code will run faster. In part 1 of this series on Ruby's EventMachine I discussed the benefits of event-based programming in general. I am a big fan of event-based programming, as you will see in these posts, but I wanted to flip the coin over and look at one of the down-sides of event-based programming.

Read
EventMachine

Ruby’s EventMachine – Part 1 : Event-based Programming

In this first post, of a series on Ruby's EventMachine, I will introduce EventMachine and explain why event-based programming is good for your wallet. EventMachine, which just turned 1.0.0 this week, is more than just a gem, it is a new paradigm for many Ruby programmers and is not always easy to just drop into your existing stack. As the name suggests, it gives you event-based programming.

Read
FluidFeatures

Fluid Feature Rollout For Ruby On Rails

In this blog post I am going to introduce a new service for Ruby On Rails developers called FluidFeatures that helps you manage rolling out new features to your site and provides a way to easily do A/B testing (competing versions of a feature) right in the belly of your code.

Read
Ruby

Ruby exit, exit!, SystemExit and at_exit blunder

Recently, we hit a problem with Ruby's exit command. If something went horribly wrong and it made no sense for our application to continue in its current state then we would abort with exit 1. We use supervisord to manage processes, so in this case when we exited with exit status of 1, supervisord would assume something went wrong and restart the process for us. Or at least that is what we thought...

Read
Ruby

Colorful Ruby Code In HTML Using CodeRay

In this blog post I will demonstrate a quick and easy way I have found to syntax highlight your Ruby code in pretty colors for your blog posts or other HTML-based display purposes. Please note, this blog post is designed for use with color monitors only, obviously. The focus of this post is Ruby, but this method also applies for syntax highlighting C, C++, Python, CSS, Clojure, diff, Groovy, HAML, ERB, Java, JavaScript, PHP, SQL, XML and YAML.

Read
Infrastrucutre

Deploy The Tornado Chat Demo On The Stackato PaaS Sandbox

In this blog post I'll go through an example, in repeatable steps, of how to get up and running with the Tornado chat demo on ActiveState's public sandbox for Stackato. ActiveState's Stackato PaaS (Platform-as-a-Service) is based on VMware's open-source PaaS, Cloud Foundry, and offers an enterprise PaaS solution that will run on any public cloud, private cloud, laptop or desktop.

Read
Geospatial

Geohash Intro

Geohashing is a simple way to encode latitude and longitude and grouping nearby points on the globe with varying resolutions. It was created by Gustavo Niemeyer. This blog post looks at how it's implemented any why it is such an elegant solution for encoding and managing location-based data.

Read
DevOps

Rollout, Degrade, Metrics and Capacity

Last week I attended a presentation by James Golick, CTO of fetlife.com. Intriguingly advertised as Scaling a Website to 300 Million Page Views Per Month with

Read
DevOps

Run The Latest Whirr And Deploy HBase In Minutes

In a few of my recent posts I have covered the ease of deploying clusters of Hadoop and Cassandra using Whirr. With Whirr you can simply write a

Read
Ruby

Zero-Copy. Transfer Data Faster In Ruby

In this post I will explain the concept behind zero-copy, which is feature of the Linux allowing for faster transfer of data between pipes, file-descriptors and sockets. I will demonstrate how you can use this functionality in your Ruby projects using a code example. This functionality has been implemented in C, Java, Ruby, Perl and nameless other languages, but in this blog I will focus on the Ruby usage.

Read
Data processing

Map-Reduce With Ruby Using Hadoop

Here I demonstrate, with repeatable steps, how to fire-up a Hadoop cluster on Amazon EC2, load data onto the HDFS (Hadoop Distributed File-System), write map-reduce scripts in Ruby and use them to run a map-reduce job on your Hadoop cluster. You will not need to ssh into the cluster, as all tasks are run from your local machine. Below I am using my MacBook Pro as my local machine, but the steps I have provided should be reproducible on other platforms running bash and Java.

Read

Homebrew For Mac | How To Install And Use Homebrew

This is demonstration of installing Homebrew, the new Mac OS X package installer. Step-by-step instructions on installing Homebrew and using the brew command.

Read
Ruby

Tools for Testing Ruby On Rails

I'm getting stuck into learning Ruby On Rails and the topic of which tools / frameworks to use for testing came up. Here's some notes. I'll be reading up on

Read