views:

419

answers:

2

I am adding online voice chat to a Silverlight app. I've been reviewing current apps, services and SDKs found thru online searches and forums. I'm finding that the majority of these implement a client-server (C/S) model and I'm trying to understand why that model versus a peer-to-peer (PTP) model. To me PTP would be preferable because going direct between peers would be more efficient (fewer IP hops and no processing along the way by a server computer) and no need for a server and its costs and dependencies. I found some products offer the ability to switch from PTP to C/S if the PTP proves insufficient.

As I thought more about it, I could see that C/S could be better if there are more than two peers involved in a conversation, then the server (supposedly with more bandwidth) could do a better job of relaying each peers outgoing traffic to the multiple other peers. In C/S many-to-many voice chatting, each peer's upstream broadband (which is where the bottleneck inherently is) would only have to carry each item of voice traffic once, then the server would use its superior bandwidth to relay the message to the multiple other peers.

But, in a situation with one-on-one voice chatting it seems that PTP would be best. A server would not reduce each of the two peer's bandwidth requirements and would only add unnecessary overhead, dependency and cost.

In one-on-one voice chatting:

  • Am I mistaken on anything above?
  • Would peer-to-peer be best?
  • Would a server provide anything of value that could not be provided by a client-only program?
  • Is there anything else that I should be taking into consideration?

And lastly, can you recommend any Silverlight PTP or C/S voice chat products?

Thanks in advance for any info.

A: 

Well I can't speak to the general reasons why some tools use a CS model over a PTP model.

However PTP would require one or both the peers to open a port to listen so that the other peer can connect. As a far as I can see Silverlight does not support an ability to listen for an incoming connection request.

Hence in Silverlight CS is the only solution available.

AnthonyWJones
+1  A: 

•Would peer-to-peer be best?

No it's just good if you are working on LAN environment but on the internet you need the C/S model to handle the client requests (client would be behind a NAT) (Server would be on a Public IP).

•Would a server provide anything of value that could not be provided by a client-only program?

Yes you cannot communicate with a client that exist behind a NAT and if his IP is not static or unknown, for this reason the best solution is the C/S Model

can you recommend any Silverlight PTP or C/S voice chat products?

Yes Check this Project: http://www.socketcoder.com/ArticleFile.aspx?index=2&ArticleID=70 as C/S model

Fadi Abdelqader