Results 1 to 7 of 7

Thread: QDBus on a network

  1. #1
    Join Date
    Mar 2007
    Posts
    57
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QDBus on a network

    Hi all,

    I've recreated the dbus chat example (examples/dbus/chat/) without much problems. However, I would now like to extend this example such that it is possible to chat with this application running on different computers connect by a network.

    First question: is this even possible with dbus?
    Second question: where to start?

    I can't find anything in the Qt docs nor on the forum/mailinglist, any help would be greatly appreciated! Only understanding I've gained so far is that I'll probably have to start a dbus server like thingie somewhere. However, qt docs for QDBusServer says: "The QDBusServer class provides peer-to-peer communication between processes on the same computer."

    Disclaimer: I'm not actually trying to create a chat program, it's just some experimenting to get to know dbus

  2. #2
    Join Date
    Dec 2007
    Posts
    628
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QDBus on a network

    Quote Originally Posted by TMan View Post
    First question: is this even possible with dbus?
    No, this works for process communication within same machine.

    Quote Originally Posted by TMan View Post
    Second question: where to start?
    See fortune server example. QTCPServer, QTCPSocket will do the trick.

  3. #3
    Join Date
    Mar 2007
    Posts
    57
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QDBus on a network

    Quote Originally Posted by yogeshgokul View Post
    No, this works for process communication within same machine.


    See fortune server example. QTCPServer, QTCPSocket will do the trick.
    Yeah, I understand that'll work if you want to reimplement the chat example. However, I was just extending this example to get some feeling for dbus, I actually *want* a bus based system, which is why dbus seemed appropriate.

    So, no dbus on a network with Qt then? This http://www.freedesktop.org/wiki/Software/dbus website says dbus can communicate through TCP/IP though?

  4. #4
    Join Date
    Dec 2007
    Posts
    628
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QDBus on a network

    Quote Originally Posted by TMan View Post
    website says dbus can communicate through TCP/IP though?
    This site says everything about DBus. But Qt-Docs only can tell you, what you can achieve using Qt-DBus. Means DBus is a general and more powerful but it depends how Qt have interface for that to us.

  5. #5
    Join Date
    Mar 2007
    Posts
    57
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QDBus on a network

    Let me elaborate a bit on what I really want, maybe someone has a good suggestion for some other technique or knows how to use dbus for this.

    The software we write is used throughout the lab. It's a software package used to control hardware and do some visualization and analysis. First thing we'd like is to have the software send its logging output to a central logging server for inspection by the software team in case something goes awry.

    If this succeeds, we would like to extend this such that for instance temperature values of the hardware can be shown on one or more remote machines. Imagine that there is one main command & control PC, while every hardware engineer involved can open up his own "temperature" screen to inspect status of the hardware, without causing the situation where 15 engineers are clustered around a single computer.

    Obviously, this can be done with TCP/IP as well. However, this involves keeping track of connections and setting ip-addresses and such, while dbus would be network transparent, i.e. one wouldn't have to write any network code.

    Any suggestions?

  6. #6
    Join Date
    Mar 2007
    Posts
    57
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QDBus on a network

    Quote Originally Posted by yogeshgokul View Post
    This site says everything about DBus. But Qt-Docs only can tell you, what you can achieve using Qt-DBus. Means DBus is a general and more powerful but it depends how Qt have interface for that to us.
    I see. So in other words, Qt hasn't implemented the full dbus specification? A bit of a shame then, really.

  7. #7
    Join Date
    Mar 2007
    Posts
    57
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QDBus on a network

    Okay, I've been reading a bit more and I now realize dbus is not the way to go for what I want. I realize it can be done with TCP/IP, but I would like to hear any suggestions after people read my explanation above for other techniques...

    Anyone?

Similar Threads

  1. Replies: 12
    Last Post: 22nd March 2009, 11:22
  2. Replies: 0
    Last Post: 5th February 2009, 23:41
  3. QFtp with no network connection
    By josepvr in forum Qt Programming
    Replies: 0
    Last Post: 19th November 2008, 15:03
  4. Checking network availability
    By fullmetalcoder in forum Qt Programming
    Replies: 2
    Last Post: 10th March 2008, 19:23
  5. QSocket - signal for network wire disconnection
    By manivannan_1984 in forum Qt Programming
    Replies: 7
    Last Post: 5th September 2006, 13:52

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.