It's not a definition. The clincher parts are the important bits, but names always matter.OK, my definition of "hiding remote" is different from "the name makes it clear it's a remote call".
Nope, pagination is batching. It could be done really badly of course but it's a remote call to some other system that has to maintain resources on holding open some arbitrary length reply to your request. There are costs to that and pushing those to the client is normally a good idea to scale because it's normally cheap for the client (they only have one or few such requests so trivial data structures just work) and if the client stops/forgets there's no need for the server to have any timeout implementation/reaping.I did mention paging in my post, but really I think paging is typically an antipattern somewhere (either in your code, or in the API itself).
Batching in distributed systems is normally a big win in API design. The smallest unit of work to the domain may not match the most efficient unit of request/response.
Also pagination shows you when your failure can occur on the boundary not at some arbitrary point calling Next on an iterator that is hiding this. You want to wrap the result in some code that de-paginates, cool go ahead. But apis that just hide that so you have to just deal with it are bad.
I would hope that the plugin model on githubs api allows for using retry with it. In languages with a sane error handling path (exceptions are one such, but consistent ResultOrError return types also work - which is why you want them baked into the standard library and APIs up front) the 'plugin' is right there and should be minimal/no effort for APIs to integrate with.I have a similar opinion wrt. to error handling/retries, although in principle, I prefer non-API specific abstractions (e.g. in Python using something like https://pypi.org/project/retry/ ), instead of each API client having its own mechanism. However, I'm undecided on this, because I see some drawbacks to this approach and I haven't played enough in this space to have a clear opinion.
Designing things to be idempotent (either naturally or through techniques like one shot request identifiers) makes such designs simpler