January 30th, 2008 :: jackyz
MochiWeb是mochibot.com的Bob Ippolito贡献的开源项目[在这里有一个介绍它的Slide]。
MochiBot.com 提供 Flash 内容的访问统计和用户跟踪服务(大致上,可以理解为针对 flash 的 google Analytics 服务),他们在 mochiweb 之上构建了一个定制化的 web server ,并通过这个 web server 获取用户的访问数据(在这一点上有点象 Erlana 项目)。可以想象,这个定制的 web server 需要很高的并发支持,精简和牢固的底层架构,以及对于 http 协议的完备支持(乃至对于 socket 的直接操控)。如果可以的话,最好还有更为精简的 API ,易于定制的 URL 扩展方式,以及易于理解的底层框架。幸运的是,这些 mochiweb 都已经提供,而且还是开源的。
需要说明的是,相比 yaws / inets httpd 而言,它的目标并不是 apache 之类的软件,它并不是一个完整的 web server (没有cache等机制,因而也不做任何加速动作),它只是一个实现 web server 的工具包(这也就意味着,它直接通过代码来扩展,你可以在它的基础上做任何事)。正因为此,在“需要定制 Web Server”的情况下,它成为一个非常不错的选择(比如,配置在 enginx 的后面,专门用于动态内容的生成)。在 erlang 的世界里,有几个项目已经开始转而使用 mochiweb 。
下面是对这个项目代码的一些粗浅实战。
Read more…
start
January 18th, 2008 :: jackyz
HyperNumbers的Gordon Guthrie发布了Hypernumbers White Paper(PDF)。这是一篇鼓吹 Erlang 在 Web Stack 中应用的 WhitePaper (哈哈,看来我不是唯一一个持有这种想法的人啊)。
HyperNumbers是一个苏格兰的StartUp Web公司,他们的计划是用Erlang Web Stack开发自己的vixo.com应用(这是一个“基于SMS的SNS”)这个项目是SeedCamp的六个优胜项目之一,获得了投资。记得Joe Armstrong有篇mail说过:
A gang of smart programmers get so frustrated using technology X that they bail out from the mothership start own company and do stuff in Erlang
这是他多年推广Erlang观察到“spread of Erlang into commercial projects”的“模式”之一。
AnyWay,这篇不错。值得一读。Hypernumbers White Paper(PDF)
misc
January 9th, 2008 :: jackyz
知名的 Java 社区 The Server Side 刚刚刊登了Dennis Byrne 的一篇《Integrating Java and Erlang》,Dennis Byrne 来自 ThoughtWorks ,想起上次听 gigix 说起 TW 内部有不少大拿对 Erlang 很感兴趣,看来确实如此。
既然是谈 Java 和 Erlang 的,少不了就会谈到 JInterface :
The world of enterprise software development has a new face: Erlang. Erlang is a functional programming language with native constructs for concurrency and reliability. In this article, Dennis Byrne provides an introduction to the Erlang programming language and Jinterface, an open source component of Ericsson’s Open Telecom Platform. Jinterface gives us the ability to integrate Java and Erlang.
此外,从架构的角度,我也很赞同作者的观点:
Java and Erlang are not mutually exclusive, they complement each other. I personally have learned to embrace both because very few complex business problems can be modeled exclusively from an object oriented or functional paradigm. The solutions to these problems can be sequential or concurrent. Jinterface can cleanly divide (and conquer) a system into parts suitable for Java and parts suitable for Erlang.
JInterface 的价值就在于,它能将系统 COP 的部分(Erlang)和 OOP 的部分(Java)分离开来,大家各自解决自己擅长的问题,并且彼此协作形成完整的系统。
好了,好文已经转完,下面开始 blah
Read more…
news
Recent Comments