Cramp- 异步事件驱动的Ruby Web应用框架

网友投稿 594 2022-10-26

Cramp- 异步事件驱动的Ruby Web应用框架

Cramp- 异步事件驱动的Ruby Web应用框架

Cramp是一种新的,处 理并发事件的Web应用程序框架,由37signals和Rails核心小组的PratikNaik提供。它建立在Ruby的EventMachine库之上,主要用于处理一些大量的开放连接 (如Comet系统或streamingAPIs),整个过程都使用event-driven I/O。

Cramp使用Rails 3.0的ActiveSupport 和 ActiveModel库, 它会显示两层用于开发:controllers 和models。

示例代码

require 'rubygems' require 'cramp/controller'class WelcomeAction < Cramp::Controller::Action on_start :send_hello_world def send_hello_world render "Hello World" finish end endRack::Handler::Thin.run WelcomeAction, :Port => 3000

安装方法:

gem install arel --pregem install activemodel --pre

And then,

gem install cramp

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:关于MVC的dao层、service层和controller层详解
下一篇:每日算法系列【LeetCode 1363】形成三的最大倍数
相关文章

 发表评论

暂时没有评论,来抢沙发吧~