Tom Krcha's FlashRealtime

Hey amigo! These are my notes. I'm Platform Evangelist with Adobe.


RTMP spec available. What does it mean?

June 23rd, 2009

The backbone protocol for realtime Flash applications - Adobe RTMP (Real-time messaging protocol) has been finally published.

There has been lot of articles about RTMP Specification in last week. Still I wanted to write down this thoughts, which might be for someone obvious, but for others good inspiration.

Personally - I think - this is huge step in realtime/streaming/collaboration world of Flash.

Disclaimer: This is my personal opinion based on my previous work experience during last 5 years (IPTV, online streaming business). This is not Adobe statement.



My ideas:

1. Connect 3rd party software with Flash Media Server
- having RTMP open means, that you can build your own connector that delivers stream to FMS and these streams are then redistributed by FMS to Flash Player

2. Huge step for TV/online streaming companies
- restreaming/transcoding a stream from a digital signal or IPTV Transport Stream to FMS

3. Better current RTMP servers (3rd party)
- official specification is always better knowledge source, than reversed engineered one
- improved stability and better RTMP support

4. New RTMP streaming servers to pop-up soon
- I am 100% sure, that there will come new RTMP servers soon, which might be focused just on particular features (like only live streaming, static streaming, or just RTMP text data)
- lightweight easy-to-embed RTMP servers (maybe?)

5. IP cameras to support RTMP
- another good idea to be done
- adding little RTMP server to IP cam chip, so you would be able to connect from Flash Player or FMS directly to IP cam

6. VoIP telephony
- SIP/RTP RTMP connectors for PBX with FMS
- Videochat in Flash communicating with e.g. Cisco phone on your table - sounds cool, right? :)

7. Flash Platform openess
- opensource Flex SDK + open RTMP + Open Screen Project prove that Adobe takes open-source seriously

8. I want it now, stable, tested and official!
- in this case, you can get a license for RTMP SDK (C++) from Adobe
- write an e-mail to FMSOEMinquiries@adobe.com

List of available RTMP servers:

Adobe:
- Flash Media Server http://www.adobe.com/products/flashmediaserver/
- LiveCycle DS http://www.adobe.com/products/livecycle/dataservices/

Non-Adobe:
- Red5 http://osflash.org/red5 (Java)
- Wowza http://www.wowzamedia.com/ (Java)
- WebOrb http://www.themidnightcoders.com/products.html (.NET)
- ErlyVideo http://code.google.com/p/erlyvideo/ (Erlang)
- RubyIzumi http://code.google.com/p/rubyizumi/ (Ruby)
- RTMPD http://www.rtmpd.com/ (C++)
- Cygnal http://wiki.gnashdev.org/Cygnal (C++)
- RTMPy http://rtmpy.org/wiki/RTMP (Python)
- RTMPlite http://code.google.com/p/rtmplite/ (Python)

(Disclaimer: Unfortunately I can’t write, which non-Adobe servers I have tried, stress-tested, load-tested, etc. But be very careful - some of these servers are still under heavy development and make sure the performance and stability is enough for you. Stress test every server, before you run your project. Again hopefully, with official RTMP specification, this will get better and I am big fan of it!)

Where to go from here:
Kevin Towes: RTMP Specification Now Available
http://blogs.adobe.com/ktowes/2009/06/rtmp_specification_now_availab.html

Stefan Richter: RTMP Specs Spark Debate on the FlashMedia List
http://www.flashcomguru.com/index.cfm/2009/6/17/flashmedialist
+ RTMP Specs Nows Public
http://www.flashcomguru.com/index.cfm/2009/6/15/rtmp-public

Ryan Stewart: The RTMP Spec is Released, Published, and Available
http://blog.digitalbackcountry.com/2009/06/the-rtmp-spec-is-released-published-and-available/

Custom Messaging with AFCS (CollectionNode)

June 22nd, 2009

This videotutorial explains how to use Custom Messaging using CollectionNode with Adobe Flash Collaboration Service. This is basically one of the most important realtime messaging features in AFCS.

Custom Messaging (Collection Node) with AFCS

Demo application: http://flashrealtime.com/tuts/custom-messaging-afcs/demo

Videotutorial:http://flashrealtime.com/tuts/custom-messaging-afcs.html

Source: http://flashrealtime.com/tuts/custom-messaging-afcs/source.zip

Private messaging tip:
See recipientID of MessageItem Class. You can get all recipientIDs from session.userManager.userCollection.

P2P with Adobe Flash Collaboration Service

June 3rd, 2009

Maybe you are asking, what is the main difference between core Flash P2P done by yourself and P2P implementation in AFCS.

Note:
- RMTPS refers to TCP hub-and-spoke only centralized communication via FMS CDN of AFCS
- RTMFP refers to UDP P2P (peer-to-peer) connections between N clients (not only 2), but is also suitable for hub-and-spoke

FAQ:

1. How can I setup AFCS to use P2P?
First you need to use afcs.swc library from Player10 folder and then you need to change protocol of AdobeHSAuthenticator -> auth.protocol=”rtmfp”; (instead of default auth.protocol=”rtmps”;) AFCS will try to establish connection using rtmfp. If connection cannot be established using RTMFP, it falls back to RTMPS.

In future version of AFCS, there is going to be automatic check for this. The aim is to have P2P used in every possible case, which makes AFCS very strong framework.

btw: Implementation of more than 2 peers is not easy. (just for example, with 3 peers, you need to handle already 6 different streams [IN/OUT])

2. Who decides what kind of communication is used in the room?
The room type (RTMFP or RTMPS) is set by first person coming in - most probably OWNER of the room

3. What if others in the same room can’t connect via RTMFP?
Then the communication is automatically downgraded to RTMPS hub and spoke.

4. When RTMFP is working well, is Audio/Video transfer among users done using P2P?
Yes! AudioPublisher, AudioSubscriber and WebCamera are communicating using P2P.

5. Are messaging features and sharedModel package classes (SharedProperty…) done using P2P?
No. There are really many messaging features in AFCS and considering all persmissions and contention management - there need to be one point of authority.

6. Is file sharing (FilePublisher, FileSubscriber) done using P2P?
No. This is still done using AFCS server.

7. Are AFCS user roles and rights regarding Audio/Video reflected into P2P?
Yes!

Useful links:
- Justin Everett Church’s blog P2P FAQ:
http://justin.everett-church.com/index.php/2008/05/23/astrop2p/
- Nigel Pegg (AFCS achitect) blog post on implementing P2P into AFCS:
http://blogs.adobe.com/collabmethods/2008/12/try_rtmfp_and_clienttoclient_d.html

If you haven’t started yet with P2P in Flash, try this videotutorial.

Basics of P2P in Flash

May 31st, 2009

This videotutorial explains the basics of working with P2P (peer to peer) in Flash Player 10.

I made this tutorial with focus on simplicity of this fantastic feature of Flash. There are bunch of articles and examples in the world showing how to create your own P2P app, but most of them are very complex or hard to catch.

In this tutorial you’ll get idea how to connect two different peers and exchange data between them with ActionScript 3.0 and Flex only.

Prerequsites:
- familiarity with ActionScript 3 and Flex Framework
- Flash Player 10 Debug version installed download
- Flex Framework 3.3+ download

P2P in Flash

Videotutorial: http://flashrealtime.com/tuts/p2p-in-flash.html (20 min.) 
Try: P2P demo (run in two browsers, explained in video)
Source: download P2P.mxml.zip

Note: Programatically the main P2P logic is not to connect peers together just via NetConnection, but by defining peerIDs to NetStream.
PS: don’t forget to change your Flex Compiler settings to use Flash Player 10
Btw: nice P2P Mill Game done by my friend Pavel Šimek http://nestor.cz/mill/ 

Good Luck!

Future of RIA, Prague - Final Agenda

May 19th, 2009

Official and final agenda of Future of RIA in Prague, Thursday 21st May 2009.

Start Stop Runtime Topic Speaker
9:30 09:35 00:05 Introduction Tom Krcha, Adobe
9:35 10:35 01:00 Keynote: Platform Overview, Future of RIA and technologies in Adobe Ben Forta, Adobe
10:35 11:00 00:25 World Successful Flash projects Michal Metlička, Adobe
11:00 12:00 01:00 Creating Realtime Social Apps

(Adobe Flash Collaboration Service, Facebook API)

Tom Krcha, Adobe
12:00 12:45 00:45 Break  
12:45 13:15 00:30 Keynote 2: Enterprise apps built on Adobe technologies Ben Forta, Adobe
13:15 13:40 00:25 Partner projects: 3D textures in Photoshop for SecondLife Pavel Řehulek, Bytegang.com
13:40 14:10 00:30 What’s new in CS4 Michal Metlička, Adobe
14:10 14:40 00:30 Alchemy - Extending Flash Player 10 with C++ Vojtěch Kopal, Allodium.eu
14:40 14:55 00:15 Break  
14:55 15:35 00:40 Webdeveloper workflow - Fireworks, Dreaweaver Stanislav Szkandera, Digitalmedia.cz
15:35 15:50 00:15 Partner projects: Enterprise Flex+SOA in Hewlett Packard Robert Macháček + Jan Trčka, HP
15:50 16:20 00:30 Introduction to ColdFusion Tomáš Tegelhoff, Omedis.sk

You can register here: http://www.adobe.com/cz/akce/ria/