Some reminiscences, some memories

Just another boring day
« 不要说你没机会上大学
白衣飘飘的年代 »

8

Jun

Web编程异步模型的 Gearman 实现(残)

mikespook 

写了 PHP 原生的二段式异步模型的实现,我就想着用 Gearman 实现一个 callback 方式的异步。还没准备好怎么去写,就看到了靓文一篇《Gearman 心得》。

看过之后,甚感压力:好文!!于是,弃笔不写,洗洗睡罢了……

补充一下,在“心得”文中仅仅说明了不阻塞的后台作业。对于异步获取数据并未说明。所以我这里罗嗦一下……

worker 如果用 php 来实现,并且不用《Web编程异步模型的PHP 原生实现》中的异步方式,是无法实现 php 的 client 的异步的。比较好的实现方式是 worker 不使用 php,用 python、perl 或者 c,实现一个线程池来执行 job。当然,私下觉得用 stackless python 可能是更好的选择。

2010年07月18日补充:
好吧,终于有人撰文,正好可以补充完整这个异步思路:
淺談coroutine與gevent
就他了,太棒了!

This entry was posted on Tuesday, June 8th, 2010 at 10:34 and is filed under PHP, Stardy & Research. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

One Response to “ Web编程异步模型的 Gearman 实现(残) ”

  1. # 1 Rebill Says:
    June 8th, 2010 at 21:09

    之前了解过Gearman,打算用来做图片转换处理的,后来改用客户端做了,也就作罢。想详细了解Gearman的同学,可阅读Gearman分布式远程过程处理框架

Leave a Reply

Trackback URI | Comments RSS

 

September 2010
M T W T F S S
« Aug    
 12345
6789101112
13141516171819
20212223242526
27282930  

Recent Comments

  • cbf107 on 我们精通精通
  • mikespook on 我们精通精通
  • == on 我们精通精通
  • 老熊 on 关于Web编程异步模型的白日梦
  • Some reminiscences, some memories » Blog Archive » Akihabara 指南目录 on Akihabara 指南

Tags

乱码 协程 地震 备案 安装 广州 异步 性能 我爱发明 扯淡 招聘 游戏 漏洞 翻译 豆瓣 39.com Adobe akihabara config countdown Demo Flash game engine golang google html5 issue linux Micromedia MongoDB mysql NetBeans nginx NoSQL oracle PHP phpunit Python trac ubuntu xdebug xml xubuntu yield Zend Framework

Blogroll

  • Blog on 27th Floor
  • DBA notes
  • Tim[后端技术]
  • 唐海燕
  • 小众音乐
  • 抚琴居
  • 某人的栖息地
  • 番茄’s Blog
  • 網站製作學習誌
  • 纸老虎传媒

Old friends

  • cbf107

Only

  • 媚惑桃花

OurPNP

  • Biaoest:标的最高级
  • flexsns-官方博客
  • PNP University
  • PNP街坊
  • smallfish 鱼哥的窝子
  • 冰山日志
  • 墙外的光神V5
  • 夜雨's Blog
  • 小冬kobe
  • 小路的奇异世界
  • 广州萌芽工作室
  • 老甘blog
  • 赖勇浩的编程私伙局

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Powered by WordPress
mikespook.com 粤ICP备09065095号