From: | "Jeff Peck" <peck(dot)jeff(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Help with app design |
Date: | 2008-05-29 01:33:55 |
Message-ID: | e3d3805d0805281833y70dfa13j5d2c61fc291c4dc@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi all,
First - if this is the wrong spot for such a question, I apologize
ahead of time! I'm hoping someone who knows better can tell me if I'm
on the right track or not. I have written a desktop application that
is used throughout my company. This application is a wxPython GUI that
controls several 3270 terminal emulators in the background as the user
interfaces with the GUI. The terminal emulators are used for both
screen scraping as well as entering data automatically into several
systems, and due to company politics I cannot obtain the needed data
any other way.
My company wants to take this client program and convert it over
from a desktop application that runs on end user PCs to a web based
interface. This is where I'm hoping someone with more experience may
be able to offer some suggestions. As I stated before - even when I
convert this over to a web based system, I am forced to enter and
scrape data using 3270 terminal emulators (you can laugh if you want
to). The basic idea I have to make this work is as follows:
1 - Create web front end where the end user can enter jobs, view
existing jobs, and cancel any jobs that have not been processed.
2 - When user enters a job, the job would be inserted into a job queue
table on our postgresql db.
3 - All of the code using the terminal emulators would then be moved
into a deamon program.
4 - We would run multiple copies of the deamon program, and each one
would monitor the job queue table for new jobs to process.
The idea is that we would run as many copies of this deamon program as
necessary to make the system scale as needed. We could assign each job
in the job queue a status flag that would have a meaning such as "job
requested by user", "job assigned to deamon for processing", "job
completed", or "job cancelled". Each deamon would periodically check
for newly requested jobs, and for each new job found it would mark the
status flag "job assigned for processing". Then as each job is
processed the daemon would insert the job results into the db and then
mark the status flag as "job completed". This is where I hope you guys
can help. As this would be my first postgresql app, I'm not very
familiar with how locking works. Should I anticipate any sort of
locking issues with this design given that I would have several
daemons attempting to access/change several tables simultaneously or
will this be mostly transparent so long as I use transactions
correctly? I would also like to hear about it if you think this is a
very bad approach!
Thanks for your time!
Jeff Peck
From | Date | Subject | |
---|---|---|---|
Next Message | hobbes | 2008-05-29 04:58:06 | Re: Help with remote connection to remote Postgresql 8.3 Server... |
Previous Message | Klint Gore | 2008-05-29 00:17:03 | Re: small table, huge table, and a join = slow and tough query. cake inside! |