开发者

Streaming support for flex with Ruby On Rails (working with live data )

I am working on flex dasboards and charting stuff. Till now I have build them for static data only now I want to upgrade them to work for real time data where new data is continuosly sent to client (swf file) from server and it updates开发者_如何学编程 the same.

I am using Jruby with RoR.

Please share the links for any similar implementation in RoR-Flex architecture. Or if you have some suggestions to share I will really appreciate.

Thanks friends.


Try this : http://flexonrails.net/?p=105

You need a server push architecture which can support live data streaming.


Just create a private variable with getters and setters that you continually update. This variable will be the dataProvider for your charts.

[Bindable]
_dataProvider:ArrayCollection = new ArrayCollection();


public function get dataProvider() : ArrayCollection {
  return _dataProvider;
}       
public function set dataProvider (value:ArrayCollection) : void {
  _dataProvider = value;
  _dataProvider.refresh();
}

Then set your chart to use _dataProvider as its dataProvider.


look into livecycle data services...or even maybe blazeDS,

here's a pretty good sample app from the adobe website that has data being pushed real time.
http://examples.adobe.com/flex3/devnet/networkmonitor/main.html


Check out the Real-Time Dashboard sample in Tour de Flex.


I've used WebORB for a project involving Twitter and Flash, and it works great. It allows the persistence of primitive types (dictionaries/hashes/objects, arrays, etc) across the wire. Check out the overview here:

http://www.themidnightcoders.com/products/weborb-for-rails/overview.html

Or take a peek at the quick start guide here:

http://www.themidnightcoders.com/products/weborb-for-rails/quick-start-guide.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜