Depending on the variable, I would be suspicious of whether IPC::Shareable is a net win.

Sure, the database is a point of contention in the site.

However shared memory that you access frequently can quickly become a bigger one. And any design based on using shared memory cannot be scaled by running on multiple machines. Given the scalability implications of that statement, I would work to avoid shared memory without first doing a detailed evaluation of why I thought it fit my problem.

And if I was going to use it anyways I would be inclined to hide it in a function call in a module that would memoize it upon first access in an interpreter. In other words I would work to make it as small a point of contention as possible.

FWIW I met Rusty (of Kuro5hin) last summer, and when he mentioned he was using IPC::Shareable in the released site this was my gut reaction. And indeed when his site was re-released and hit load, guess what component caused it to fall over?


In reply to Re (tilly) 2: Synchronizing variables (in mod_perl) across Apache instances? by tilly
in thread Synchronizing variables (in mod_perl) across Apache instances? by risacher

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.