If so, I'll have to ensure that this behavior finds a way to "mark" anything with irreversible side-effects or simply identify and disallow them.
So, you want a transaction. If all your actions are done in a database, then it's easy: just begin a transaction, commit if you succeed doing all parts of your pipe, rollback otherwise.

If everything happens in a filesystem, and you have a filesystem that allows snapshots on demand, it's pretty easy as well. Make a snapshot, do whatever you're doing, and if it fails halfway, restore from your snapshot.

On a grander scale, if all your data is on a SAN, you might want to take a business copy. Then you suspend a copy, do your business, and either resync from the live copy or the suspended copy, depending whether there's success or failure.

But without knowing more about the programs you're running, I can't suggest anything more specific.

Note however that this problem of needing to be able to rollback isn't related to whether you manage to encode all the steps in a single URL. If the request would be in the body of a POST request, you'd have the same problem. Or if you'd write it in a Perl program without the web overhead.

Perl --((8:>*

In reply to Re: (OT) URL Pipes by Perl Mouse
in thread (OT) URL Pipes by Ovid

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.