Skip to content
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

[WIP] doc: Files API #5052

Closed
wants to merge 1 commit into from
Closed

[WIP] doc: Files API #5052

wants to merge 1 commit into from

Conversation

schomatis
Copy link
Contributor

This is a work in progress, I don't have a clear idea of the final form of this document, for now it is placeholder for any information I want to provide to the user while studying the Files API. Much of that information may not ultimately belong here but for the ease of the development process I'm centralizing it all (to avoid raising many PRs scattered through different repos).

@schomatis schomatis added topic/docs-ipfs Topic docs-ipfs topic/files Topic files labels May 30, 2018
@schomatis schomatis added this to the Files API Documentation milestone May 30, 2018
@schomatis schomatis self-assigned this May 30, 2018
@schomatis schomatis requested a review from Kubuxu as a code owner May 30, 2018 17:40
@ghost ghost added the status/in-progress In progress label May 30, 2018
License: MIT
Signed-off-by: Lucas Molas <[email protected]>
@schomatis
Copy link
Contributor Author

Hey @nitishm, this is something I should have finished a looong time ago, but since you mentioned you were interested in ipfs add to understand the code flow and you are proficient in Go I think you'd be perfect to help me move this PR forward which aimed to do exactly that, explain some go-ipfs internals through basic commands like ipfs add.

A good first step would be to follow the calls through ipfs add and try to identify the most important operations going on (e.g., we take the file and chunk it in some-function, we then organize the chunks in a DAG in some-other-function, we save them in the MFS, etc). Here is some (really incomplete) documentation about how we organize files in IPFS (any questions/clarifications you ask while reading that would be invaluable): https://github.com/ipfs/go-mfs#documentation. Besides just following the code with the IDE what really helped when I was starting was following it with a debugger like Delve (#5274 (comment)) for reasons like we use some interface indirections that are really tough to follow in the static code, our package manager is not great for beginners yet and some pieces of code can be hard to find (and as usual, seeing the code in action with actual values is really helpful to get concrete examples while reasoning about the code).

Give this a try and feel free to ask any number and sort of questions (open any issues/PRs you need and tag them under this milestone).

@nitishm
Copy link

nitishm commented Dec 19, 2018

@schomatis This is something I definitely feel comfortable doing. I have been using dlv with my IDE to follow the flow of ipfs add. (I should've really written it down yesterday. God dang!)
Where exactly do you want me to capture the flow ?

Here is some (really incomplete) documentation about how we organize files in IPFS (any questions/clarifications you ask while reading that would be invaluable): https://github.com/ipfs/go-mfs#documentation.

I will add my thoughts and questions as I go through the code once again.

@schomatis
Copy link
Contributor Author

Great!

Where exactly do you want me to capture the flow ?

For now, open a separate PR (or issue, whatever feels best to write a simple document) tagging this milestone since I'm not sure I can give you permissions to push to this one.

@nitishm
Copy link

nitishm commented Dec 19, 2018

@schomatis How can I tag my issue #5858 with the milestone ?

@schomatis
Copy link
Contributor Author

Closing in favor of #5864.

@schomatis schomatis closed this Dec 30, 2018
@ghost ghost removed the status/in-progress In progress label Dec 30, 2018
@schomatis schomatis deleted the feat/doc/files branch December 30, 2018 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/docs-ipfs Topic docs-ipfs topic/files Topic files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants