Respected monks, once again I come to thee with a question for which I seek your wisdom and guidance.

At present, I am involved in a project which requires multiple instances of the project spread across multiple systems to contact a centrally-located database containing the action to perform, and, once done, report the results of the actions.

My current quandries appear to boil down to a question-how can I write atomic or semi-atomic functions so a catastrophic failure has less of a chance of having dire consequences?

An example of the items I have considered thus far where I can see this ability to be advantageous include:

Because of the importance impressed upon me regarding this project, I have to assume there is the possibility of having to handle worst-case scenarios in which other safeguards (such as UPS systems or redundant switches) cannot be relied upon.

I have been trying to do some research into these, digging into the error handling subsection in Programming the Perl DBI, the Super Search, and such postings as The art of error handling.

I think I am correct in assuming that a 100 percent solution for operations requiring multiple processor instructions is not possible, and I do not discount the idea that there are some events which I cannot protect against. I also assume that eval and closures will also factor in (among other possibilities), but I have been known to be wrong before, so please correct me if I am barking up the wrong tree, or if I am even in the wrong forest.

Your attention and wisdom are greatly appreciated.


In reply to Regarding the writing of atomic or semi-atomic processes and instruction sequences by atcroft

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.