#7254: [with patch; needs review] sagenb notebook: automatic worksheet
refreshing
and synchronization
---------------------------+------------------------------------------------
Reporter: was | Owner: boothby
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-4.2
Component: notebook | Keywords:
Work_issues: | Author:
Reviewer: | Merged:
---------------------------+------------------------------------------------
Comment(by mpatel):
Below is an example, I think, of Harald's race condition, with a local
server. I instrumented the indicated functions in `notebook_lib.js`. The
last number on each line is my Firefox 3.5.3 tab's `state_number` when "I"
call `console.log()`.
{{{
worksheet_command: alive NOCHANGE 161 # I'm sending an 'alive'
command and not increasing my state_number.
server_ping_while_alive_callback: NOREFRESH 161 # The response matches my
state_number, so I'm not refreshing.
worksheet_command: eval INCREASED 162 # I 'eval'ed (shift-
enter) an auto-updating interact cell with a color control, so I increased
my state_number.
worksheet_command: cell_update NOCHANGE 162
worksheet_command: eval INCREASED 163
worksheet_command: cell_update NOCHANGE 163
worksheet_command: cell_update NOCHANGE 163
worksheet_command: cell_update NOCHANGE 163
worksheet_command: cell_update NOCHANGE 163
worksheet_command: alive NOCHANGE 163
server_ping_while_alive_callback: NOREFRESH 163
worksheet_command: eval INCREASED 164 # I begin dragging non-
stop to change the color. I increase my state_number with each 'eval'.
worksheet_command: eval INCREASED 165
[...]
worksheet_command: eval INCREASED 194
worksheet_command: alive NOCHANGE 194 # I remember the state at
my last outgoing ping.
worksheet_command: cell_update NOCHANGE 194
worksheet_command: eval INCREASED 195
worksheet_command: eval INCREASED 196
worksheet_command: eval INCREASED 197
server_ping_while_alive_callback: REFRESHING requ= 194 resp= 194 197 # My
last ping went out 194 and the response is 194. But I'm now at 197, so
I'm refreshing...
worksheet_command: cell_list NOCHANGE 197 # I request the cell
list.
worksheet_command: eval INCREASED 198 # Still 'eval'ing.
worksheet_command: eval INCREASED 199
worksheet_command: eval INCREASED 200
worksheet_command: cell_update NOCHANGE 197
worksheet_command: eval INCREASED 198
worksheet_command: eval INCREASED 199
worksheet_command: eval INCREASED 200
worksheet_command: alive NOCHANGE -1
worksheet_command: cell_update NOCHANGE 200
server_ping_while_alive_callback: REFRESHING requ= -1 resp= 205 200
worksheet_command: cell_list NOCHANGE 200
container is undefined
[Break on this error] return container.farbtastic ||
(contai...uery._farbtastic(container, callback));\nfarbtastic.js (line 27)
F is undefined
[Break on this error] (function(){var
l=this,g,y=l.jQuery,p=l....each(function(){o.dequeue(this,E)})}});\njquery-1....2.min.js
(line 12)
worksheet_command: eval INCREASED 201
worksheet_command: cell_update NOCHANGE 201
worksheet_command: alive NOCHANGE -1
worksheet_command: cell_update NOCHANGE 206
server_ping_while_alive_callback: NOREFRESH 206
container is undefined
[Break on this error] return container.farbtastic ||
(contai...uery._farbtastic(container, callback));\nfarbtastic.js (line 27)
F is undefined
[Break on this error] (function(){var
l=this,g,y=l.jQuery,p=l....each(function(){o.dequeue(this,E)})}});\njquery-1....2.min.js
(line 12)
worksheet_command: eval INCREASED 207
worksheet_command: cell_update NOCHANGE 207
worksheet_command: cell_update NOCHANGE 207
worksheet_command: cell_update NOCHANGE 207
worksheet_command: cell_update NOCHANGE 207
worksheet_command: alive NOCHANGE 207 # I suspended the server
around here.
worksheet_command: alive NOCHANGE 207
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7254#comment:9>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---