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

swarm: bzz-list, bzz-raw and bzz-immutable schemes (#150) #164

Closed
wants to merge 4 commits into from

Conversation

janos
Copy link
Member

@janos janos commented Dec 13, 2017

Replace query parameter list=true for listing all files contained
in a swarm manifest with a new URL scheme bzz-list. This change
does not provide backward compatibility.

Replace bzzr and bzzi schemes with bzz-raw and bzz-immutable.
New URI shemes are added and old ones are deprecated, but not removed.
Old schemes bzzr and bzzi are functional for backward compatibility.

Related gist: https://gist.github.com/gbalint/ce09ada0bebc38f3a8a3dd2ce6c6299f.

This PR is closely related to the #163 PR.

Closes #150 issue.

Replace query parameter list=true for listing all files contained
in a swarm manifest with a new URL scheme bzz-list.
New URI Shemes are added and old ones are deprecated, but not removed.
Old Schemes bzzr and bzzi are functional for backward compatibility.
@janos janos changed the title New bzz-list, bzz-raw and bzz-immutable schemes (#150) swarm: bzz-list, bzz-raw and bzz-immutable schemes (#150) Dec 13, 2017
@cobordism
Copy link

I was thinking, it is common in gnu programs to have short and long cli flags. For example we might have -x and --extract.

Could the same be true here, where bzzx is synonymous with bzz-extract?

Remove old schemes in favour of bzz-raw and
bzz-immutable.
@gbalint
Copy link

gbalint commented Dec 13, 2017

Ok, so let's agree on the functionality, poor @janos goes back and forth with the implementation....
So let's keep the short and long ones too?

@janos
Copy link
Member Author

janos commented Dec 13, 2017

I am not absolutely sure that we need bot short and long ones. I see pros to have them, but can think of at least two cons:

  • user experience - it may be confusing for users
  • http redirects - we would need to make additional effort to preserve the request's scheme in redirect.

Just a few thoughts. Otherwise, I do not object the idea. Schemes bzzr and bzzi will be kept, and new bzzl will be added. Also, I will add bzzh to #163, as well. If you agree?

@cobordism
Copy link

For the record, I prefer the longer format.
(My last comment was made in the interests of backward compatibility)

I have no strong opinions on this though except that bzzi and bzzl look too similar and that short names are not descriptive.

@janos
Copy link
Member Author

janos commented Dec 13, 2017

Backward compatibility for bzzr and bzzi schemes are not a problem. Reverting the last commit will bring them back. I am fine with that, too. If you agree?

@cobordism
Copy link

cobordism commented Dec 13, 2017

I think currently we are in the mood of breaking backward compatibility for the next release anyway so...

Here's how I feel:
If we want to merge it to upstream master now, we should keep the short names,
If we hold off merging it until we merge all the other breaking changes for our 0.3 release (new hasher, new syncer etc.) then by all means, remove the short version.

The problem is that we don't have a difference between "last release" and "nightly" for swarm. Maybe that's something we should think about after 0.3

If you agree?

I don't even feel authorised to make this decision :)

@janos
Copy link
Member Author

janos commented Dec 13, 2017

I think that removing support for short names will be trivial for 0.3 (breaking) release. So, we can keep them until then.

Keep bzzr and bzzi schemes for backward compatibility. At least
until 0.3 swarm release.
@gbalint
Copy link

gbalint commented Dec 13, 2017

Please resubmit it to https://github.com/ethereum/go-ethereum then
👍

@gbalint
Copy link

gbalint commented Dec 19, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

List requests should use url scheme instead of query parameter
4 participants