views:

111

answers:

5

Hi Freinds, 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.

+1  A: 

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.

Robusto
A: 

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

James Ward
+1  A: 

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

Chris
Thanks for the help chris. This was really useful.
Ashine
A: 

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

bobthabuilda
+1  A: 

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

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

AimIt