I'd imagine Storable is faster but here's something fun to look at.

You might like to check Lincoln Stein's page on Boulder.

"Boulder IO is a simple TAG=VALUE data format designed for sharing data between programs connected via a pipe. It is also simple enough to use as a common data exchange format between databases, Web pages, and other data representations."

I have not benchmarked the serialization, but his Wormbase handles 2 gigabytes of genetic data and seems pretty quick.

With Boulder IO you can make nested data structures, and you can just pull the tags you want out of a boulder stream letting other tags pass through to other programs in the pipeline. A boulder is made of a stone which can hold smaller stones; stones are stored in a berkeley dbm. Don't know how tough it would be to roll support for another db. From the docs it would seem that with the tags() method you can glean some information from the ascii tag of a deeply nested stone without unpacking its data.

Thought this might be a conceivable way to share data.. but do note that a Fcntl lock keeps users from reading while a write is going on.

Anybody else with experience using boulder io, would love to hear it.


In reply to Re: Sharing data structures in mod_perl by mattr
in thread Sharing data structures in mod_perl by Hero Zzyzzx

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.