D-BUS PHP Bindings
One of the project I am working on right now involves the GNOME based architecture, including lots of usage of scratchbox Aphophis R4, having GTK+ running under kdrive and D-BUS as unified IPC mechanism. As this project also involves the web-interface I had decided to go for lighttpd based web-server backed with PHP as server side scripting language. So, now what is the problem?
As for GTK+, it internally uses Glib + GObject combination so it is not tough to decide to go for dbus-glib bindings for writing dbus services. So, far so good, but for clients which doesn’t having native language dbus bindings? Yes, we wanted to call one of this dbus-glib written service using PHP, and as of now there is no stable d-bus PHP binding available, so we can’t write d-bus based client directly into the PHP, until we use “exec” and call C binary which internally uses the dbus-glib. But this is not scalable solution, as I wanted to write signals based mechanism with PHP, and we might end up writing the so many small applications, which duplicates the lots of work, as these functionalities also need to be shared from GTK+ OSD application.
As thee is no stable PHP d-bus bindings, we have written small C library, which wraps these dbus-glib based client into nice API clean interface, which doesn’t expose any d-bus structures, but again here the limitation is that How can we expose the async callback methods which needs to be registered from the PHP.
More on this will come later…stay tuned !!!