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!
Memory data sharing between two applications
- papillon68
- Earned some good credits
- Posts: 118
- Joined: Tue Nov 06, 2007 11:19 pm
Memory data sharing between two applications
Windows 10, MS VC++ 2019 (vc142), WxWidgets 3.14
Designed with WxWidgets: https://www.facebook.com/clorofillaApp
Designed with WxWidgets: https://www.facebook.com/clorofillaApp
Re: Memory data sharing between two applications
Use the source, Luke!
- T-Rex
- Moderator
- Posts: 1249
- Joined: Sat Oct 23, 2004 9:58 am
- Location: Zaporizhzhya, Ukraine
- Contact:
Re: Memory data sharing between two applications
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).
-
- Filthy Rich wx Solver
- Posts: 235
- Joined: Fri Sep 14, 2012 8:26 am
- Location: Kontich, Belgium
- Contact:
Re: Memory data sharing between two applications
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
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
- papillon68
- Earned some good credits
- Posts: 118
- Joined: Tue Nov 06, 2007 11:19 pm
Re: Memory data sharing between two applications
Thanks for the pointers, really appreciated!
Windows 10, MS VC++ 2019 (vc142), WxWidgets 3.14
Designed with WxWidgets: https://www.facebook.com/clorofillaApp
Designed with WxWidgets: https://www.facebook.com/clorofillaApp
Re: Memory data sharing between two applications
best ways are sockets and pipes. as mentioned, learn the topic - inter-process communication.
ubuntu 20.04, wxWidgets 3.2.1