On 1/9/07, Johan Compagner <[EMAIL PROTECTED]> wrote:
>
>
> - Align pagemaps and version management so that pages and versions are
> stored in, and retrieved from the same entity.
> - Change the SecondLevelCacheSessionStore so that it either saves
> pages without the version manager but rather exactly as they are at
> that moment or save the first version as a full page, and subsequent
> versions as changes. This would be my choice as it is more efficient
> in especially storing it, and storing is the part having a greater
> impact than retrieving.
> - Page should only use a temporary instance of IPageVersionManager and
> the newVersionManager method could be private imo as I don't see much
> use now users being able to provide their own (in fact, we could get
> rid of the IPageVersionManager interface). When endVersion is called,
> the changes would be flushed and saved to the pagemap and the version
> manager instance should be nulled.



4?> SecondLevelCacheStore  sets a IPageVersionManager, That manager is
almost completely dummy
except that it increases an page counter when the page is changed just like
the current one does.
then we generate the versionid but nothing more. And when we try to generate
an older page
the version manager will return null. Then it will go to the SecondLevel and
its IPageStore and reads
the right version in from disk.

I think we should try to keep the changes mechanism (though in a
different form), and save changes for versions rather then the whole
pages; serializing pages is pretty expensive and as it is an operation
we'll be performing every request, we should optimize where we can.

One small problem then. Then i can't save pages in the background. I have to
do it before the request
ends. Because if i don't do that and the page is already altered again
before we save the page we loose that specific version.....
(or that page has to be locked before we can access it again.... that needs
te be done anyway i guess)

That async saving mechanism would have to be sophisticated for sure.
But you can have a temporary in-memory cache that you poll first. The
(lower priority) saving process then takes versions from this cache
and writes them to disk, after which they are removed from the cache.

Eelco

Reply via email to