Garrett Goebel <[EMAIL PROTECTED]> writes:

> Several people have mentioned a desire to see Perl6 and Parrot facilitate
> object persistence. Should such issues be tackled in Parrot? Will there ever
> be a Parrot Object Database that we can serialize our Perl, Python and Ruby
> objects into, to be used at some later date in code written in Jako?
>
> If an appropriate parrot topic, I'd be especially interested to hear the
> thoughts of people like Sam Vilain, Dave Rolsky, Piers Cawley, and others
> who've already spent a great deal of tuits tackling these issues.

All I want is good object serialization. So I can say to an object
'write yourself to this stream' and have that do the right thing (ie,
all the objects that are reachable from an object are serialized
before that object, with any cycles broken. It's not much. The trick
is defining the protocol of our stream classes so that we capture
enough information. 

For bonus points it would be nice to be able to serialize a class so
that one could send an object of an arbitrary class down a stream and
know that, even if the object is later deserialized in a system which
doesn't have the appropriate modules the object can still work. But
that's probably something you'd do in a stream filter. 

Oh yeah, and 'Object' should have an C<instantiate_from($stream)>
method, or what would be the point?

Once I have a simple, stream based serialize/deserialize mechanism
it's relatively easy to add pretty much any datastore management
mechanism I want on top of it.

Oh yeah, for extra bonus points, I'd like to be able to override the
way Perl manipulates instance variables so I can track whether an object
is modified during its 'in memory' time, that way I can write a
storage system that's efficient about which objects it writes back to
the database on a commit. (I can work scary mojo with having every
object carry 'round a flattened copy of its old self, but that's
rather expensive...)

Note that I only need to do this when a database manager is in place,
and I only need the override on unmodified, managed objects. Most of
this stuff is available, at a cost (to both speed and programmer
sanity) in Perl right now, but I really, really want nice
interfaces.

-- 
Piers

Reply via email to