Sounds like an HTML5 app on the client side? You can use SQLite in the client for offline and also on the backend for your main app if so.

Something I have done for edit collisions is to send a digest of the record with the form. It becomes a "known last edit token."

In DBIx::Class/Catalyst, e.g., something like-

# Token is sent with form. my $token = md5_hex(join("",sort $row->get_columns)); if ( $token eq $c->request->body_params->{token} ) { # Record hasn't been updated by anyone since the form was loaded. # Continue with edit/update... } else { # Warn about edit collision, pretty format diffs/choices # with Algorithm::Diff/Algorithm::Diff::Apply. }

As far as modperl, your deployment options will be limited. Unless you have an actual need of deep hooks in the request cycle + apache, there are "better" options today; nginx or lighttpd with Starman for example. I'd encourage you, strongly, to checkout Plack and the various web app frameworks like Catalyst, Dancer, and several other new ones.

Update: fixed syntax error in dummy code.


In reply to Re: How to deal with data race issues with Perl? by Your Mother
in thread How to deal with data race issues with Perl? by halfbaked

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.