Skynet

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

            BlogJava :: 首頁(yè) :: 聯(lián)系 :: 聚合  :: 管理
            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 劉凱毅 閱讀(2395) 評(píng)論(0)  編輯  收藏 所屬分類: python集群開發(fā)消息隊(duì)列
          主站蜘蛛池模板: 黔江区| 信宜市| 中超| 黎平县| 鹰潭市| 中宁县| 临猗县| 东兴市| 阆中市| 呈贡县| 临城县| 凤阳县| 阿城市| 隆化县| 津南区| 宁夏| 广平县| 龙胜| 巴南区| 富锦市| 东乡| 宁津县| 哈尔滨市| 秦安县| 蒲城县| 万安县| 库车县| 青田县| 阳朔县| 临城县| 芦溪县| 揭东县| 玛多县| 军事| 江都市| 广宁县| 瓮安县| 琼海市| 武隆县| 安化县| 湘潭县|