On Dec 10, 2009, at 11:28 AM, Joseph Pecoraro wrote:
- 4.3.2. Changes to the networking model
http://dev.w3.org/2006/webapi/DataCache/#networking-model-changes
There are a couple cases I expected to see in the networking changes.
1. There are two branches to Step 10 for off-line and online
handling. Both start with:
[[
10.1 Select an `embedded server` server to...
]]
There is nothing specified for what to do when there is no embedded
server for the resource. My thoughts are that since the resource was
captured in a DataCache specifically with this dynamicMethod
specified, then there _should_ be an embedded server to handle it.
In the case where there is no embedded server, then it seems
appropriate to raise an exception here.
In case no embedded server is available, the user agent fetches from
the server. I have clarified this in the spec. This behavior makes
most sense.
2. In the off-line case there is a MutableHttpResponse that gets
written to by the interception function. Here is one of the sub-steps:
[[
10.4 Wait for the interception function to dispatch the dynamic
response.
]]
I think this is ambiguous. When does the interception function
"dispatch" the response?
- it can explicitly dispatch by calling MutableHttpResponse.send;
http://dev.w3.org/2006/webapi/DataCache/#response-send
This is the correct way.
However what happens if send() is not called? What happens when:
- the interception function exits (either by exception or naturally)
The normal network timeout logic should apply here.
My thoughts are that this should either:
- implicitly dispatch
- raise an exception and abort to normal behavior
I am currently siding with implicitly dispatching, which makes the
send() optional (and unnecessary?). Do you see any disadvantage to
this?
Implicitly dispatching is a problem since the interception function
may have to wait until a time some storage operation completes.
Nikunj Mehta
http://blog.o-micron.com