Skip to content

Queues are Databases?

Arnon Rotem-Gal-Oz mentions a thesis by Jim Grey in his post Queues Are Databases?. I had the opportunity to architect a large system that relied entirely on a large network of queues earlier in the year. It seemed natural to build the queue on top of a database.

Arnon is making the assumption here that the “database” is an RDBMS, which is where I think the real difference lies. Further to this he really seems to mean that the queue is in fact a single table – that seems to be the implication in the followup Queues Are Databases: Round Two. You might need to hack around with that page to see all the content because one of the adverts has gone mad and eaten it).

That is definitely wrong in my view, because of the issues in factoring objects. The underlying queue structure shouldn’t impose factoring requirements on the objects in the queue.

I used a class that multiply inherited from an axiom Item and a standard Twisted DeferredQueue. Although very simple that provides all of the primitives of a persistent queue, and very cheaply to boot.