Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

api: Add bzz-feed-raw scheme to retrieve arbitary feed update #1959

Merged
merged 6 commits into from
Nov 19, 2019

Conversation

nolash
Copy link
Contributor

@nolash nolash commented Nov 15, 2019

This PR adds an HTTP scheme bzz-feed-raw the enables direct retrieval of the raw chunk contents from a reference. The use case that prompted the change was the desire tocircumvent the lookup algorithm of feeds to access only a particular update if it exists, without having to wait for the additional lookups the algorithms execute to finish (and fail if there are no newer ones)

@nolash nolash requested review from zelig, acud and janos November 15, 2019 14:30
Copy link
Member

@acud acud left a comment

Choose a reason for hiding this comment

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

This is not tested at all

@nolash
Copy link
Contributor Author

nolash commented Nov 15, 2019

fair enough

Copy link
Member

@janos janos left a comment

Choose a reason for hiding this comment

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

It looks to me that only comments on exported functions are missing. Otherwise LGTM.

Copy link
Member

@acud acud left a comment

Choose a reason for hiding this comment

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

Semantically I'm not sure why raw was appended to feed, as I'm not sure that its rawness differs in any way from bzz-feed at all (both return an octet stream mime type). So I find the naming confusing.

Personally I think we're better off adding this functionality into the normal Feed handler and just toggle it with a querystring param, even more so since feeds already have tweakable options through querystrings - do we really need to introduce a new scheme just in order to facilitate one type of request? I'm not sure I see the benefit.

@nolash
Copy link
Contributor Author

nolash commented Nov 18, 2019

@acud I think the relation between the data accessed by bzz-feed: and bzz-feed-raw: is much the same as between bzz: and bzz-raw:.

bzz-feed: manipulates and accesses feeds via a pointer, whereas the data is actually stored in a different chunk. With bzz: this pointer comes in the form of a manifest, which in turn directs you to the actual data to fetch.

Furthermore, bzz-feed: conceals a time-series scheme to access feeds. bzz-feed-raw: omits this completely, so thus the two schemes don't even provide the same functionality.

Lastly, I'm not very happy with the use of query string parameters in the bzz-feed interface as it is - at least not the POST part. I would have liked to see multipart body or use of headers instead. But we don't currently have this, and I would like to add this functionality for now without having to refactor all of it.

@nolash nolash merged commit 3cf1468 into ethersphere:master Nov 19, 2019
@nolash nolash deleted the bzz-feed-raw branch November 19, 2019 16:36
@acud acud added this to the 0.5.3 milestone Nov 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants