Facebooker Queue: Facebook API queues with Beanstalkd
May 23, 2009 - 49 Comments - ruby rails tools facebooker queue facebooker facebook
I’ve been working on a Rails-based Facebook app using the excellent Facebooker library, and the need became apparent for a background queueing service for calls to Facebook’s REST API.
I had already decided to go with Beanstalkd as a messaging queue for its fast, in-memory modus operandi, because this particular app makes API calls at a frequency comparable to the birthrate in China. Well, maybe not, but the potential is certainly there. I am also already using Beanstalkd in this project for purposes unrelated to the Facebook API, so I am married to it at this point.
There is currently a plugin called FacebookerMQ which uses its own custom database-backed queue. Since I had already decided on Beanstalkd and needed an in-memory queue, FacebookerMQ wouldn’t work for me. Also, I figured I could take things a step or two further.
So, without further ado, I am announcing Facebooker Queue (very clever name, I know). Not only does Facebooker Queue provide easy, transparent, drop-in API queueing for Facebooker, but it uses the Adapter pattern to provide agnosticism toward which queueing service you want to use, and it allows you to override queueing of any API call so that you can use the normal, synchronous behavior of Facebooker if at any time you need it.
Obviously, it comes with baked-in support for Beanstalkd, but the adapter interface is ridiculously simple, so you can feel free to use any messaging queue you choose.
Groundbreaking. Extraordinary. Well, not really, but definitely pretty cool.
Disclaimer: I developed this plugin during the after-hours of the last few nights (with the exception of last night, which I spent at a live performance by Nine Inch Nails and Jane’s Addiction). It has not seen production use just yet, but has worked beautifully for me in my development environment. Use at your own risk, and if you find anything that is lacking, do not hesitate to submit a patch or alert me to the issue.
I hope this is useful to other Facebook app developers out there who are also using Rails. Enjoy!
SEO – это как раз и есть оптимизация страниц сайта под отдельные запросы.

ffirefox said:
Самое качественное и бесплатное порно скачать можно прямо сейчас !
а также жесткий секс
Самый Большой член порево