Re: [Rails] [ANN] beanstalkd 0.5

6 views
Skip to first unread message

JD Harrington

unread,
Dec 11, 2007, 6:34:05 PM12/11/07
to beansta...@googlegroups.com

On Dec 11, 2007, at 4:59 PM, Keith Rarick wrote:

>
> 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.

Hey Keith,

This looks awesome!!
I had a tiny bit of trouble compiling on MacOS X 10.5, here's what I
ended up doing for your benefit or anyone else's...

1. Installed libevent from MacPorts, added
C_INCLUDE_PATH=/opt/local/include
LIBRARY_PATH=/opt/local/lib
to my environment, since I'm using Apple's gcc.

2. That got me as far as a compiler warning from prot.c

cc -O2 -Werror -Wall -c -o prot.o prot.c
cc1: warnings being treated as errors
prot.c: In function ‘h_conn_data’:
prot.c:851: warning: implicit declaration of function ‘writev’
make: *** [prot.o] Error 1

3. I removed the -Wall from CFLAGS in the Makefile, leaving -Werror
and got a clean compile

I was able to go on with the tutorial on the site, but did notice a
small typo. It looks like

beanstalk = Beanstalk::Pool(['10.0.1.5:11300'])

should be

beanstalk = Beanstalk::Pool.new(['10.0.1.5:11300'])

All in all, very cool!

-JD

kr

unread,
Dec 11, 2007, 6:48:09 PM12/11/07
to beanstalk-talk
On Dec 11, 2007 3:34 PM, JD Harrington <p...@y0ru.net> wrote:
> This looks awesome!!
> I had a tiny bit of trouble compiling on MacOS X 10.5, here's what I
> ended up doing for your benefit or anyone else's...
> ...

Thanks! This is very helpful.

> 2. That got me as far as a compiler warning from prot.c
>
> cc -O2 -Werror -Wall -c -o prot.o prot.c
> cc1: warnings being treated as errors
> prot.c: In function 'h_conn_data':
> prot.c:851: warning: implicit declaration of function 'writev'
> make: *** [prot.o] Error 1

It will be fixed in the next release.

> I was able to go on with the tutorial on the site, but did notice a
> small typo. It looks like
>
> beanstalk = Beanstalk::Pool(['10.0.1.5:11300'])
>
> should be
>
> beanstalk = Beanstalk::Pool.new(['10.0.1.5:11300'])

Fixed.

> All in all, very cool!

Thanks so much! I hope you find it useful.

kr

Du Song

unread,
Dec 11, 2007, 11:09:54 PM12/11/07
to beanstalk-talk
Good job!
Guess it would be much more useful if persist storage could be
provided.

kr 写道:
> I'm happy to announce the release of beanstalkd 0.5.
>
> This is the very first public release.
>
>
> OUR FEW URLS
> ------------
>
> Download the 0.5 tarball and learn all about beanstalk:
> http://xph.us/software/beanstalkd/
>
> Talk about beanstalk development or use at:
> http://groups.google.com/group/beanstalk-talk
>
>
> 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 (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!
>
> 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/
>
>
> 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

topfunky

unread,
Dec 13, 2007, 6:54:55 PM12/13/07
to beanstalk-talk
On Dec 11, 3:34 pm, JD Harrington <p...@y0ru.net> wrote:
> I had a tiny bit of trouble compiling on MacOS X 10.5, here's what I
> ended up doing for your benefit or anyone else's...

I also had a bit of trouble compiling on Mac OS X 10.4 and CentOS.

Upgrading to Make 3.81 (from 3.80) made it work for me.

Geoffrey Grosenbach
http://peepcode.com
Reply all
Reply to author
Forward
0 new messages