Choice of IPC method

别说谁变了你拦得住时间么 提交于 2019-12-11 17:40:59

问题


I have several mathematical dlls, some of them are for x64 platform, some - for x86. I also need to communicate with several COM interfaces (in particular, 64-bit versions of Matlab and STATISTICA). So to solve problem with mixed dlls i splitted my software into 3 independent programs - 2 of them are 32-bit and 1 - 64-bit. All programs have to communicate with each other and also connected to mutual SQL database. Moreover, it is possible, that one program will work on client computer and another one will work on server computer.

What is the best technology (in terms of performance) to connect processes? I need to really quickly send arrays of data from x86 program to x64, perform calculations and send them back. The ability to use network is not important, in fact.

I just don't have much time to benchmark different methods (pipelines, WCF, etc.) and want to concentrate on studying one technology.


回答1:


In unmanaged code, COM can be used for that purpose (look up out-of-process servers, aka local servers). Internally COM uses RPC, but is more convenient than RPC because the client uses objects as though they were in the client process's own address space (whereas they are in the server process's address space). COM can also be used to communicate across computers, look up DCOM.

There are similar things in .NET, WCF being one of them, but I'm not sure how efficient they are. WCF in particular seems to use text-based protocols, which is probably less efficient than COM's RPC.



来源:https://stackoverflow.com/questions/12473083/choice-of-ipc-method

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!