[hydra-dev] RTP Stack Choice

Joshua Colp jcolp at digium.com
Wed Aug 11 09:55:04 CDT 2010


----- Original Message -----
> 11 aug 2010 kl. 16.33 skrev Tim Panton:
> 
> >>
> >> There are not many RTP "stacks" out there. Seems like people
> >> generally think "this is simple
> >> so I can hack this together".
> >
> > That was _exactly_ what I was thinking :-)
> > Actually I think it _is_ simple enough to be worth the advantages of
> > rolling our own.
> > RTP is going to be the most performance sensitive part of Hydra (and
> > remember we
> > want it to scale massively).
> > I imagine ICE will put some interesting threading requirements in
> > the mix, so
> > it might actually be useful to have this in our own hands.

The RTP stack itself is a simple header constructor and packet parser. It has
no concept of threads or sockets. There's not a whole lot to optimize in
there.

Now the transports are where we would potentially improve things. They take care
of a bit more RTP state, and actual sending/receiving. These do have threads and
sockets. If we find performance is lacking we could either modify the existing code
or write our own transport implementations.

> >>
> >> I need to check pjmedia rtcp support before I say anything about
> >> it. For the rest of RTP, I fully trust the
> >> decision of the RTP master, Mr Colp. I had some issues with RTCP
> >> with PJsip phones and they all
> >> blamed pjmedia when I contacted them...
> >
> > Also it may be easier to instrument a ground-up stack than to
> > enhance an old one.
> >
> You need to consider DTLS, SRTP et al here, as well as RTCP XR.

So for example pjmedia already supports SRTP and RTCP XR and while it does not support
DTLS we could create our own transport implementation which supported it, and then
contribute it back in. The architecture allows that quite easily.
 
> It's not so easy any more. But having our own can give a lot of extra
> features.
> What are the issues really with the Asterisk RTP stack? If someone
> knows, it's Josh.
> Enlighten us why you don't want to reuse this.

The Asterisk RTP stack, while it could be used, is rather legacy and unlike other
RTP stacks (such as pjmedia) isn't designed in a fashion to make it easily extensible.
We would have to invest time into bringing it to that level, or pile additional code upon
it to bring it to the level where it implements more new features.

Additionally by using the Asterisk RTP stack we are putting more time towards that instead
of other Hydra things that could be more useful.

-- 
Joshua Colp
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com  & www.asterisk.org




More information about the asterisk-scf-dev mailing list