[Red5] Refactoring Progress
Luke Hubbard (firstname.lastname@example.org)
king.selassie at gmail.com
Wed Nov 2 04:09:18 EST 2005
Ive been a little quiet over the past week so I thought I would send an
update on whats been happening under the hood. We currently have two rtmp
handlers the old IoHandler and the new ProtocolHandler. The old one binds to
1935 and the new one is on 1936. The new code IMHO is much cleaner with good
separation of concerns. In the old IoHandler byte level stuff and processing
was handled together. This was great for happy hacking as we worked out the
basics of rtmp but quickly became a bit messy. I could have continued with
the stream publishing on top of this but wanted to take a step back and
build a decent foundation. Now in the protocol layer separates encoding and
decoding and message processing. It also passes all method calls to a spring
bean responsible for the application making the handler more compact. Oh
also IO layer and the protocol layer have separate thread pools.
Overview of new packages and classes.
org.red5.server.rtmp (RTMPProtocolProvider, RTMPSessionHandler, Connection,
org.red5.server.rtmp.codec (ProtocolEncoder, ProtocolDecoder)
org.red5.server.rtmp.message (InPacket, OutPacket, PacketHeader, Message,
... subclass of Message for each data type)
org.red5.server.stream (StreamManager, Stream) UNDER DEVELOPMENT
org.red5.server.context (Client, BaseApplication, Application, Scope)
Once the new code is at the same level of functionality (ie I have streaming
working), I will probably move the old code into the attic or delete it all
together. The only change which will effect the demo/test app is that now
rtmp uri should point to the application not the service. To call a service
within the AppContext you should pass the service name inside the
ns.callso.. "getListOfFLVs" would become "
demoService.getListOfFLVs". I think this should work with the old handler
too. Can someone make this change to the fla, I don't have flash 8 yet :).
So list of next tasks ( i will add to the basecamp site later)
- Get streaming working like before. (hopefully tonight)
- Add flow control to the streaming, and calculate client bandwidth
during streaming etc. (maybe tomorrow)
- Add stream publishing (friday / weekend, can someone update the fla
with a test for this).
- Shared objects (next week, can someone write a test for this too)
- Write more unit tests, esp for ProtocolEncoder, ProtocolDecoder
Right I think we should arrange a skype meeting friday or early next week to
discuss progress and spark outline / demo.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Red5