.NET 服务的跨平台 RPC
我有一个 .NET 2.0 服务,当前通过 .NET 远程处理进行访问,我想添加对另一种 RPC 方法的支持,该方法允许更广泛的平台和语言支持。
所有 API 方法都接受并返回 XML 以及 int 等简单类型。
我还应该关注哪些其他技术?
I have a .NET 2.0 service that is currently accessed via .NET remoting, and I would like to add support for another RPC method that allows a wider range of platform and language support.
All of the API methods take and return XML and simple types like int.
I know about CORBA and IIOP.NET which look promising.
What other technologies should I be looking at?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果可能的话,为此使用的最好的方法可能是:
Windows Communication Foundation (WCF)
WCF 似乎正在(缓慢但肯定地)取代 .NET 远程处理,并且一旦您拥有了一组为使用 WCF 编写的类/功能(主要涉及使用属性和用法来装饰您的类/方法)定义契约的接口 - 无论如何都是标准的 OOP 最佳实践)您可以通过许多不同的通信机制公开该功能,所有这些都可以通过简单的配置文件进行控制。
您可以为可能需要与您的服务通信的其他基于 .NET 的应用程序指定基于二进制的通信机制,从而使通过“线路”流动的数据量尽可能最小,同时暴露那些确切的数据。使用 XML 通过 SOAP 提供相同的服务,以实现最大的可移植性和跨平台访问。
WCF 的一个良好起点及其优点是:
构建 Windows Communication Foundation Services 简介
If possible, probably the best thing to be using for this would be:
Windows Communication Foundation (WCF)
WCF seems to be (slowly but surely) replacing .NET remoting, and once you have a set of classes/functionality that is written to use WCF (which mostly involves decorating your classes/methods with attributes and usage of interfaces to define contracts - all standard OOP best practises anyway) you can expose that functionality over a number of different communication mechanisms, all of which can be controlled via simple config files.
You can specify binary-based communication mechanisms for other .NET-based applications that may need to talk to your services, thereby keeping the amount of data flowing over the "wire" as minimal as possible, whilst at the same time, exposing those exact same services over SOAP using XML to enable maximum portability and cross-platform access.
A good starting point for WCF, and it's benefits, is:
Introduction to Building Windows Communication Foundation Services
只使用 SOAP 怎么样? WCF 对其支持非常好,包括对 WS-Security 和其他此类 WS-* 协议的支持。
How about just using SOAP? WCF supports it very well, including support for WS-Security and other such WS-* protocols.