[maemo-developers] web based local application GUIs

From: Jesse Guardiani jesse at guardiani.us
Date: Mon Nov 26 23:13:50 EET 2007
On 11/26/07, Igor Stoppa <igor.stoppa at nokia.com> wrote:
> > On demand sounds great in theory, but let's think about it for a
> > second:
> > How do you start on-demand a web app? (HTTPD daemon)
> > How do you play the next track when the current track finishes
> > playing? (Kagu daemon, or FastCGI Kagu daemon + HTTPD daemon)
> Yes, that's the intrinsic problem of using an http-based approach.
> You rely on the http daemon being nice.

You gain a lot from having an HTTP daemon though. You gain a consistent GUI
(html + browser) and a common development methodology (web application
development) that many programmers are already intimately familiar with.

You also gain the ability to use a high level language for GUI work while
still having a very fast startup time (theoretically, I haven't tried it

You gain the ability to use CSS for application theming.

You also gain portability. No more wondering why the strange PyGtk
Hildonization hack you had to do back in Bora no longer works in Chinook. In
fact, you no longer care if you're on chinook, bora, gregale, or the
internet at large. It doesn't matter. All you need is a web server and a web
browser and you're good to go.

> Kagu is used very similar to a daemon. It runs as long as you're
> > playing music. And if that's all you use an n800 for then it's always
> > running. It might even be in the background if you're taking notes or
> > browsing the web. The difference is that it has a GUI right now. I'd
> > like to make that portion optional to save some memory/CPU when you
> > aren't using it. I'd also like to make startup time faster, and I'd
> > like to make a web frontend for it.
> Then you have to make sure that it will have 0% CPU residency, otherwise
> you'll be stealing playback time from your use-case.
> And you'll be taking memory no matter what, but hopefully not too much.

Yes. I've already written Kagu using pygame. I've had to deal with CPU
utilization and playback more than I'd like to admit. It would be
significantly easier to handle without a GUI because I wouldn't have to
worry about maintaining a consistent frame rate in pygame at the same time.

Also, if you choose this approach, it is worth mentioning it in the
> release notes of your application, so that users don't get the false
> impression that your sw is harmless to battery life.

meh. Never mentioned it in Kagu. Once I screwed it up and people complained.
We fixed it quickly and people forgot it ever happened. That's just another
useful thing about using a browser for a GUI IMO.

> No, I don't mean an always on daemon. I mean an on-demand daemon. A
> > background process that runs when you need it and doesn't when you
> > don't.
> I'm not a userland guy, but for what i remember, dbus should be able to
> start for you services that are not running, and dbus is _already_
> running all the time.

Hey, there's a useful bit of info! Thanks! I forgot all about that. So the
Kagu daemon could be started via dbus and kill itself when it runs out of
useful work to do. The frontend could then run using the normal mod_php
mentality (page based) and start the backend automatically using dbus when
it needs it, continuing to query via dbus any time it needs to communicate.

Jesse Guardiani
Software Developer / Sys Admin
jesse at guardiani.us
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20071126/2ffc672b/attachment.htm 
More information about the maemo-developers mailing list