ipfs / go-graphsync

Initial Implementation Of GraphSync Wire Protocol
Other
100 stars 38 forks source link

Discussion: Reconsidering requestor pausing #347

Open hannahhoward opened 2 years ago

hannahhoward commented 2 years ago

Currently, we have an implementation of requestor pausing that works as follows:

IMHO, this is ridiculous. The reason I did it is that I wanted the requestor to stop accepting blocks entirely as soon you paused. This once upon a time approach was based on trying to get payment channels to work for data transfer push requests. (see https://github.com/ipfs/go-graphsync/issues/346 for explanation).

I believe the proper way to do this is:

Questions:

Why should we have imperative requestor pausing?

rvagg commented 2 years ago
hannahhoward commented 2 years ago

Upon further reading, I have learned that HTTP's pause/resume works essentially exactly like GraphSyncs -- the client cancels the request, then sends a second range request to resume. As many often say "HTTP is a stateless protocol".

I guess it can be for graphsync as well :P

I think a better question is how to do better versions of our start / stop extensions -- we started with DoNotSendCids, then moved to DoNotSendFirstBlocks, and I think the next thing would be to support "start traversal at path" -- ideally in a way that server could pick up without maintaining state.