Leemoonsoo opened a new pull request #3873:
URL: https://github.com/apache/zeppelin/pull/3873
### What is this PR for?
This PR provides an instant visual feedback to improve user experience on
high latency network environment.
It focuses on improving 2 frequent user action
- Run paragraph(s)
- Swich visualization
In high latency network, the user may feel a short 'freeze' between action
(click) and any visual change in notebook.
While the paragraph is updated after get a response from server.
After this change, the paragraph will get immediate update after a user
action, without waiting for server response.
### What type of PR is it?
Improvement
### Todos
* [x] - Instant visual feedback on paragraph run
* [ ] - Instant visual feedback on visualization switch
* [ ] - Instant visual feedback on paragraph run (new ui)
* [ ] - Instant visual feedback on visualization switch (new ui)
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-4985
### How should this be tested?
Can simulate high latency network by adding sleep in NotebookSocket.send()
method
```
---
a/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookSocket.java
+++
b/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookSocket.java
@@ -67,6 +67,9 @@ public class NotebookSocket extends WebSocketAdapter {
}
public synchronized void send(String serializeMessage) throws IOException
{
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {}
connection.getRemote().sendString(serializeMessage);
}
```
### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]