cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Refreshing continuations in long-running pages
Date Wed, 19 Oct 2005 08:31:17 GMT
Hi all,

There was a discussion on users@ recently [1] about how to ping a 
continuation for long-running pages such as document edition forms.

I proposed to create a PingContinuationAction that would simply update a 
continuation's last access time to avoid it to expire. That action would 
be called periodically using Ajax requests.

Now thinking further, I don't like to implement it as an action that 
much, as it requires people to add something in their sitemap that is 
purely infrastructure-related.

So rather than that, I was thinking to add a new system-defined request 
parameter named "cocoon-flow-refresh" what would be handled directly by 
flow engines.

In <map:call continuation="..."/>, the flow engine checks if 
"cocoon-flow-refresh" exists:
- if yes, this calls the continuation as usual,
- if not, this just updates the continuation, sending a 200 status if 
the continuation is still there and a 404 if the continuation is not 
found or expired (can happen e.g. when you put a laptop to sleep and 
continue several hours later).

Along with the 200 status, we can also send the continuation's 
expiration delay to avoid useless refresh requests (or also missing the 

No additional sitemap entry is needed, as it would follow the same 
matcher path as regular requests to call the continuation.

Convention over configuration, making it totally transparent and even 
allowing the CForms client-side JavaScript to do it automatically.




Sylvain Wallez                        Anyware Technologies
Apache Software Foundation Member     Research & Technology Director

View raw message