# \[ANN\] beanstalkd 0.5

**URL:** <https://www.ruby-forum.com/t/ann-beanstalkd-0-5/122765>\
**Category:** Rails\
**Created:** [December 11, 2007, 10:59pm UTC](https://www.ruby-forum.com/t/ann-beanstalkd-0-5/122765 "2007-12-11T22:59:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![krat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/839c29/32.png) [@krat](https://www.ruby-forum.com/u/krat)\
**Post date:** [December 11, 2007, 10:59pm UTC](https://www.ruby-forum.com/t/ann-beanstalkd-0-5/122765/1 "2007-12-11T22:59:25Z")

</div>

I’m happy to announce the release of beanstalkd 0.5.

This is the very first public release. In the future I’ll confine  
release announcements to the beanstalk mailing list.

## WHAT IS BEANSTALKD?

Beanstalkd is a fast, distributed, in-memory workqueue service. Its  
interface is generic, but is intended for use in reducing the latency  
of page views in high-volume web applications by running most  
time-consuming tasks asynchronously.

Philotic, Inc. developed beanstalkd to improve the response time for  
the Causes on Facebook ([Log into Facebook](http://apps.facebook.com/causes/)) application  
(with over 9.5 million users). Beanstalkd drastically decreased the  
average response time for the most common pages to a tiny fraction of  
the original and dramatically improved the user experience.

Stay tuned for a Rails plugin called Async Observer that will make  
using beanstalk in your Rails project a snap!

## OUR FEW URLS

Download the 0.5 tarball and learn all about beanstalk:  
[http://xph.us/software/beanstalkd/](http://xph.us/software/beanstalkd/)

Talk about beanstalk development or use at:  
[http://groups.google.com/group/beanstalk-talk](http://groups.google.com/group/beanstalk-talk)

## HOW TO RUN IT

First, run beanstalkd on two or three machines. There is no  
configuration file and only a handful of command-line options.

$ ./beanstalkd -d -l 10.0.1.5 -p 11300

This starts up beanstalkd as a daemon listening on address 10.0.1.5,  
port 11300. If you want to spy on what beanstalkd is doing, recompile  
it in debug mode.

## HOW TO USE IT

Here’s an example in Ruby. First, have one process put a job into the  
queue:

beanstalk = Beanstalk::Pool([‘localhost:11300’])  
…  
beanstalk.put(‘hello’)

Then start another process to take jobs out of the queue and run them:

beanstalk = Beanstalk::Pool([‘localhost:11300’])  
loop do  
j = beanstalk.reserve  
puts j.body # prints “hello”  
j.delete  
end

## DEPENDENCY

Beanstalkd requires libevent. It was developed with libevent 1.3b, but  
it may work with other versions.

[http://monkey.org/~provos/libevent/](http://monkey.org/~provos/libevent/)

## KNOWN BUGS

- The min heap data structure is not dynamically-sized. This means a  
fixed hard limit on the number of ready jobs (by default set to  
around 16 million).

- The policy of signalling errors by closing the connection is wrong.  
The server should send a helpful error response whenever possible  
and only close the connection as a last resort.

kr

---

<div class="post-metadata">

**Author:** ![krat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/839c29/32.png) [@krat](https://www.ruby-forum.com/u/krat)\
**Post date:** [December 12, 2007, 6:35pm UTC](https://www.ruby-forum.com/t/ann-beanstalkd-0-5/122765/2 "2007-12-12T18:35:28Z")

</div>

[Forward d’une annonce sur Rails-Talk : ça a l’air intéressant et  
çamérite investigation. – Jean-François. ]

---------- Forwarded message ----------  
From: Keith R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Date: 11 déc. 2007 22:59  
Subject: [Rails] [ANN] beanstalkd 0.5  
To: removed\_email\_address@domain.invalid

I’m happy to announce the release of beanstalkd 0.5.

This is the very first public release. In the future I’ll confine  
release announcements to the beanstalk mailing list.

## WHAT IS BEANSTALKD?

Beanstalkd is a fast, distributed, in-memory workqueue service. Its  
interface is generic, but is intended for use in reducing the latency  
of page views in high-volume web applications by running most  
time-consuming tasks asynchronously.

Philotic, Inc. developed beanstalkd to improve the response time for  
the Causes on Facebook ([Log into Facebook](http://apps.facebook.com/causes/)) application  
(with over 9.5 million users). Beanstalkd drastically decreased the  
average response time for the most common pages to a tiny fraction of  
the original and dramatically improved the user experience.

Stay tuned for a Rails plugin called Async Observer that will make  
using beanstalk in your Rails project a snap!

## OUR FEW URLS

Download the 0.5 tarball and learn all about beanstalk:  
[http://xph.us/software/beanstalkd/](http://xph.us/software/beanstalkd/)

Talk about beanstalk development or use at:  
[http://groups.google.com/group/beanstalk-talk](http://groups.google.com/group/beanstalk-talk)

## HOW TO RUN IT

First, run beanstalkd on two or three machines. There is no  
configuration file and only a handful of command-line options.

$ ./beanstalkd -d -l 10.0.1.5 -p 11300

This starts up beanstalkd as a daemon listening on address 10.0.1.5,  
port 11300. If you want to spy on what beanstalkd is doing, recompile  
it in debug mode.

## HOW TO USE IT

Here’s an example in Ruby. First, have one process put a job into the  
queue:

beanstalk = Beanstalk::Pool([‘localhost:11300’])  
…  
beanstalk.put(‘hello’)

Then start another process to take jobs out of the queue and run them:

beanstalk = Beanstalk::Pool([‘localhost:11300’])  
loop do  
j = beanstalk.reserve  
puts j.body # prints “hello”  
j.delete  
end

## DEPENDENCY

Beanstalkd requires libevent. It was developed with libevent 1.3b, but  
it may work with other versions.

[http://monkey.org/~provos/libevent/](http://monkey.org/~provos/libevent/)

## KNOWN BUGS

- The min heap data structure is not dynamically-sized. This means a  
fixed hard limit on the number of ready jobs (by default set to  
around 16 million).

- The policy of signalling errors by closing the connection is wrong.  
The server should send a helpful error response whenever possible  
and only close the connection as a last resort.

kr

–  
Ruby ( [http://www.rubyfrance.org](http://www.rubyfrance.org) ) on Rails ( [http://www.railsfrance.org](http://www.railsfrance.org)  
)

---

<div class="post-metadata">

**Author:** ![krat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/839c29/32.png) [@krat](https://www.ruby-forum.com/u/krat)\
**Post date:** [December 12, 2007, 7:06pm UTC](https://www.ruby-forum.com/t/ann-beanstalkd-0-5/122765/3 "2007-12-12T19:06:08Z")

</div>

> [Forward d’une annonce sur Rails-Talk : ça a l’air intéressant et ça  
> mérite investigation. – Jean-François. ]

j’ai pas trop compris ce que c’est… c’est pour mettre des taches à  
exécuter en parrallèle du site lui-meme, dans le style de backgroundrb ?

gUI
