cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
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 
deadline).

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.

WDYT?

Sylvain

[1] http://marc.theaimsgroup.com/?t=112964263500004&r=1&w=2

-- 
Sylvain Wallez                        Anyware Technologies
http://people.apache.org/~sylvain     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


Mime
View raw message