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.aygfsteel.com/Good-Game
          posted on 2009-10-28 19:21 劉凱毅 閱讀(2390) 評論(0)  編輯  收藏 所屬分類: python集群開發消息隊列
          主站蜘蛛池模板: 临安市| 友谊县| 双桥区| 桃江县| 炉霍县| 凯里市| 洛隆县| 石阡县| 离岛区| 南宁市| 田林县| 石狮市| 兴国县| 延吉市| 沙河市| 清涧县| 江都市| 汉阴县| 衢州市| 和田县| 扎赉特旗| 兴安盟| 六安市| 乐都县| 阿拉善左旗| 小金县| 旬阳县| 布尔津县| 清苑县| 曲阳县| 山西省| 双辽市| 丰镇市| 龙江县| 新巴尔虎左旗| 涟水县| 高尔夫| 武山县| 三亚市| 信丰县| 九龙城区|