cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Sutic" <>
Subject RE: [RT] On building on stone
Date Fri, 26 Mar 2004 18:21:28 GMT

> From: Pier Fumagalli [] 
> Why? If a request fails because I reloaded the XSLT Transformer block,

> well, I'm ready to loose that request... Cocoon is a servlet, at the 
> end of the day, and I'd rather loose XSLT translation for 1/2 
> a second while I reload the XALAN block, than wait 10 minutes while I 
> reload the JVM, as I can't reload XSLT because every single Pipeline
> my sitemap is locking on it, and (of course) I will never ever be able
> reload it until the traffic on my website goes down to ZERO...

In all read/write lock implementations I've ever seen, having a pending
writer means that readers queue up. That is, you'll have to wait
until all *currently executing pipelines* have finished. Then you'll
get your write lock and can swap the block. All pipelines that
tried to lock the component after your request to acquire a write
lock will have queued up, and will start executing as soon as you
release your write lock.

But the point here wasn't really to argue specific cases, was it?

> Dude, don't get upset, I'm not thinking about the holy grail here, I 
> _DO_NOT_WANT_ to write another Avalon, I want Cocoon to have a 
> container tailored EXACTLY for its own requirements, being a servlet 
> and all...
> Let's not forget that we work on HTTP connections, and that at any 
> given point in time, those can be disconnected, time out, or your 
> network admin can unplug the cable...
> What's the difference between that, and loosing the connection for a 
> second with a component? Thing, that (by the way) will _NEVER_ happen 
> automagically, but only when the administrator decides that it's time 
> to reload a block instance?

Because I think that you are trading a little complexity in the 
container for a lot of complexity in the blocks.

Then again, that's *my* VHO.

Basically the question is this:

    Is the code expected to handle a swap of a block gracefully?

If a block swap really is like unplugging a network cable, or toasting
the switch/router, then code should just re-throw the exception and
exit abruptly. However, if the code is somehow expected to recover, then
I think that there should be some mechanism whereby the swapping is
made invisibly to the code (i.e. when the block isn't used). Otherwise
the amount of error-handling code will become impractical.


View raw message