Results 1 to 14 of 14

Thread: Inter App Communication

  1. #1
    Join Date
    Aug 2007
    Posts
    275
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Inter App Communication

    I have a Qt application and A Borland application but i want to establish a link between the two. Link so that i can send some info back and forth.

    Is there any inter app communication library thats is useful for my situation? I dont want to do something if something is available out there. I am hearing SOAP, DBUS might work.

    I was thinking of using sockets .. if i can't find anything...

    Suggestions guys,

    baray98

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Inter App Communication

    Hi,

    what's about the examples Fortune Server and Fortune Client from the docs. Maybe you could you use them?

    Lykurg

  3. #3
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Inter App Communication

    I think you mean Inter-Process Communication (IPC). Depending on what you want to share you have various options. File mapping, mailslots, pipes, rpc...

    Since you want to communication with a builder program which may not take advantage of Qt, see here: http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx

  4. #4
    Join Date
    Aug 2007
    Posts
    275
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Inter App Communication

    thanks for the reply guys....

    I have some experience in using sockets in Qt. But I want to have a library so that my builder and Qt can use, and if i have to change something / change the way i am communicating on things, then ill just change it in my library...

    I need some good read on this actually to produce a good architecture in my library..Any body has some links of a good IPC systems?

    here are my reuirements if have to build a lib:

    There is only one thing in common in apps C++ so my lib should be in C++;
    The lib should shield my apps from shift of IPC technology , i.e if i move from SOCKETS to PIPE changed should be just in lib.


    suggestions of some GURU are most welcome,

    baray98

  5. #5
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Inter App Communication

    Before we can suggest methods, you need to tell us what you are sharing, sizes, frequency... Each method has it's own advantages and disadvantages.

  6. #6
    Join Date
    Aug 2007
    Posts
    275
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Inter App Communication

    okey .. Here we go ,

    I want my apps to send small information back and forth ,small in the sense that an app may send maximum of 255 bytes @ really low frequency ,everytime the user click to send messsage, no such thing as periodic sending of messages. The length of messages may grow if i will pick an XML format on my messages but..I am okey just sending it with my own format.

    I want every instance of these apps be discoverable on the network , (Maybe I should start with discoverable within the PC ) example if I have an app called QT1 and BORLAND1. QT1 has 2 instances and BORLAND1 has 3 instances then each app should see 4 targets. An app should be able to send and recieve messages to and from each target. Message content and format may vary between each app, adopting to what message format and content should be handled by the sender/client app

    An app can be a client ,when it tries to connect to a target , and it can be a server when some app is trying to connect to it.


    +++++ here's my plan+++++++++++++++
    I was thinking of having another SERVER type app that will act as a HUB in which all my app can connect. then in that token a client app can ask the server list of targets

    To connect to a target , an app will connect to the server then send its message through the server , server will route the message to its destination. Destination respond to the server, then server route it back to the sender

    I have no idea how to implement this yet.. I am leaning towards sockets,.. I may have problem when i go Inter network since my server will reside on each PC..

    Any suggestions?

    baray98

  7. #7
    Join Date
    Jan 2010
    Posts
    73
    Thanks
    6
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Inter App Communication

    Does the dbus module work on Windows (I use QT primarily on Linux)...

    http://doc.trolltech.com/4.6/intro-to-dbus.html

    http://dbus.freedesktop.org/doc/dbus-tutorial.html

  8. #8
    Join Date
    Aug 2007
    Posts
    275
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Inter App Communication

    i think they (DBUS) have a version or a branch for windows ,someone told me that Bonjour from apple might work for me... any thoughts on this one...

    baray98

  9. #9
    Join Date
    Jan 2010
    Posts
    73
    Thanks
    6
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Inter App Communication

    My did not intend to recommend downloading and using an external library. I was trying to recommend a possible QT library to solve the problem :-)

    I have never used Bonjour, but I thought that its claim to fame was finding services on the network; for example, printers or other computers. This portion may be a good fit, because perhaps this will help with the discovery portion of your task. Watch the license agreement carefully to make certain that it is compatible with how you desire to release your application.

  10. #10
    Join Date
    Aug 2007
    Posts
    275
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Inter App Communication

    I wish i could just stay in Qt library but I have another app from borland which I would like to communicate to.

  11. #11
    Join Date
    Nov 2008
    Location
    Italy
    Posts
    16
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Inter App Communication

    maybe MSMQ could do something for you....
    Microsoft Message Queuing http://www.microsoft.com/windowsserv...q/default.mspx
    bye

  12. #12
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Inter App Communication

    Mail slots come to mind. They work both locally and over a local network (but not over WANs such as the Internet). They function as a server-client relationship.

  13. #13
    Join Date
    Aug 2007
    Posts
    275
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Inter App Communication

    mail slot sound interesting ... any link? for a good read

  14. #14
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Inter App Communication

    Sure, explanation and example code: http://www.codeproject.com/KB/IP/mailslots.aspx

Similar Threads

  1. Example of SSL communication
    By Morea in forum Qt Programming
    Replies: 4
    Last Post: 25th January 2009, 23:41
  2. Inter-related QStandardItemModel
    By koosh in forum Qt Programming
    Replies: 8
    Last Post: 2nd July 2008, 22:42
  3. USB communication
    By M. Bashir in forum Qt Programming
    Replies: 1
    Last Post: 29th January 2008, 02:56
  4. inter widget communication
    By venk2ksubbu in forum Qt Tools
    Replies: 2
    Last Post: 14th November 2007, 04:57
  5. Inter Process Communication
    By yellowmat in forum Qt Programming
    Replies: 3
    Last Post: 20th July 2006, 11:44

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.