You can have your cake and eat it, too. If you abstract the persistence code into a class of its own, you can pass instances of this around without tying your framework to any specific persistence media. You just (a big just, though) have to define a consistent interface to your persistence class and can then hide access to a certain variety of SQL database, flatfiles, DBMs or whatever you may wish to use inside it, without giving up any maintainability. In fact, you're actually gaining another degree of maintainability. The extra layer costs some performance over the hard-wired approach of course, but it can be a relatively thin layer with only minor impact, and if your app is anywhere near as I/O-heavy as one might suspect by your description, it won't make any real difference.

"Every problem in computing can be solved by adding another layer of indirection."
(Another quote I'd love to know the originator and exact phrasing of.)

Makeshifts last the longest.


In reply to Re: Performance v's Maintainability by Aristotle
in thread Performance v's Maintainability by Ryszard

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.