Mailing List Archive

Re: Persistant objects
Quoting Dale Amon:
:Over the weekend I tossed together an Archiver class and a root Object
:class to provide default behavior. It is really quick and dirty and
:the output files are rather wordy, and it doesn't handle a number
:of Perl types, but it does allow objects with scalars, pointers to
:object, arrays and hashes to be written to disk by one program
:and read in by another. Of course if the other program doesn't
:impliment the code your object won't bless, but hey... it's only
:a weekend's work :-)

If your archiver is written in Perl, then it will hardly have decent
speed for 1Mb and more data. I've implemented both a C and a Perl
version of persistant objects, and apparently, C beats Perl by a
speed factor of 20, if not more.

Have you looked at my Storable-0.1 extension, on CPAN? If not, please
do. It looks like you're re-inventing the wheel again.

How many distinct persistant object packages do we want?

Raphael

P.S.: BTW, Gurusamy, I'm still waiting for your code to integrate it into
Storable-0.1...

P.P.S: We should really agree on a set of minimal features required for
persistency and stick with it. Then make the Storable extension (or
whatever it gets named) part of standard Perl. Based on the amount of
people getting the same thing done again and again, there is surely
a need that need to get filled up, quickly.
Re: Persistant objects [ In reply to ]
I'll have to take a look at your package. Does it message the
objects at the appropriate times during the unarchive and does
it allow them to select which data they wish to put out during the
archive process?

You have to have a root Object Class to do it "right" in the OO purist
sense so that all objects inheirt the basic methods for replying to
the archive and unarchive process.
Re: Persistant objects [ In reply to ]
Raphael Manfredi writes:
> P.P.S: We should really agree on a set of minimal features required for
> persistency and stick with it. Then make the Storable extension (or
> whatever it gets named) part of standard Perl. Based on the amount of
> people getting the same thing done again and again, there is surely
> a need that need to get filled up, quickly.
>

Well, I iterate that what we need is the frozen _interface_ to such
guys. And possibly n-byte signature at the start. I spent some time to
write such an interface and a proof-of-concept implementation.

I think that the people who wrote a C-based solution should look into
docs and voice what should be changed. After this eval-based
implementation _should_ be added to the core distribution.

Ilya