473,841 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
+ 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 1564
[ PurpleServerMon key <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 intercommunicat ion 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:
[ PurpleServerMon key <PurpleServerMo n...@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 intercommunicat ion 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
PurpleServerMon key schrieb:
On May 25, 5:46 am, Sebastian 'lunar' Wiesner <basti.wies...@ gmx.net>
wrote:
>[ PurpleServerMon key <PurpleServerMo n...@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 intercommunicat ion 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
2430
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 good things are said about this language , I still have my doubts how can it compete with languages like C++ and Java. I have found te sytax and some features if the language not as problematic in maintenance prospective (although I keep reading...
23
2421
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 processing, arithmetic calculations - all in a DOS-like environment. What is particularly disappointing is the absence of a Windows IDE, components and an event driven paradigm. How does Python stand relative to the big 3, namely Visual C++,...
0
934
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 "Clean up the file" -logs.txt Since these 2 daemons will run every 2-5mins, I think this will crash, isn't
8
1981
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 GUI program includes a server, it should not have more than one instance. Is there any easy way to check if another instance of the program is
0
9865
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9706
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10609
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10303
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7851
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5692
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5881
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4498
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3140
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.