开发者

C++ IPC replacement for local COM interface?

Current setup:

Windows C++ native Application provides a COM interface that is used (RPC style, simple function calls) by a number of plugin executables. Communication is only on the local machine.

[App.exe (COM server)] <-> [plugin1.exe (COM client / possible callbacks etc.)]
                       <-> [plugin2.exe (COM client)]

We would now like to replace the COM interface with something else for selected plugins.

What options do we have for local "RPC style" IPC that would be as easy to use as COM?

The following restrictions apply:

  • Performance must be at least as good as local COM calls. (In light of Steve's answer, any alt开发者_JAVA技巧ernative that wouldn't perform significantly worse than local out-of-process COM calls would already be helpful!)
  • The interface should be easy to use. No explicit fiddling around with memory and raw sockets while using the interface in the clients or the server.
  • native C++ on windows


Performance between processes will never match local COM to an in-process server, since in-process COM calls reduce to a simple function call on the calling thread. For inter-process traffic, there is ALWAYS going to be marshaling and context switching overhead that makes this slower.

Taking that one step further, it's unlikely you will build anything as simple as what you have with COM that performs anything like as well as COM. For local out-of-process servers, COM will run over an optimized RPC stack called LRPC.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜