Met de lancering van de Adobe Flash Player 10, biedt deze nu ook ondersteuning voor een nieuw protocol dat door Adobe zal ingevoerd worden namelijk: rtmfp.
RTMFP, of voluit: Real Time Media Flow Protocol, is een nieuw protocol dat developers in staat stelt peer 2 peer communicatie op te zetten tussen 2 (of meerdere) flash player instanties.
Dit heeft vooral als voordeel dat de belasting op de server heel minimaal blijft, het verkeer gebeurt namelijk enkel tussen de clients. Voor een volledig overzicht van wat de voor-en nadelen kan je best volgende PDF lezen.
Nu wat heeft dit met ‘Stratus’ te maken? Wel Stratus is een service, die zoals de titel doet vermoeden, voorlopig in beta is. Dit is een door Adobe gehoste service die via RTMFP werkt. Dus iedereen die een Adobe ID heeft kan opteren voor een Developer Key en zo de functionaliteit testen.
Op Adobe Labs staat verder informatie over Adobe Stratus.
Het voorbeeld dat door Adobe meegeleverd is vond ik zeer onduidelijk dus voelde ik me verplicht een eenvoudige test/demo applicatie te maken.
De applicatie is een chat applicatie die de standaard flow illustreert maar daarnaast ook de mogelijkheid bezit om tot een maximum van vijf deelnemers op te nemen. Om te connecteren dient men twee instanties van de link to openen en deze door middel van de unieke ID die gegenereerd wordt bij het opstarten van de app met elkaar te laten communiceren (copy paste de unieke id van een client in het “Connect to client” input veld van de andere client).
Dit voorbeeld heb ik gemaakt in Flex (view-source.enabled = true) wat volgens mij de workflow een beetje vereenvoudigd. Het voorbeeld is voorzien van commentaar zodat het duidelijk wordt welke stappen allemaal moet gebeuren.
Chat app
Opmerkingen:
De reden waarom de applicatie maar een totaal van 5 clients aankan is omdat de NetConnection.maxPeerConnections default op 8 staat, deze 8 zijn als volgt gedefinieerd:
- 1 NetStream die luisterd naar inkomende connecties
- 4 NetStream objecten die luisteren naar inkomende boodschappen van de andere 4 clients
- 1 NetStream die verantwoordelijk is voor uitgaande boodschappen
- 1 NetStream die wordt gebruikt om te connecteren op een andere client
Dit heeft een totaal van 7 streams echter als de 6e client probeert te connecteren creëert de andere client nog een Stream waarna hij zijn maximum aan streams heeft bereikt en dus de applicatie breekt.
Ook niet te vergeten voor RTMP te laten werken dient je netwerk uitgaand UDP verkeer toe te laten.
Niet te vergeten dat dit voorbeeld een puur technische test is op basis van de Stratus service. Feedback is welkom!
Links naar dit artikel
Momenteel zijn er nog geen links naar dit artikel.

Reacties
Please can you post the source code of this?
@666
You can watch the source by right clicking in the app; or here a quick link:
http://lab.marlon.be/mar_rd_stratus/srcview/index.html
Cheers, Bart
Hallo, Marlon,
At first I have to say, I can not write in Dutch, I read your article with the help of Google translation.
Great example, I think, because I feel it is very useful to me.
Now days, I am studying the Stratus, example from stratus lab and your example, I still have some questions:
1. From your sample, can I add video and audio stream support, in another words, can five clients chat by video and audio together?
2. From your sample, can one client relay the streams from another client to the third client?
waiting for your reply.
Many thanks
Moris
I rewrote this article in english a few weeks ago but since it’s been busy it has yet to be approved for publish.
And to answer your questions:
1.Normally you should be able to let five clients chat and stream there video and audio. It rests on the same base as my chat-example it just differs that I use the NetStream objects in my example to send simple text messages. Though you can perfectly use the NetStream to send a video/audio stream.
2.Yes a client can relay the streams from one to another. This is allready done actually when you connect (in my example) uppon eachother, the client which is being connect upon, sends all the NetStream id’s to the connecting client so he can also listen to the clients allready connected to the client which is being connect upon.
Hope this helps a little bit :)
Regards, Bart
Thank you Bart, Many thanks for your quickly reply.
I will try to implement the functions.
Hi, Bart,
In your last reply, you said “Yes a client can relay the streams from one to another”, but I wonder how can I relay the video from one peer to another peer.
At first, I dont know how can I get the streaming video from one peer, then I wonder how can I send the video from one peer to another peer.
then I study the FAQ from Adobe again, I found “What are the limitations of RTMFP in Flash Player 10 and AIR 1.5? Flash Player 10 and AIR 1.5 will not enable swarming, multicast or broadcast quality live video. It will only enable communication from the voice and video devices native to your computer (e.g. microphone and webcam) and enables application developers to send ActionScript data messages directly between Flash Player and Adobe AIR clients. ”
then I study the API document of NetStream, I found send method of NetStream just can send metaData not video or audio data.
Is that true? Is there any trick can implement the video relay function?
Thanks, hope I am not costing your too much time.
Moris
Hi,
for the past month I have been developing a free multi webcam chat box based on rtmfp (stratus) & MySQL only. I now have a working beta version but the application needs soms serious testing. I can do that only with your help. I need some people at the same time in 1 room to test the bandwidth use and video quality. I have tried to optimize bandwidth as much as possible but I am curious what the result will be in real world conditions.
You can post feedback, suggestions and bug reports on the site itself.
Please be a good sport and give me a hand!
http://www.moodsoup.com/camomille
Thanks a lot!
Stef
info@moodsoup.com