Page 1 of 1

Memory data sharing between two applications

Posted: Mon Apr 15, 2019 10:17 am
by papillon68
Hello folks, I'm looking to any suggestion or hints about this particular scenario.
I have a WxWidgets-base application, and a Qt-based application. What I need to do it's exchanging data between the two, so that basically the apps listen for data change and synchronize.
Any suggestion? Thanks!

Re: Memory data sharing between two applications

Posted: Mon Apr 15, 2019 11:18 am
by doublemax
There is nothing for this in wxWidgets.

https://www.boost.org/doc/libs/1_50_0/d ... esses.html

Re: Memory data sharing between two applications

Posted: Mon Apr 15, 2019 12:49 pm
by T-Rex
You could check wxConnection and related classes and their implementation and implement something similar at Qt app's side (in general, you will need to put the header with signature at the beginning of the message).

Re: Memory data sharing between two applications

Posted: Thu Apr 18, 2019 7:18 pm
by Nunki
Hi pappilon68,
Having two applications exchanging data would be by means of a database like Postgresql. Straightforward, reliable and possible with a minimum of extra work. Performance should normally be sufficient. A plus may also be that this solution works both inside one server as between multiple servers. e.g. ths wxWidgets running on a windows machine and the Qt running on a linux machine.
A more direct approach would be a direct link between the two applications by means of sockets. That would mean programming a server, client and drawing your own message structure.
A third option that may be a very good solution when in need of perfromance is building a server (a bit like apache) waiting for client connections. With the implementation of what is a bit like 'data queues' on the AS/400. both applications drop messages in each others mailbox. This way the server may service many clients.

Maybe a good book for you would be 'UNIX network programming' by W.Richard Stevens. specifically volue 2 'interprocess communication'. Though being for unix this book serves you well for other operating systems.

Have fun,
with regards,
Nunki

Re: Memory data sharing between two applications

Posted: Sat Apr 20, 2019 1:56 pm
by papillon68
Thanks for the pointers, really appreciated!

Re: Memory data sharing between two applications

Posted: Sun Apr 21, 2019 1:17 am
by alys666
best ways are sockets and pipes. as mentioned, learn the topic - inter-process communication.