cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Washeim <esa...@canuck.com>
Subject Re: Blocking of simultaneous requests
Date Tue, 31 Oct 2000 14:25:43 GMT
on 10/27/00 1:35 PM, Marcelo F. Ochoa at mochoa@ieee.org wrote:

> Hi,
> we're using Cocoon 1.8-dev in our environment.
> The pages we display, make heavy use of our database.
> We just now found out that we have a major concurrency problem.
> It looks like this was introduced with the private class "Block" in
> org.apache.cocoon.Engine.java.
> When one user requests a page (i.e. display-data.xml) and another user
> requests the same page, the second request is blocked until the first one is
> finished. But since the data generated in display-data.xml is dynamically
> gathered from the database, the caching is not used. So, for us it looks
> like this blocking mechanism does not make too much sense for dynamic data.
> We now removed the whole blocking mechanism from Engine.java and our
> application runs a lot faster now.
> Good point!!.
> I didn´t check the code of Cocoon 1.8, but if this is right could be decrease
> a LOT the perfomance of DB Prism producer. This producer works as another
> producer for Cocoon generating the XML content through a Stored Procedure in
> the DB side and the concurrence problem is problem of the Database.
> 
> What is the correct operation of the Block class mean't to be?
> Should it funtion differently when caching is and isn't enabled ?
> I´ll check the code of the engine.
> 

The intention of the block inner class was simple. If caching is to work on
particularly cumbersome documents (for instance ones that require massive
XSLT transformations) without bringing the JVM to a grinding halt under
conditions of high concurrency, the block class ensures that the document is
in cache. 

Of course this is predicated on the idea that documents are coming of disk.
It's tricky. The concurrency issue shouldn't be dealt with in the Engine
class, but we had no choice when working with the document bases we were
working with. 

We'd like to move the concurrency handling to another layer, just haven't
had time . . . 

Regards,
mark Washeim
Large Medium AB

-- 
Mark (Poetaster) Washeim

'On the linen wrappings of certain mummified remains
found near the Etrurian coast are invaluable writings
that await translation.

Quem colorem habet sapientia?'

Evan S. Connell

 



Mime
View raw message