0
votes

Can you advice something in building a Rails app that would nicely communicate with Flex via sockets. Currently I found only two ways of communication: Simple HttpRequest, RemoteObject. But I need something "multiplayer" style. I need Flex to talk to sockets and Rails app to grab data from those sockets do some job and push something back to a socket so Flex could read it "on the fly".

Any poor design flow? :) Thx in advance.

1

1 Answers

0
votes

Depends on what exactly you need it to do and how responsive you need it. You can look into the Ruby AMF plugin which is a native type for Flash, which makes transferring classes a breeze. The Java implementation has a streaming server built in, not sure if the Ruby version does.

Other than that, if you want it to be really responsive, you could 2 different approaches: an RTMP server (SmartFoxServer, Wowza, Red5, LCDS, etc - all Java based) or you could try to do p2p (Adobe calls it Cirrus - and it's still in pre-production). If you do use the p2p route, you still need a fallback in case something goes funky.