Skip to content
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

Async version of the REST API #253

Open
sachinpkale opened this issue Aug 16, 2017 · 5 comments
Open

Async version of the REST API #253

sachinpkale opened this issue Aug 16, 2017 · 5 comments

Comments

@sachinpkale
Copy link

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

@michaelklishin
Copy link
Member

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)

@sachinpkale
Copy link
Author

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

@michaelklishin
Copy link
Member

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 michaelklishin changed the title Async support in rest APIs Async version of the REST API Aug 16, 2017
@sachinpkale
Copy link
Author

@michaelklishin Are you open to pull requests? I can help with this change.

@michaelklishin
Copy link
Member

michaelklishin commented Aug 16, 2017

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants