-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Added ipfsnotebookrepo [ Zeppelin-683 ] #989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@bzz Please review |
pom.xml
Outdated
| <source>1.7</source> | ||
| <target>1.7</target> | ||
| <source>1.8</source> | ||
| <target>1.8</target> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Zeppelin uses jdk 1.7 by default. could you please revert this value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jongyoul the ipfs jar I use requires jdk 1.8 I also mentioned this in the google document linked above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jongyoul Yes I will revert that value to 1.7 with the next commit. But for this ipfs code to execute the "mvn clean package" must be with jdk 1.8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the best bet right now is try to re-build ipfs jar with target 1.7 locally
|
Great job @onkarshedge ! I understand that it's WIP, just wanted to remind that eventually your Could you also point to some document with high-level description of the approach how notebooks are stored in IPFS, what IPFS features are used and how to view them without Zeppelin, to make sure they are saved for people who are not very familiar with IPFS? Also, we need to know what is overall current implementation status, like what are TODOs, what is done, what is left, etc? This could be added i.e to the GDoc that you have linked |
|
@bzz I had a doubt about versioning approach. |
|
Should i save to Filesystem like |
|
Hi @onkarshedge sorry for late responce, it's your choice how to support versioning of course, but as mid-term evaluation starts soon, I think it's crucial to get answers on 2 previous questions now.
and
As soon as that is done it will be easier to help you with further improvements. |
|
@bzz Here is the link to document for first question. |
|
Thank you very much @onkarshedge 👍 ! I will go though it and let you know |
|
@onkarshedge sorry, people were busy releasing 0.6.0 recently Could you please:
On your UI proposal
Right now listing notebook history in UI is not implemented, but it will be very soon, AFAIK @khalidhuseynov is working on it under ZEPPELIN-1044 so it should "just work" with IpfsNotebookRepo |
|
ping, @onkarshedge are there any updates for the past week? |
|
@bzz right now I am working on Bittorrent support. I am using the jlibtorrent which uses libtorrent. The past week I spent time on using this library and some examples.I will post a PR of bittorrent in 2-3 days. Sorry for late response. |
|
Got it, thanks! Sounds great, please do not forget to submit another WIP pr with your progress on Bittorents support. Could you still follow #989 (comment) and update this PR as soon as you get back to IPFS one? Thanks again! |
|
ping @onkarshedge Could you please follow #989 (comment) and update this PR asap? |
|
@bzz To import the note by hash url . I will have to use javascript-api in this notenameImport.controller.js file. |
|
Thanks for updates! Do you want to do that on the client-side, right in the browser? I see what you mean - our existing impor function indeed fetches from URL and parse JSON right in the browser, but I do not think that such architecture will suit our case, as then the whole IPFS stack need to be run on the client. And it is not something that we want add here (we want self-contained I think what you could do here is - create a new REST API endpoint, pass this hash (which is like an URL in our case) to this REST API, and make it delegate actual fetching logic to a method in This logic can be later used for BitTorrent notebooks storage support as well as simple URL case could be refactored to use it (but that is outside of the scope of this PR of course) Let me introduce you to @corneadoug - he is known Zeppelin front-end ninja, whose knowledge of the client side codebase is by far greater than mine. @corneadoug Could you please help @onkarshedge and guide him on refactoring\updating |
|
@onkarshedge just like @bzz said, it would be better to have that import function in the back-end. We currently have 2 options for import in the front-end: URL or File Import Right now, the websocket call is sending a Notebook, so you might want to refactor that to have a choice between sending a Notebook or a URL/Hash/Other. |
|
@onkarshedge what do you think? |
| Future<Note> noteFuture = executorService.submit(task); | ||
| Note note = null; | ||
| try { | ||
| note = noteFuture.get(15, TimeUnit.SECONDS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bzz When the note is not available from peer it should not wait indefinitely so I added timeout in backend.
And the exception is logged. Should this be propagated to front-end ?
The front-end does not know about the TimeoutException.
@corneadoug should there be another timeout function in front-end ?
|
@bzz @corneadoug please review,it is complete. I have added the screenshot. |
|
@onkarshedge I would need a scenario/setup to be able to test it, could you add it to the PR description? |
|
@onkarshedge good progress, thank you for keeping us posted, your changes look very well! Before moving further, on top of great suggestions from @corneadoug, there are few more things you also need to take care of:
Please ping back as soon as those are addressed and I will be happy to make another pass on it! |
|
@bzz there are no transitive dependencies, just Junit and hamcrest
It has to be added in local .m2 repository |
|
@corneadoug feedback addressed. |
|
@bzz I found this documentation and there would be no need for dependency. I have used apache-httpcomponents httpclient. |
|
@bzz CI is green please review. |
| newNote.addCloneParagraph(p); | ||
| } | ||
| newNote.persist(subject); | ||
| } catch (IOException e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of e.toString() we could have something like "Importing note from " + url+ " failed". The error message will still be there, as we propaget e.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for having more detailed error message as mentioned by @bzz
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I referred the previous import function.
|
Looks great, @onkarshedge! I posted a few comments above. \cc @khalidhuseynov for extra back-end code review and @corneadoug for front-end one |
| angular.element('#noteImportModal').modal('hide'); | ||
| }); | ||
|
|
||
| $scope.$on('importNoteFail', function(event, data) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'importNoteFail' isn't a great name, how about 'importNoteResult'
|
I'm a bit lost with this feature, is it really considered as a NotebookRepo or does it only keep the revisions? Does importing the Hash mean that it import a Revision as Notebook? Why do we need to comment the VFS while it still save in local file system? Also I think the ipfs installation steps shouldn't be in the NotebookRepo doc since not every user should be having a server running. It would be more fitting in this PR description on how to test this PR. Import form
Import Note event listenerI left comments in the code |
|
Considering #1304 is the import really needed? |
|
in a sense i agree with @corneadoug and i'll write more details on that later, but for the beginning wouldn't it make sense to save normal notes without commit in ipfs as well? |
backend and frontend added import status as ng-toast Added documentation
…dio to checkbox, notename is used
|
@bzz @corneadoug addressed the feedback, updated PR description and also images. |
|
@onkarshedge thank you for the great work! How do you think, how hard it would be to rebase it on latest master? |
close #83 close #86 close #125 close #133 close #139 close #146 close #193 close #203 close #246 close #262 close #264 close #273 close #291 close #299 close #320 close #347 close #389 close #413 close #423 close #543 close #560 close #658 close #670 close #728 close #765 close #777 close #782 close #783 close #812 close #822 close #841 close #843 close #878 close #884 close #918 close #989 close #1076 close #1135 close #1187 close #1231 close #1304 close #1316 close #1361 close #1385 close #1390 close #1414 close #1422 close #1425 close #1447 close #1458 close #1466 close #1485 close #1492 close #1495 close #1497 close #1536 close #1545 close #1561 close #1577 close #1600 close #1603 close #1678 close #1695 close #1739 close #1748 close #1765 close #1767 close #1776 close #1783 close #1799

What is this PR for?
IPFSNoteBookRepo IPFS storage and sharing zeppelin notes.
What type of PR is it?
Feature
Todos
What is the Jira issue?
How should this be tested?
Installing ipfs
ipfs initipfs daemonipfs daemonwill start the ipfs. In the output you will see the following.You can edit the following ports with
ipfs config edit.As zeppelin also uses 8080 by default you might want to chage the gateway server or run zeppelin on another port.
Screenshots (if appropriate)
Successful import
Failure import
Questions: