PDA

View Full Version : QDBus on a network



TMan
7th August 2009, 15:01
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 :)

yogeshgokul
7th August 2009, 15:20
First question: is this even possible with dbus?
No, this works for process communication within same machine.


Second question: where to start?
See fortune server example (http://doc.trolltech.com/4.5/network-fortuneserver.html). QTCPServer, QTCPSocket will do the trick.;);)

TMan
7th August 2009, 15:31
No, this works for process communication within same machine.


See fortune server example (http://doc.trolltech.com/4.5/network-fortuneserver.html). 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?

yogeshgokul
7th August 2009, 15:36
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.;)

TMan
7th August 2009, 15:37
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?

TMan
7th August 2009, 15:39
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.

TMan
7th August 2009, 16:15
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?