DBUS IDL, XML and FIFO?
Andreas Volz
lists at brachttal.net
Sun Jun 8 13:18:47 PDT 2008
Hello,
In the past I implemented an binary IPC protocol to communicate between
two processes. A simple point-to-point solution. I think it's very
fast. But it's in prototype state and it'll took many of my time to
finish it. So I think about switching to DBUS. Maybe you are able to
answer some of my questions below and help me to decide which way to go.
My prototype runs in Linux. I used FIFOs as communication channel. Not
sure about the speed compared to UNIX domain sockets. But I could
access it from Java without JNI.
So my first question is what you think about FIFO communication in
DBUS? Are there any reasons against it? Ideas about speed?
I use C++ and Java in my applications. I've seen that there's a Java
implementation of DBUS. But what's about C++?
In DBUS the message is build dynamic while runtime. My implementation
builds a message while compile time on both sides. In future I planned
to use an IDL to generate that code for client and server. Much like
common RPC mechanism.
I like the idea to simply call a remote function instead of building
messages the DBUS way. So I thought about to generate interfaces but
with DBUS functions as low level communication instead of my own RPC.
Has someone done something similar?
I found this:
http://www.dwheeler.com/dbus/
Not sure if this fits for me. Has anyone tried it?
I tried the dbus-binding-tool with a simple XML example. Works good,
but the C code doesn't fit into my C++ design. Is there a
dbus-binding-tool that generates C++ classes?
Is the DBUS reference implementation thread save? So what happens if I
put two messages from two threads the same time into DBUS?
regards
Andreas
More information about the dbus
mailing list