Skip Navigation

Ramblings from the team at zinc Roe

Metal Fish Eggs

Taking a look at Adobe Stratus

I had some time to take a look at what Adobe Labs has been up to and got caught up on Stratus. Stratus is a (currently free) service Adobe provides that enables peer 2 peer communication between multiple instances of the flash player. It uses RTMFP which you can learn more about on Adobe Labs.

I have to admit, I didn’t expect it to be so easy to create a simple chat application using the service. But if you’ve ever played around with streaming anything in flash, the process is the same. Just to explain it quickly, you have to create a NetConnection instance that connects to the stratus service (rtmfp://stratus.adobe.com/[YOUR_DEVELOPER_KEY]). After a successful connection you will receive a unique id. You also need to create two NetStream instances, one for sending data and the other for receiving. Listeners added to these two streams will get invoked each time data is sent/received.

Here’s what I managed to put together in almost no time:

To start chatting, exchange id’s with the person you want to chat with (through im or email, or if you’re lonely you can just open this page in a seperate window), paste their id in the “FRIEND’S ID” input and hit connect, both users must do this. Once you’re connected to each other, chat away!

Soo…why do I need to use this awesome chat application if i have to communicate my id through some other way? Well, first, this is just a demo of the Stratus service. And second, in a real world chat application, the id exchange should take place through some back-end code, maybe based on the user’s email address or something.

Unlike Flash Media Server or other similar technologies, RTMFP has very low latency making it ideal for use in video/audio chat, multiuser gaming, and other applications that are dependent on fast communication between multiple users.

Here’s a couple resources which I found really helpful:

Video tutorial: http://www.flashrealtime.com/tuts/p2p-in-flash.html

Text tutorial: http://www.insideria.com/2009/07/getting-started-with-adobe-str.html

One comment on Taking a look at Adobe Stratus
  1. josh Says:

    Hi Carlo, any chance you’d like to post the source files?

Your Comment…

You can use these tags: <a> <blockquote> <strong> <em> <strike> <code> <pre> Use <pre lang="LANGUAGE"> for syntax highlighted code blocks.