Prototypes for Flash/Flex

Prototype 提供了实现的最小功能,用于验证可行性和作为参考。

在GAE/J中使用Cinnamon

默认的Cinnamon不能部署到GAE。因为它的IO部分使用了mina的ByteBuffer,ByteBuffer默认使用PooledByteBufferAllocator,其中使用了GAE不支持的thread方法。不过mina还有一个SimpleByteBufferAllocator没有使用不被支持的方法,设置allocator是SimpleByteBufferAllocator就可以了,增加些许内存开销。

配置cinnamon.xml增加processor节点,指定一个Processor,在初始化阶段设置ByteBuffer的allocator。参考http://www.spicefactory.org/pimento/docs/1.1/manual/ 10.4节

源文件

付背景介绍

Cinnamon是一个基于AMF3协议的remoting framework.不同于BlazeDS的是他提供了一套client API使我们可以脱离Flex使用,而且他比rpc包要精简,生成的文件也小一些。

Cinnamon使用模板生成client的service proxy,这使得rpc保持强类型的调用。
server端,Cinnamon可以选择xml,spring,annotation等配置services,为整合现有系统提供了方便。

性能方面没有足够多的数据。不过因为配置灵活,services也并不一定依赖Cinnamon,所以作为一个prototype的测试环境,我以为相当不错。部署到GAE上是再好不过了。

posted on 2010-05-27 22:36  Andy Shang  阅读(212)  评论(0)    收藏  举报

导航