最简单的方式得到快速RPC使用.NET?最简单、快速、方式、NET

2023-09-03 23:29:30 作者:谈情不如逗狗

什么是获得RPC在.NET中最简单的方法是什么?我看到有.NET Remoting的和WCF,并根据维基百科,WCF是继承.NET Remoting的。

What's the easiest way to get RPC in .NET? I see that there is .NET Remoting and WCF, and according to Wikipedia, WCF is the successor to .NET Remoting.

到目前为止,我只尝试远程处理的东西,这似乎是pretty的简单 - 我也没打与应用程序速度没有任何问题至今。是.NET远程真的让RPC工作的最好方法,还是应该考虑WCF(作为.NET远程将会有利于它被停产?)?我只想用C#编写的已知物体的沟通,所以我不需要任何这样的XML / SOAP /等。传输格式的东西。目标应用程序是指被分布在网络,并仅与其自身的实例通信。在这种情况下,我只是想连接到一个物体的地方,而不必处理与协议层的问题。

So far, I only tried the remoting stuff, which seems to be pretty simple -- I also didn't hit any problem with the application speed so far. Is .NET remoting really the best way to get RPC working, or should I look into WCF (as .NET remoting is going to be discontinued in favor of it?)? I only want communication with already known objects written in C#, so I don't need any of this XML/SOAP/etc. transport format stuff. The target application is meant to be distributed over a network, and communicate only with instances of itself. In this context, I simply want to connect to an object somewhere, without having to deal with protocol level issues.

推荐答案

您可以使用WCF二进制格式和TCP结合。如果(仍然)是不够快,你将不得不看的自定义(非标准)技术。有关1号机的通信可以使用IPC协议(这是类似的或基于命名管道)。

You can use WCF with binary formatting and TCP binding. If that (still) isn't fast enough you will have to look at custom (non standard) technologies. For communication on 1 machine you can use the IPC protocol (which is similar to or based on named pipes).

事实上,远程正在消失作为一个单独的技术。它被同化WCF。

And indeed, Remoting is disappearing as a separate technique. It is being assimilated by WCF.