-
Notifications
You must be signed in to change notification settings - Fork 44
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
Simplify Fetcher interface #1589
Comments
Overall, im a big fan of this, less is more. As for the As you mentioned, I think having the "decode" functions of |
Noted in standup, but adding here for reference. I had |
## Relevant issue(s) Resolves #1589 ## Description Simplifies the fetcher interface, removing 2 of the 3 FetchFoo functions. As well as making it simpler, this also means that all (one) of the functions have to behave in the same way (e.g. deleted doc support).
## Relevant issue(s) Resolves sourcenetwork#1589 ## Description Simplifies the fetcher interface, removing 2 of the 3 FetchFoo functions. As well as making it simpler, this also means that all (one) of the functions have to behave in the same way (e.g. deleted doc support).
Currently we have:
FetchNext
is never used.FetchNextDecoded
cannot return deleted items.FetchNextDecoded
andFetchNextDoc
- is always one or the other.FetchNextDecoded
andFetchNextDoc
are really just use-case transformations of fetcher output, not fetcher output itself.This all makes it harder to maintain and use, particularly when layering stuff on top of it, like the Lens wrapper as it has to deal with 3 funcs that nearly do the same thing but not quite.
We can remove
FetchNextDecoded
andFetchNextDoc
, they can sit as a layer on top (is just a stateless func call transforming the output ofFetchNext
). I am also in favour of changing it so that the Fetcher interface just extends the Enumerable interface. The transforms then just become enumerable.Selects, and stuff like Lens becomes super easy (todo in codebase, in the Lens fetcher).Be careful with the time of this however. Many people are currently working in the same location.
The text was updated successfully, but these errors were encountered: