kansas-city-pm-list  

Re: [Poop-group] when an object persistence framework is too heavy.

David L. Nicol
Mon, 13 Aug 2001 11:09:57 -0700

[EMAIL PROTECTED] wrote:
> 
> On Fri, Aug 10, 2001 at 03:47:34PM -0500, David L. Nicol wrote:
> > http://www2.tipjar.com/davidnicol/perl/RYOpersistence.html
> 
> And it's so simple to use!  Just...
> 
> bless {IDKEY => $EventID,  map { s/%(..)/chr(hex($1))/ge }
>         map { split /=/ } split('&', Record)}  ;
> 
> And it's all done! :P
> 
> This is supposed to be simple?  Why not just use MLDBM with the little
> semaphore locking wrapper?  Or Persistence::Object::Simple.

I wasn't suggesting that the DIY approach was better, or clearer,
just that it is available.



 
> Instead of constantly opening and closing the DBM file, just open it
> once.  Your read/write locks are independent of the DBM file.

What about write collisions?  AIUI closing/untieing is the only
way to guarantee that your data has been flushed to disk.  That's why
the lock,open,interact,close,unlock discipline.


 
> IMHO, you're fighting a fight not worth fighting.  Simple persistence
> schemes rapidly collapse in the real world.  Work on wrapping simple
> interfaces around strong schemes instead.


No argument here.  In fact they collapse in the last paragraph of the
page I wrote.


-- 
                                           David Nicol 816.235.1187
"Tomato!"

  • Re: [Poop-group] when an object persistence framework is too heavy. David L. Nicol