On Mon, Nov 30, 2009 at 8:56 PM, Oleg Kobchenko <[email protected]> wrote:
> No, the intent of the proposal is exactly the same behavior
> of the client and the server, with only two exceptions:
>
>  - HTML is generated at the client
>
>  - unless the whole page is explicitly refreshed (as in
>   reopening the page including bookmark), each command
>   execution results in transfer of only this command's result
>   and not the whole session transcript.

Ok but that is not the "exactly the same behavior".

For example, currently, if I have the same session
open from multiple machines, I get different behavior
from your current proposal.

That said, your initial proposal said nothing about
refreshing the page and with further additions to
the proposal "exactly the same behavior" could
be achieved.  (Namely, that each browser has a
"session version number" and a "session index",
which it sends with each request for update to the
server, which lets the server craft an appropriate
response.  Also, the server response should
probably be JSONP.)

And, with that background, and with sufficient information
about the state of the client at the time of the request,
and using XMLHttpRequest we could change the
"current behavior" of jhs to make it more closely match
J6.  Specifically, we could ensure that the browser always
has a pending request to the server.  If it  times out, or
fails, the browser could make another request.  This would
let the server post asynchronous updates to the client.
There are a few race conditions here (what happens if the
server sends a response right when the browser is requesting
an update based on user input?)  But if the server sends
back to the client those state variables, the client can
recognize responses based on obsolete state.  [And, in
the simplest implementation, the client asks the server again
for an update when it gets a response based on obsolete
state.]

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to