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? |