Hello fellow perl followers!

I have worked on this problem for a while and tried a few modules and solutions:

I need to have one process write to several message queues and then have one reader for each message queue - and it needs to be efficient and scalable.

Basically, the writer process inserts credit card transactions into the database and then forwards the row id to several message queues - and then each reader reads from one of those and processes those transactions further. Some of the readers are a bit slower than the writer, so when we process files there will be a bit of a buildup in the message queue every hour - which is why the solution must be scalable.

What I've tried so far is IPC::Shareable - that was very slow, IPC::Sharelite + Storable - it doesn't scale well enough and a self-made database solution - I maintained a table where I would write a name and a transaction id, and then the readers would get and delete rows from that table.

The self-made database solution actually worked the best - but there are bugs in the DBD::DB2 driver that are triggered from the code - and believe me, I've tried to get around the problem!

So - now I'm looking for a new solution, one that is preferably free. I'm considering using sockets, but I understand I will encounter problems because of the asynchronous nature of my processing? How about using berkley data store - would that work?

It would make me happy if it is possible to make the solution reboot-safe. Also - I'm currently on perl 5.6.1 and would prefer not to move - because of this, anyhow.


In reply to Efficient IPC by Jeppe

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.