Skynet

---------- ---------- 我的新 blog : liukaiyi.cublog.cn ---------- ----------

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  112 Posts :: 1 Stories :: 49 Comments :: 0 Trackbacks

首先 好东西
  http://kr.github.com/beanstalkd/


其次 真的是好东西 支持 java , python ,perl,ruby,erlang 和我不知道的 语言
  官方的原文介绍:
$ ./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.

Use It

Here’s an example in Ruby (see the client libraries to find your favorite language).

First, have one process put a job into the queue:

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

beanstalk.put('hello')

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

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

loop do

job = beanstalk.reserve

puts job.body # prints "hello"

job.delete

end





Thanks

Many thanks to memcached for providing inspiration for simple protocol design and for the structure of the documentation. Not to mention a fantastic piece of software!




整理 www.blogjava.net/Good-Game
posted on 2009-10-28 19:21 刘凯毅 阅读(2377) 评论(0)  编辑  收藏 所属分类: python集群开发消息队列

只有注册用户登录后才能发表评论。


网站导航: