All:
I come to you seeking advice with no code and only a little bit of research. Some of you who have heard me in the CB know how much I detest coding anything WWW/HTTP/CGI/web related. My next project will push my abilities in these areas to their limits.

Overview: The code will take items off a work queue, post the information to an external web form, put the results in an out queue for further processing (by another process). The work queue will never become empty as new items from earlier on in the assembly line will continuously be added. I am fairly sure WWW::Mechanize is the one of the right tools for the job.

One of the first things I am not sure about is how to handle the work queue:

Ideally, I would want it to be smart enough to start up new processes when it determined it was not keeping up with the work queue, kill off workers when they were not needed, and also be aware of system resources so that it would not bringing the system to its knees.

Error handling is also a concern. First, I want to be sure there is a good locking mechanism so two workers do not attempt to work on the same item from the work queue. Additionally, if there is a problem with the form processing I want it to be re-tried a configurable number of times before being placed in a "bad queue".

I also have no idea what my work queue should look like. Beyond a single flat file, very simplistic database, or a queue directory where each file is a work item - I don't have the first clue as to what to use.

What I am looking for is working code that addresses one or more of my concerns. I am quite capable of splicing together what I need to meet all my requirements or figuring out how to modify the code to suit my needs. I understand it is typically hard to help someone who doesn't provide sample data and desired output. It is the framework itself that is my problem - I can handle the data munging myself.

Thanks in advance for your time and consideration in this matter.
L~R


In reply to Managing a web form submission work queue by Limbic~Region

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.