D-BUS and PHP backend
soni.trilok at gmail.com
Fri Feb 8 10:47:44 PST 2008
On Feb 8, 2008 7:40 PM, Matthew Johnson <dbus at matthew.ath.cx> wrote:
> On Fri Feb 08 18:26, Trilok Soni wrote:
> > Hi All,
> > I am working on an application, which provides the web interface,
> > where we use following combination of programs:
> > 1. Lighttpd as webserver
> > 2. PHP as backend with fast-cgi support
> Are you tied to PHP? If you used some sort of Java servlet you could use
> the existing Java bindings?
As my system runs on ARM9 DaVinci, running at approx 300 MHz, I am not
sure I can have the above support. Front-end pages uses HTML +
processing can be done by calling php-fastcgi script, which internally
calls the module libraries, which are purely written in C and using
dbus-glib bindings to export their methods/signals e.g motion
detection, camera capture/encode etc. But now looks like that we need
to wrap those libraries in to tiny applications which we can call
under system(...) call in the scripts or hide the dbus call under
small wrapper libraries and use php "c" extentions e.g Zend stuff.
> The other alternative of course is to use system() to call out to a
> command line client.
Yes, system(...) call approach only looks like the only way if hiding
dbus calls under small libraries with php "c" extensions doesn't work
> I'm not sure anyone has really done cgi dbus before, certainly not in
> PHP. Ideally you'd write dbus-php bindings so that others can do the
> same, but that may be a lot of work.
Yes, this looks like interesting project. Even though I don't have any
PHP back-ground, I knew only Linux kernel programming :(.
> I don't know SWIG, so can't comment on that approach.
SWIG is very simple IDL like approach, of calling APIs of program
written in different languages.
More information about the dbus