在线语音聊天:为什么选择客户端-服务器模型与点对点模型?
我正在将在线语音聊天添加到 Silverlight 应用程序。我一直在审查通过在线搜索和论坛找到的当前应用程序、服务和 SDK。我发现其中大多数都实现了客户端-服务器 (C/S) 模型,并且我试图理解为什么该模型与对等 (PTP) 模型不同。对我来说,PTP 更可取,因为在对等点之间直接传输会更高效(IP 跃点更少,并且服务器计算机无需沿途进行处理),并且不需要服务器及其成本和依赖性。我发现有些产品提供了从 PTP 切换到 C/S 的能力,如果 PTP 证明不够的话。
当我更多地思考时,我发现如果有两个以上的对等点参与对话,那么 C/S 可能会更好,然后服务器(假设具有更多带宽)可以更好地将每个对等点的传出流量中继到多个其他同行。在C/S多对多语音聊天中,每个对等体的上行宽带(这就是本质上的瓶颈所在)只需承载每一项语音流量一次,然后服务器将利用其优越的带宽将消息中继到多个其他同行。
但是,在一对一语音聊天的情况下,PTP 似乎是最好的。服务器不会减少两个对等点的带宽要求,只会增加不必要的开销、依赖性和成本。
在一对一语音聊天中:
- 我是否误解了上述内容?
- 点对点是最好的吗?
- 服务器能否提供仅客户端无法提供的任何有价值的东西 程序?
- 还有什么我应该考虑的吗?
最后,您能推荐一些Silverlight PTP 或C/S 语音聊天产品吗?
预先感谢您提供任何信息。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,我无法说出某些工具使用 CS 模型而不是 PTP 模型的一般原因。
然而,PTP 需要一个或两个对等方打开端口进行侦听,以便另一个对等方可以连接。据我所知,Silverlight 不支持侦听传入连接请求的功能。
因此,Silverlight CS 是唯一可用的解决方案。
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.
•点对点是最好的吗?
不,如果您在 LAN 环境中工作,但在互联网上,您需要 C/S 模型来处理客户端请求(客户端将位于 NAT 之后)(服务器将位于公共 IP 上),那么这很好。
•服务器能否提供纯客户端程序无法提供的任何有价值的东西?
是的,您无法与 NAT 后面的客户端通信,并且如果他的 IP 不是静态或未知,因此最好的解决方案是 C/S 模型
您可以推荐任何 Silverlight PTP 或 C/ S语音聊天产品?
是,检查此项目:http://www.socketcoder。 com/ArticleFile.aspx?index=2&ArticleID=70</a> 作为 C/S 模型
•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