Interprocess Communication between C++ app and Java App in Windows OS environment

前端 未结 4 554
醉酒成梦
醉酒成梦 2021-01-05 12:54

We have a C++ application on Windows that starts a java process. These two apps need to communicate with each other (via snippets of xml).

What interprocess communic

4条回答
  •  心在旅途
    2021-01-05 13:27

    I'm not sure why you think socket-based communication would have security concerns (use SSL). It is often a very good approach as it is language agnostic, assuming that you have a well-defined communication protocol. Have a look at Google's protocol buffers, for example - they generate the required Java classes and streams.

    In my experience, file systems (especially network file systems) are not well suited to such communication as they are not necessarily tuned for messaging (I've seen caching issues result in files being not picked up by the target process for example).

    Another option is a messaging layer (AMQ or Tibco for example) although this will likely involve a greater administrative overhead (plus expertise) to set up.

    Personally I would opt for a pure-socket approach because of its flexibility and simplicity. You will be in complete control.

提交回复
热议问题