Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

P2P - Push messages and Bandwidth

Avatar

Level 2

I'm trying to understand how push messages and bandwidth get utilized during a P2P audio session.  I've created a Flash test application that simply creates a room (used for a private audio conversation) and connects two clients together using RTMFP.  I've run some timed connection tests to try to get a sense of typically how many push messages and how much bandwith is used for such a P2P audio call.

However, I'm finding it difficult to hone in on a "typical estimate"...

In one timed test for a 20 minute call (40 total user  minutes), the room report showed 24 push messages and 280kb of bandwidth usage.  In a second test, this time 15 minutes (30 total user minutes), the room report showed 280 push messages and 488kb of bandwidth usage.  Why would two calls with the same code, have such different results.  How are push messages and bandwidth used once the P2P RTMFP connection is established?

Thanks in advance!

4 Replies

Avatar

Employee

Hi,

LCCS can automatically detect and switch Hub 'n' Spoke & P2P for your application. I am guessing in the second case it wasnt P2P. (Firewall ?, Flash Player Version ? etc)

Thanks

Arun

Avatar

Level 2

Thanks for the response...

I can look at this further.  However, in some of my testing when I suspected I dropped to hub and spoke, I have queried the UserDescriptor.isPeer and UserDescriptor.isRTMFP variables for each user and they both come back as true. Is there any other way to detect a hub and spoke connection.  Also, is there a typical number of push messages required to establish and maintain a P2P connection?  Are there any "heartbeat" type messages sent periodically to LCCS for syncing purposes in a P2P connection?

Thanks!

Avatar

Employee

Just to be doubly sure, Instead of querying on the UserDescriptor, query on the stream manager. The API would be ConnectSession.streamManger.isP2P.

Thanks

Arun

Avatar

Level 2

Thanks,

I actually set that up as a test today...  I switched my code to user requireRTMFP on the authenticator and query the StreamManager.isP2P on StreamRecieve and a couple other places in the code.  It shows isP2P as true.  I also added the CONNECTION_TYPE_CHANGE listener on my AudioSubscriber (as shown in the PeerToPeerRtmfp app).  I haven't seen that event fire when testing.

After making those changes I'm still seen statistics like:

18 user minutes (2 users x 9 minutes), 160 push minutes, 320KB bandwidth.