You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by Savalek <gi...@git.apache.org> on 2018/03/07 13:54:47 UTC

[GitHub] zeppelin pull request #2848: [Zeppelin-3307] - Improved shared browsing/edit...

GitHub user Savalek opened a pull request:

    https://github.com/apache/zeppelin/pull/2848

    [Zeppelin-3307] - Improved shared browsing/editing for the note

    ### What is this PR for?
    Now if the note is opened in several tabs (or several users are watching or editing it), then there may be problems. Loss of code entered by the user, reset the cursor position.
    This PR adds a basic opportunity for collaborative editing. For the organization of joint editing, the library diff-match-patch is used.
    PR does not change the logic of operation if the note is used by one person.
    Also, maybe this will solve the problem with [ZEPPELIN-3131](https://issues.apache.org/jira/browse/ZEPPELIN-3131).
    
    ### What type of PR is it?
    Improvement
    
    ### What is the Jira issue?
    [ZEPPELIN-3307](https://issues.apache.org/jira/browse/ZEPPELIN-3307)
    
    ### Screenshots (if appropriate)
    
    ![gif](https://user-images.githubusercontent.com/30798933/37095049-e6c64e32-2225-11e8-96c8-517ac745a254.gif)
    
    
    ### Questions:
    * Does the licenses files need update? no
    * Is there breaking changes for older versions? no
    * Does this needs documentation? no


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/Savalek/zeppelin ZEPPELIN-3307

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zeppelin/pull/2848.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2848
    
----
commit f87ab507bb8ff68e8e16a75c8f594b387d98a08d
Author: Savalek <de...@...>
Date:   2018-02-21T13:05:15Z

    coop_raw_1

commit 4463ff026131c2f4d996ad3037edd9820670f0c6
Author: Savalek <de...@...>
Date:   2018-02-21T14:31:00Z

    coop icon add

commit d7f449c7d7cfa8d4b56abde4afb2e1e65d790f93
Author: Savalek <de...@...>
Date:   2018-03-07T11:47:27Z

    Merge branch 'master' into ZEPPELIN-3307
    
    # Conflicts:
    #	zeppelin-server/pom.xml
    #	zeppelin-web/src/app/notebook/notebook.controller.js
    #	zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
    #	zeppelin-web/src/components/websocket/websocket-event.factory.js
    #	zeppelin-web/src/components/websocket/websocket-message.service.js

commit a1700d58b3b0a91915049555a14cd6ed946f1977
Author: Savalek <de...@...>
Date:   2018-03-07T12:33:08Z

    codestyle fix

commit 8651f763429f36f320c596d4bbb78f7f005c5ec2
Author: Savalek <de...@...>
Date:   2018-03-07T13:35:59Z

    delete debug

----


---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by jongyoul <gi...@git.apache.org>.
Github user jongyoul commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    @Savalek I agree with unexpected ignorances feel bad. Can you add test cases both of backend and frontend? And please make sure the relationship with `personalized mode`.
    
    This is an idea but needs to think of how we improve this feature? If this mode is disabled, all writers can write in the same way? otherwise, prohibit it except owner? When `personalized mode` is enabled, how does this feature behave?


---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by Savalek <gi...@git.apache.org>.
Github user Savalek commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    Fixed conflicts. What about merge?


---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by jongyoul <gi...@git.apache.org>.
Github user jongyoul commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    Git it. Thanks. I thought it might not be useful. but I might be wrong. Thank you.


---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by jongyoul <gi...@git.apache.org>.
Github user jongyoul commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    @Savalek BTW, https://travis-ci.org/Savalek/zeppelin/builds/380644746 Can you check your Travis? Zeppelin has a lot of tricky tests but, in your case, it's a bit different. Do you know the reason?


---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by Savalek <gi...@git.apache.org>.
Github user Savalek commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    @r-kamath, @prabhjyotsingh, i fixed the description


---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by zjffdu <gi...@git.apache.org>.
Github user zjffdu commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    @prabhjyotsingh @r-kamath Could you help take a look at it ? It seems a necessary feature. 


---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by Savalek <gi...@git.apache.org>.
Github user Savalek commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    @jongyoul, I do not like it when `try {...} catch {...}` is used many times in the code. Therefore, I slightly changed the handling of `ClassCastException`. Could you look at the new implementation and say what you think about it?


---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by jongyoul <gi...@git.apache.org>.
Github user jongyoul commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    @mebelousov The main purpose of "personalized mode" is to keep the current user's view. But if the user refreshes the browser, it changes the newest one. Do you think it's enough?


---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by jongyoul <gi...@git.apache.org>.
Github user jongyoul commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    Thanks. Checked. I’ve saw that all results were error except the first one. LGTM


---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by jongyoul <gi...@git.apache.org>.
Github user jongyoul commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    Will merge it if there's no further discussion


---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by jongyoul <gi...@git.apache.org>.
Github user jongyoul commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    @Savalek Thanks!! That’s what I want to do exactly. I also don’t like to use `try` and `catch` several times.


---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by Savalek <gi...@git.apache.org>.
Github user Savalek commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    @jongyoul, I run two tests. "master" and "zeppelin-3307 merge master." Travis shows the same result. Errors in this tests identical.
    
    ![travis](https://user-images.githubusercontent.com/30798933/40303804-05a4a1f2-5cfd-11e8-81a9-9f9dd1da92c3.png)



---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by jongyoul <gi...@git.apache.org>.
Github user jongyoul commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    @Savalek Thanks for adding e2e test but can you add also functional test for your backend code? It would be better to make a mock for `NotebookServer` to check if `broadcast` is called properly.


---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by Savalek <gi...@git.apache.org>.
Github user Savalek commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    @prabhjyotsingh @r-kamath
    could you help with the review?


---

[GitHub] zeppelin pull request #2848: [Zeppelin-3307] - Improved shared browsing/edit...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/zeppelin/pull/2848


---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by jongyoul <gi...@git.apache.org>.
Github user jongyoul commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    I think this PR might be not bad for a small number of users, but, I'm not sure users increase. What do you think of it? It looks like calling websockets everytime whenever all users make changes


---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by mebelousov <gi...@git.apache.org>.
Github user mebelousov commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    @jongyoul I see next usecase. 10 users open the note, put client ID in dynamic form, refresh note, get and process data  result. In this case getting of default note view is OK.
    That is in personal mode we may not save note updates.


---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by r-kamath <gi...@git.apache.org>.
Github user r-kamath commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    @Savalek Thanks for this new feature. IMHO it will be nice to have an option to turn on/off the collaborative mode and a way to show the number of users collaborating.
    something like <img width="72" alt="users" src="https://user-images.githubusercontent.com/2031306/39687878-e8700a46-51ed-11e8-846a-842238b7d8d8.png"> with a proper tooltip. 



---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by Savalek <gi...@git.apache.org>.
Github user Savalek commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    @jongyoul, I added tests.


---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by mebelousov <gi...@git.apache.org>.
Github user mebelousov commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    Zeppelin has websockets and two users can view a note simultaneously, but there is a bug.
    - Open the note in two tabs.
    - Write anything in first tab for second.
    - Wait for 10 seconds.
    - Repeat the last two steps several times.
    - Check that written code is lost.
    
    Thus paired coding is painful.
    Please review this PR.



---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by Savalek <gi...@git.apache.org>.
Github user Savalek commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    @jongyoul, I added tests for backend.


---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by jongyoul <gi...@git.apache.org>.
Github user jongyoul commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    This feature could replace "personalized mode". I will create PR to remove "personalized mode". Thank you @Savalek again.


---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by Savalek <gi...@git.apache.org>.
Github user Savalek commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    @jongyoul, I have corrected.


---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by r-kamath <gi...@git.apache.org>.
Github user r-kamath commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    @Savalek 
    > This option will be global and enable/disable will only be available for the server administrator?
    
    Right, a property in zeppelin-site.xml to control this feature will be good to have option. Just in case if anyone wants to turn it off.
    Similar to https://github.com/apache/zeppelin/blob/master/conf/zeppelin-site.xml.template#L552-L557 but in this case default true.


---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by Savalek <gi...@git.apache.org>.
Github user Savalek commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    @jongyoul, yes sending any change to the server is a big load. But this will happen only if the notebook is opened by several users. The current implementation is subject to errors in consequence of which users may lose some of the code. Even if the second user just open the tab in the browser. This is very annoying.


---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by mebelousov <gi...@git.apache.org>.
Github user mebelousov commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    @jongyoul As I understand personal mode allows users run paragraphs and have different views and different results due user chosen values in dynamic forms.
    I'm against the removal of personal mode.


---

[GitHub] zeppelin issue #2848: [Zeppelin-3307] - Improved shared browsing/editing for...

Posted by Savalek <gi...@git.apache.org>.
Github user Savalek commented on the issue:

    https://github.com/apache/zeppelin/pull/2848
  
    @r-kamath, what do you mean by turn off/on option? 
    This option will be global and enable/disable will only be available for the server administrator?


---