Skip to content

Updating Bitswap architecture diagram #161

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

Closed
wants to merge 1 commit into from

Conversation

dgrisham
Copy link
Member

@dgrisham dgrisham commented Dec 22, 2017

Updating the architecture diagram as a part of the Bitswap spec update. Rendered to .png using ditaa.

@ghost ghost assigned dgrisham Dec 22, 2017
@ghost ghost added the status/in-progress In progress label Dec 22, 2017
@dgrisham dgrisham force-pushed the update/architecture-diagram branch from feffa54 to b9e2072 Compare December 22, 2017 22:08
@dgrisham dgrisham added needs review and removed status/in-progress In progress labels Dec 22, 2017
@dgrisham dgrisham force-pushed the update/architecture-diagram branch from b9e2072 to 39fb720 Compare December 22, 2017 22:12
@ghost ghost added the status/in-progress In progress label Dec 22, 2017
@dgrisham dgrisham removed the status/in-progress In progress label Dec 22, 2017
Copy link
Member

@daviddias daviddias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can users make changes? will ditaa pick up on the .txt version?

@dgrisham
Copy link
Member Author

@diasdavid Yes -- I just ran ditaa architecture.txt to generate the .png.

@dgrisham dgrisham force-pushed the update/architecture-diagram branch from 39fb720 to 7501a28 Compare December 24, 2017 04:06
@ghost ghost added the status/in-progress In progress label Dec 24, 2017
@dgrisham
Copy link
Member Author

@diasdavid Hey! Updated the diagram based on your comment on Slack (about the Bitswap message version transformations).

@daviddias
Copy link
Member

image

@dgrisham
Copy link
Member Author

dgrisham commented Jan 8, 2018

Gotcha, can you define 'network' for me then? My understanding was roughly: https://github.com/dgrisham/specs/blob/a8fb19f9e15e39d6a716cb65f96b47afe209a3e6/bitswap/README.md#network, which doesn't seem accurate now based on your comment.

@daviddias
Copy link
Member

I see where the confusion came from. That Network box is this internal class "https://github.com/ipfs/js-ipfs-bitswap/blob/master/src/network.js". All the things that were in the diagram were internal pieces to Bitswap :)

@dgrisham
Copy link
Member Author

dgrisham commented Jan 8, 2018

Ah, gotcha, that also explains my confusion with the original diagram as well. I'll update the diagram to reflect this, thanks!

@daviddias
Copy link
Member

thanks @dgrisham . Did you had time to look into this again?

@daviddias daviddias added the P2 Medium: Good to have, but can wait until someone steps up label Jan 25, 2018
@dgrisham dgrisham force-pushed the update/architecture-diagram branch 2 times, most recently from a8c2d7e to 7f4da89 Compare January 27, 2018 22:04
@dgrisham
Copy link
Member Author

@diasdavid Hey, sorry about that, just pushed with that fix. Let me know what you think.

@dgrisham dgrisham force-pushed the update/architecture-diagram branch from 7f4da89 to f7e73a6 Compare January 27, 2018 22:09
@daviddias
Copy link
Member

Not trying to be super pedantic, but I still see differences:

image

License: MIT
Signed-off-by: David Grisham <[email protected]>
@dgrisham dgrisham force-pushed the update/architecture-diagram branch from f7e73a6 to 7bd04e4 Compare January 29, 2018 16:57
@dgrisham
Copy link
Member Author

dgrisham commented Jan 29, 2018

@diasdavid No worries, we want to be as accurate as we can here :) I suppose the main reason those parts of the diagram differ is that mine has the 'Peer using older Bitswap?' choice. My thought was that it made it more clear when looking at the incoming/outgoing messages, because on the original it seemed that the lines coming out of the Network module were ambiguous (i.e. it doesn't appear obvious from the diagram when you go to the Transform function and when you don't). When adding in that 'Peer using older Bitswap?' question, it made the most sense to conceptualize the messages as Outgoing and Incoming for conciseness, as opposed to conceptualizing them as /ipfs/bitswap/1.0.0 and /ipfs/bitswap/1.1.0.

The other reason I did this was that it seemed to be a bit more future-proof, because if we Bitswap gets updated to /ipfs/bitswap/1.2.0 and so on, the original diagram doesn't scale particularly well. (My diagram does refer to a specific version number though, that being /ipfs/bitswap/1.1.0, so it would still require a small change on updates.)

Does that make sense/what are your thoughts on this approach? Happy to change it back if you're unconvinced, but thought I'd share my reasoning.

Edit: Also, I just pushed an update because my previous push was missing a few things.

@dgrisham
Copy link
Member Author

dgrisham commented Jan 30, 2018

Oo, just realized one significant difference between our diagrams though. I'll push a change in a minute.

Edit: Actually, scratch that. The line going from the Network module to the Decision Engine said receive a block on the original, but the decision engine gets the entire Bitswap message, which is why I represented it the way I did in the diagram.

@vmx
Copy link
Member

vmx commented Apr 16, 2018

What's the current state? As I start looking into Bitswap it would be great to look at an updated diagram :)

@daviddias
Copy link
Member

@dgrisham given the lack of response, I'm closing this PR and keeping the mododraw version of the diagram which I believe does a better representation of the architecture.

@daviddias daviddias closed this Jun 4, 2018
@ghost ghost removed the status/in-progress In progress label Jun 4, 2018
@daviddias daviddias deleted the update/architecture-diagram branch June 4, 2018 08:13
@dgrisham
Copy link
Member Author

dgrisham commented Jun 4, 2018

Hey @diasdavid that was my bad, I was thinking that your approval/review was the next step in this conversation, which is why I didn't respond to @vmx -- I should've pinged you since I thought that was the case. Let me know if you still want to move forward with this, the most recent version is here. Also fine to keep the older version if you still think that's better, but wanted to make sure this didn't get overlooked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Medium: Good to have, but can wait until someone steps up
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants