Periodic GUI for background process
- From: "Paul Davis" <pjdavis engineering uiowa edu>
- To: "Gtkmm Mailing List" <gtkmm-list gnome org>
- Subject: Periodic GUI for background process
- Date: Mon, 8 Jan 2007 05:41:25 -0600
Hey guys,
I've been struggling with the question about how to have a gui control
a background process periodically. I know the problem has been
discussed periodically on this list before but I wanted to see if
anyone had any insights that I haven't.
So basically the problem is this: Given that you have a long term
process (on the order of days to weeks) how would it be possible to
have a GUI control the process periodically (ie, occasionally open a
window to check on some sort of status).
The following list is the basic ideas that I've seen or had thus far:
1. Create a protocol and use socket io to control the background
process. The gui is contained in its own short lived process. I
generally like this idea, except that the code overhead is in my
opinion quite large.
2. Similar to using sockets, perform IPC using shared memory. Although
this approach has never seemed like a 'Good Idea (TM)' to me. Most of
my misgivings stem from the complicated synchronization issues
involved along with the seeming uncertainty of propery
synchronization.
3. Maintain the GUI as part of the background process and use signals
to show the GUI. This approach seems like it would be the easiest to
code and maintain. The only drawback I can see is that the background
process would have a gtk event loop running constantly which seems
like it could be a pain in certain circumstances (Like, I have no idea
what would happen if I started the program locally, and then tried to
open the gui over an ssh+xforwarding session.)
Anyway, those are the general ideas I've come across so far. If anyone
has comments or alternatives, I'd be glad to hear them.
Paul
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]