使用更多通道或端点通过 .NET 远程处理公开高效的多个服务?
我正在将基于 TCP 的远程处理用于原型分布式服务器应用程序,我希望从每个远程处理服务器进程中公开不同的多个服务。
在某些情况下,我希望服务从同一进程运行,但我不希望使用该服务的任何人关心这一点。
我想知道在同一进程中让多个服务通过由端点 URI/URL 区分的同一远程通道是否更有效,或者我应该在同一进程中的每个服务的不同端口上创建新通道?
使用端口并不是什么大问题,因为服务数量会很少,并且网络和机器配置完全受控。
我还不清楚远程处理是为每条消息发送 URI 字符串还是仅在连接时发送 URI 字符串,以及远程处理框架是否足够智能,可以在同一台计算机甚至同一进程上进行调用时减少工作量?
提前致谢。
I am using remoting over TCP for a prototype distributed server application where I want to have varying multiple services exposed from each remoting server process.
In some cases I want the services running from the same process but I don't want whatever is using the service to care about that.
I am wondering is it more efficient to have multiple services in the same process going over the same remoting channel distinguished by endpoint URI/URL or should I be creating new channels on different ports for each service in the same process?
Using up ports isn't so much of a problem as the number of services will be low and the network and machine configuration is completely controlled.
Also its not clear to me if remoting sends the URI string for every single message or just at connection time, and whether if the remoting framework is intelligent enough to reduce work if calls are made on the same machine and even the same process?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您还可以使用 Net.Tcp 端口共享服务在同一端口上托管不同的进程。
You can also host in separate processes over the same port, using the Net.Tcp Port Sharing Service.