Async version of the REST API
As Rest APIs use clj-http internally, can we add async? functionality supported by clj-http? Reference: https://github.com/dakrone/clj-http#async-http-request
Are results returned still responses or are they futures? clj-http docs do not make this clear (or I don't know where to look)
Result returned is a future (It will contain response headers once API call is complete). Actual response will be provided to the first callback and error (if any) will be provided in the second callback.
The current flow is blocking and will become bottle-neck in any non-blocking flow which also uses elastisch
Then it's a new API and not an unsupported option. Unless someone is willing to put in the work, I doubt it will happen any time soon. ElasticSearch 5.0 support is already a significant enough milestone we are behind on.
@michaelklishin Are you open to pull requests? I can help with this change.
@sachinpkale I am but let's start with a small spike to see what it would look like. In fact, I'd only start after we release a version that supports ES 5.0, so that's the best way to contribute at the moment. There's only one doco issue left before 3.0 can ship.