Precise scheduling with RabbitMQ

On a project recently, we needed to be able to process jobs asynchronously, but we also needed to be able to specify that they should be run at a certain point in the future. We also needed to be able to implement exponential backoff on failure. We initially tried to integrate Sidekiq, but unfortunately it…

Assuming there’s a user is sometimes a bad idea

Squeak has a very strong (historic) assumption that there’s a(n interactive) user interface. I stumbled across another occurrence of this assumption the other day. Let’s take a look at the problem, and how to fix it.

The great GC vs reference counting debate

I read a blog post post recently to the effect that GC is too expensive in mobile devices, Steve Jobs was right, reference counting is the way. It’s titled ‘why mobile web apps are slow’. I’m inclined to take issue with this: It’s a long since resolved dispute, and GC won. I don’t want Steve…

Delimited dynamic variables from call/cc

I’m prepared to own up to my biases. I like delimited continuations. I like zippers. I like getting halfway through my work, shelving my work for a time, and coming back to it later. We’ve seen the relationship between resumable exceptions and delimited dynamic variables before, but what about languages where you don’t have direct…

Controlling fast producers in a Rabbit-as-a-Service

Offering a RabbitMQ server on the public internet poses a few challenges. Today we’ll look at the problem of controlling fast producers.

POSIX Threads and fork(2): on not crossing the streams

You’ve maybe heard that with C and C++, it’s rarely a good idea to mix usage of the POSIX threading library, and fork(2) based concurrency. I’d heard this myself, but to be honest, I never quite understood why.

Hybrid apps

We recently developed an iPad app. It’s requirements were very simple: Essentially, the app was to be a brochure that a salesperson could use to demonstrate and talk about products with a customer. It needed to be able to display text and videos, and provide links to further online web resources and PDFs. iOS development…

Emptying the depths of your database with Sequel.

When writing tests for an application which involves a database, one of the first things you need to do is ensure sure that all of database integration tests start from a known state. Now, understandably, there are already libraries that can do this for us, such as the Database Cleaner gem. However, when we started the project,…

Breaking inter-package dependencies through Squeak’s pragma preferences

The Preferences class provides a common place for all parts of a Squeak Smalltalk image to register their switches: Which update stream do we want to follow? What colour do we want our Browsers? Do we allow assignments to block parameters? Do we allow underscores in selector names? Preferences range from low level things that…

Expanding reducers

When playing with a new bit of language, it can be helpful to restrict the problem space to an old, well understood algorithm. For me at least, learning one thing at a time is easier! For this post, It’ll be prime sieves, and I’ll be exploring clojure reducers.