cedric
01/20/2017, 9:17 PMNote that we have a callback inside a callback here, and while it saves us from a lot of boilerplate (e.g. there's no need to pass the buf parameter explicitly to callbacks, they just see it as a part of their closure), the indentation levels are growing every time,Rx is a good example that you can have multiple calls on multiple threads and yet, zero indentation nor callback hell.
flatMap takes care of keeping things tidy while offering composable success/failure/error management