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 劉凱毅 閱讀(2389) 評論(0)  編輯  收藏 所屬分類: python 、集群開發 、消息隊列
          主站蜘蛛池模板: 措勤县| 昭通市| 恩施市| 寻乌县| 南皮县| 洪湖市| 平远县| 罗江县| 瓮安县| 黄陵县| 营山县| 繁昌县| 西丰县| 剑阁县| 荣成市| 天柱县| 全南县| 岑巩县| 齐齐哈尔市| 四会市| 阿拉善左旗| 临洮县| 朝阳县| 乐平市| 宜黄县| 石门县| 长宁县| 嘉黎县| 个旧市| 吴旗县| 中江县| 尼勒克县| 仙居县| 安徽省| 虞城县| 胶南市| 西丰县| 酉阳| 分宜县| 长海县| 定日县|