-
Notifications
You must be signed in to change notification settings - Fork 12
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
Recursive bzz.list()
#123
Comments
I'd rather avoid adding extra logic to I have implemented something like this already for a simple app, but I think this logic should be improved to support a maximum recursion level, maybe using Observables to track progress rather than a Promise, possibly lazy-loading, etc. |
Well, I don't really agree with having it as a separate package. I mean it is an option, but I think this approach only contributes to the "package hell" problem of the JS ecosystem. This is a very tightly coupled feature that I would have actually expected to be supported by Swarm directly, but it is not so I see improvement space here that this library can take advantage of. I admit it might involve some more logic, but it will be very "underhood" and to the user, it should only be visible as simple I am not sure how demanding the Agree with the maximum recursion level limit, would have some reasonable default and allow user to override that. Also, I like flattening the result data-structure, that was actually my original idea. |
I think we're mixing a bunch of different things here so I'd like to keep these concerns separated. First, I disagree with the "package hell" problem, at least if you mean it as "many packages doing small things". I also disagree with the idea that because you're expecting it should be supported by Swarm but is not, it should be supported by Erebos.
Well that's exactly the kind of questions that make things way more complex than for example adding a To me a more interesting opportunity is to discuss it more with the rest of the community, first asking the Swarm team why Swarm doesn't provide this functionality by itself, then getting other potential users of such API to give feedback about their use cases, and creating a spec for it as we did for the Timeline API. Sorry for the long reply but to summarize: I think it's useful but it shouldn't be provided as a naive low-level API, and there are likely different concerns in terms of Swarm behavior, performance and UX that need to be taken into account. |
Thanks for such a long explanation! Really appreciate it!
Well, good point about the payment part. And agree with the bundling/unbundling, yet I don't agree with the level of the modularization. But it is alright, it is somehow a philosophical question that everybody has to answer.
Good point as well. Make sense to implement this in Swarm (if possible). I guess I am closer to this library then to Swarm itself, so that is why I proposed it here instead there. 😅 Well I will open an Issue in Swarm and see what they will have to say to it :-) |
I agree it's tricky to get it right, the approach I have for Erebos is to split between individual utilities (I don't want a single "utils" package that ends-up being a dependency for everything, and hard to make breaking changes to), individual APIs (BZZ, PSS) possibly per platform (again with the idea to avoid having extra dependencies such as node-specific ones in a browser build), and "high-level" packages such as
I totally get it, no problem! |
What do you think about adding an option for
bzz.list()
that would recursively fetch all entries for a given manifest? Resolving all thecommon_prefixes
returned by Swarm?The text was updated successfully, but these errors were encountered: