On the other hand, the use of message queues is on the increase I believe, especially where there are unlimited front end clients. The advantage is that whereas front ends are asynchronous including the immediate server processing, the message queue then synchronises the requests as a first step to controlling the threads optimally, whereas a file lock forces all processes to wait, often unnecessarily. Typically for mobile apps, a device server forwards requests via a message queue to a transaction manager and waits for a response before displaying back to the device. Although both are daemons, the device server performs asynchronous multiprocessing that needs no concurrency control, whereas the transaction manager relying on the synchronisation from the message queue, (that's all it is for) can choose where to control concurrency using up to say 16 threads, e.g. let the DBMS do its own locking while on the other hand preventing concurrent update to a storable. This improves the response time as compared with making all clients wait for a single lock.

One world, one people


In reply to Re: How to do atomic file locking? by anonymized user 468275
in thread How to do atomic file locking? by Acapulco

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.