what is status of Pier-FilesystemPersistence

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

what is status of Pier-FilesystemPersistence

Yanni Chiu
I've been looking at Pier-FilesystemPersistence, and have a few questions.

The version comments seem to indicate it is still a work in progress.
What work remains to be done?

It looks like the change history is not persisted. What's a good way to
do that - individual xml files, or a change log?

The usage scenario seems to be: start image, import kernel, save pages.
Would it be possible to do a lazy read of the kernel, instead of reading
it in entirely, at image start up?

How does it compare with SIXX persistence done for VA Smalltalk?

--
Yanni Chiu

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: what is status of Pier-FilesystemPersistence

Jan van de Sandt
Hello Yanni,

The idea of the Pier-FilesystemPersistence package is to have an export/import and persistence mechanism that stores the tree of PRStructure objects in a directory tree. Each instance of a subclass of PRStructure is represented by a single xml file. The xml file contains something like this:

<PRPage name="about">
    <title>About this website</title>
    <document>bla bla bla</document>
    ....
</PRPage>

With the current version you can export a Pier website to such a directory tree. Or a zip file containing such a tree. I am still working on using this functionality as a persistence mechanism. A few commands are already implemented but not all. And I haven't figured out yet how to handle the change history. One of the ideas I want to try out is to manage the directory tree with a SCM like subversion.


On Tue, Nov 9, 2010 at 7:42 PM, Yanni Chiu <[hidden email]> wrote:
I've been looking at Pier-FilesystemPersistence, and have a few questions.

The version comments seem to indicate it is still a work in progress. What work remains to be done?

It looks like the change history is not persisted. What's a good way to do that - individual xml files, or a change log?

The usage scenario seems to be: start image, import kernel, save pages. Would it be possible to do a lazy read of the kernel, instead of reading it in entirely, at image start up?

Not yet. I think something like this can be implemented but it will require some changes to the Pier code. You need some kind of hook in the childrenDecoration od a PRStructure.
 
How does it compare with SIXX persistence done for VA Smalltalk?

I don't know SIXX very well but I think it is a generic serialization mechanism for Smalltalk objects to XML. You don't have control over the xml schema with SIXX. And I'm not sure if it is possible with SIXX to store groups of related Smalltalk object in separate files.

Pier-FilesystemPersistence uses the package Magritte-XMLBinding. WIth this package you can control the way Magritte objects (like PRStructure) are serialized to xml.

So it is still work in progress. If you want to have a look at it, you can load it using the following Gofer script (I use a Pier2 image from the build server of Lukas Renggli as a base image):

"XML Support"
Gofer new
squeaksource: 'XMLSupport';
package: 'XML-Parser';
load.

"Load Filesystem"
Gofer new
renggli: 'fs';
package: 'Filesystem';
load.

Gofer new
renggli: 'magritte2addons';
package: 'Magritte-XMLBinding';
load.

Gofer new
renggli: 'pier2addons';
package: 'Pier-FilesystemPersistence';
load.

Jan.



_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: what is status of Pier-FilesystemPersistence

Yanni Chiu
On 10/11/10 4:07 AM, Jan van de Sandt wrote:
>
> So it is still work in progress. If you want to have a look at it, you
> can load it using the following Gofer script (I use a Pier2 image from
> the build server of Lukas Renggli as a base image):

Thanks for the background info. I've already loaded it, and saved a Pier
kernel to disk, and restored it into a somewhat working site. I had to
use an older version of XMLSupport to have the tests pass, because the
latest XML code outputs some spaces in different positions than before,
so some string compares failed.

I'm actual looking for a way to externalize the Pier kernel content, so
that no image save needs to be done.

I will try to look into how SIXX is utilized to save Pier content.

--
Yanni

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: what is status of Pier-FilesystemPersistence

NorbertHartl

On 10.11.2010, at 17:27, Yanni Chiu wrote:

> I will try to look into how SIXX is utilized to save Pier content.

It just works. Sixx writes out the complete object graph and can read it back. Besides encoding there is less surprise to expect.

Norbert


_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: what is status of Pier-FilesystemPersistence

Yanni Chiu
On 10/11/10 11:45 AM, Norbert Hartl wrote:
>
> On 10.11.2010, at 17:27, Yanni Chiu wrote:
>
>> I will try to look into how SIXX is utilized to save Pier content.
>
> It just works. Sixx writes out the complete object graph and can read
> it back. Besides encoding there is less surprise to expect.

That sounds like a good enough solution. As the change history grows,
then start up time may become an issue, but that's down the road.

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki