Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

32bit - 64bit interprocess communication

I am tasked with implementing an xml editor based on Win32 as a frontend process, while the business logic will be handled via a 64bit process. In addition the communication between the two processes will be done via a message bus which can only transmit messages of the form wchar_t * . (Yes it is so bad).

Assuming you have only C++ 03 in your hands, no external library support e.g. Boost what would be the best design for this task? The use case is that the user simply edits some .xml files.

I was thinking having a function pointer table in the business logic module which handles the different messages and then returns back to "listening" to events.

Side question is there any "easy" way to serialize an object as a string?

Thanks a lot.

Edit:

Boost is now allowed. Should I go with ASIO or MPI? I guess the first one right?

like image 852
FailedDev Avatar asked Dec 08 '11 16:12

FailedDev


1 Answers

Establish a socket connection between the processes and send text messages back and forth.

For socket connections Boost.Asio is a good option, for serialization Boost.Serialization with a text archive. Although Boost.Serialization is hard to debug.

like image 196
Maxim Egorushkin Avatar answered Sep 22 '22 23:09

Maxim Egorushkin