C# 中不同进程之间传递消息的快速方法是什么?

发布于 2024-08-06 00:44:17 字数 265 浏览 2 评论 0原文

我有一堆由 Microsoft AddIn Framework 加载的 AddIn,所有这些都在单独的进程中。

数据包从一侧(也是一个 AddIn)进入,然后发送到协调数据包处理的控制器(也是一个 AddIn)。然后,控制器根据从最后一个 AddIn 接收到的内容和结果,将数据包一一发送到多个其他 AddIn。

我的问题是 AddIn Framework 的通信层是否是执行此操作的快速方法,或者我是否可以使用命名管道或 net tcp 或完全不同的东西从 WCF 获得更好的性能?

I have a bunch of AddIns loaded by the Microsoft AddIn Framework all in separate processes.

Packets come in from the one side (also an AddIn) then get send to a controller (also an AddIn) that coordinates the process of the packet. The controller then sends the packet to multiple other AddIns one by one, depending on the content and the result received from the last AddIn.

My question is will the AddIn Framework's communication layer be the fasted method of doing this or will I get better performance from WCF with named pipes or net tcp, or something completely different?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

国产ˉ祖宗 2024-08-13 00:44:17

与任何性能问题一样:您自己的测试是无可替代的

如果可能,不要对通信层进行硬编码并测试两者以选择默认值。

我希望 net-tcp 更快,因为命名管道在底层套接字上有额外的抽象层,但这只是一个猜测。 (另一方面,命名管道与 Windows 身份验证的集成更紧密。)

As with any performance question: there is no substitute for your own testing.

If possible don't hard code the communications layer and test both to choose the default.

I would expect net-tcp to be quicker as named pipes have additional layers of abstraction over the underlying sockets, but this is a guesstimate. (On the other hand, named pipes have closer integration with Windows authentication.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文