App implementation help needed

Dave Swegen dswegen at software.plasmon.com
Mon Jul 15 06:56:57 EDT 2002


I'm currently designing the second part of a little pet project of mine,
and run into a wall regarding how to proceed, and would much appreciate
some assitance in figuring out in which direction I should go.

The setup is as follows:

A daemon has a queue of times when it should perform an action that
involves fetching some data from a web site.

These times, and associated data (which end up customising the URL), is
to be provided by users via a web interface.

The user provided events, as well as some user data (username, password)
need to be stored.

The program will in the first instance be running on Linux, but if for
no extra cost I can make it run on other platforms that would be nice
(but not at the cost of simplicity).

All pretty simple stuff in itself. My problem is how to tie together the
different parts (web interface, updating queues, calling a certain function
at a certain time with certain user provided data).

Are threads the best/easiest way to achieve this? Are fork()s sufficient?
Or would having the web interface based on asyncore allow me to avoid
using threads/forking entirely?

Is using the Queue module appropriate, or would a list be sufficient?

Would using sleep(1) in a loop be sufficient (I need second precision,
so cron is not really an option), or would sched be more appropriate?

I don't want to use a full DB, so should I go with pickling or anydbm?

So, lots of questions, probably not enough background information, and
somebody who is rather overwhelmed by the options avaliable.

I'm hoping to keep this as simple as possible, so please, be gentle :)

Any help much appreciated.

Cheers
    Dave





More information about the Python-list mailing list