473,473 Members | 4,257 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Python, Daemons and D-Bus

Seeking feedback from group members on a design I'm looking at using
in a project.

I've created an XML-RPC server and a number of Daemons, the idea is
that the XML-RPC server gets a request from a user interface of some
sort and then sends data to the Daemon processes to do work. Daemons
will also need to feed back task information to the XML-RPC server.

For the communications between the Daemons and XML-RPC server I was
thinking of using D-Bus (The project is for Linux and *BSD) but wanted
to hear what others thought of the idea?

Would you use D-Bus or a more traditional IPC method such as sockets?
Although D-Bus is relatively new it looks interesting, just not sure
it would work well in this kind of project.

Thanks in advance for your thoughts and opinions.
Jun 27 '08 #1
3 1553
[ PurpleServerMonkey <Pu****************@gmail.com]
Would you use D-Bus or a more traditional IPC method such as sockets?
Although D-Bus is relatively new it looks interesting, just not sure
it would work well in this kind of project.
DBus is not really intended for private communication between processes of
the same application, but more for intercommunication between different
applications. If the IPC interface of your backend daemons is intended to
be used by other applications, DBus is the right choice, otherwise I would
choose something different.

The reason is, that DBus doesn't know about applications. It exposes all
objects registered on the bus to every DBus client on the system and so
makes you application-private API available to the public (and spams the
bus with lots of generally useless objects ;) ).

In case your IPC interface is application private, a custom IPC protocol
(probably using XML RPC over unix sockets) is better suited.

Moreover you should make your choice dependent on the type of data you
transmit. Both DBus and XML-RPC wrap calls into XML messages, which is
terribly inefficient for large binary data.

--
Freedom is always the freedom of dissenters.
(Rosa Luxemburg)
Jun 27 '08 #2
On May 25, 5:46*am, Sebastian 'lunar' Wiesner <basti.wies...@gmx.net>
wrote:
[ PurpleServerMonkey <PurpleServerMon...@gmail.com]
Would you use D-Bus or a more traditional IPC method such as sockets?
Although D-Bus is relatively new it looks interesting, just not sure
it would work well in this kind of project.

DBus is not really intended for private communication between processes of
the same application, but more for intercommunication between different
applications. *If the IPC interface of your backend daemons is intended to
be used by other applications, DBus is the right choice, otherwise I would
choose something different.

The reason is, that DBus doesn't know about applications. *It exposes all
objects registered on the bus to every DBus client on the system and so
makes you application-private API available to the public (and spams the
bus with lots of generally useless objects ;) ).

In case your IPC interface is application private, a custom IPC protocol
(probably using XML RPC over unix sockets) is better suited.

Moreover you should make your choice dependent on the type of data you
transmit. *Both DBus and XML-RPC wrap calls into XML messages, which is
terribly inefficient for large binary data.

--
Freedom is always the freedom of dissenters.
* * * * * * * * * * * * * * * * * * * (Rosa Luxemburg)
Thanks Sebastian,

Your comments make a lot of sense. I was thinking of creating a custom
session channel and using that for my purposes but as you mentioned
it's not very secure and I do want to keep the server to daemon
traffic private, the server has an XML-RPC interface with a public
API.

Will definitely look at using a different IPC mechanism for this part
of the project.
Jun 27 '08 #3
PurpleServerMonkey schrieb:
On May 25, 5:46 am, Sebastian 'lunar' Wiesner <basti.wies...@gmx.net>
wrote:
>[ PurpleServerMonkey <PurpleServerMon...@gmail.com]
>>Would you use D-Bus or a more traditional IPC method such as sockets?
Although D-Bus is relatively new it looks interesting, just not sure
it would work well in this kind of project.
DBus is not really intended for private communication between processes of
the same application, but more for intercommunication between different
applications. If the IPC interface of your backend daemons is intended to
be used by other applications, DBus is the right choice, otherwise I would
choose something different.

The reason is, that DBus doesn't know about applications. It exposes all
objects registered on the bus to every DBus client on the system and so
makes you application-private API available to the public (and spams the
bus with lots of generally useless objects ;) ).

In case your IPC interface is application private, a custom IPC protocol
(probably using XML RPC over unix sockets) is better suited.

Moreover you should make your choice dependent on the type of data you
transmit. Both DBus and XML-RPC wrap calls into XML messages, which is
terribly inefficient for large binary data.

--
Freedom is always the freedom of dissenters.
(Rosa Luxemburg)

Thanks Sebastian,

Your comments make a lot of sense. I was thinking of creating a custom
session channel and using that for my purposes but as you mentioned
it's not very secure and I do want to keep the server to daemon
traffic private, the server has an XML-RPC interface with a public
API.

Will definitely look at using a different IPC mechanism for this part
of the project.
If you can - use Pyro. It is easy, fast and can be made secure using SSL
AFAIK.

Diez
Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: limor | last post by:
Hi, I am considering using Python in a new testing tool application we intend to build for out product. I must get references before starting develope in this language , since although lots of...
23
by: gord | last post by:
As a complete novice in the study of Python, I am asking myself where this language is superior or better suited than others. For example, all I see in the tutorials are lots of examples of list...
0
by: Andrey | last post by:
HI i have a newbie question about the file() function. I have 2 daemons running on my linux box. 1 will record the IDs to a file - logs.txt other 1 will open this file, read the IDs, and then...
8
by: akineko | last post by:
Hello everyone, This may not be a Python specific challenge. I have a GUI program written in Python + Tkinter. It works very well. Now, I would like to start it from a shell script. As my...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.