-
Notifications
You must be signed in to change notification settings - Fork 82
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
Support ring metrics for asynchronous requests #94
Comments
This would tie the library to |
That's fair enough. It's a shame though as most of the implementation is the same as that of |
Ring has support for async middleware through asynchronous handlers: https://github.com/ring-clojure/ring/wiki/Concepts#handlers. Can't this be supported through that? It's a matter of supplying a 3-arity middleware fn, I guess. |
Here's my attempt in case someone wants to quickly hack it: Go to
Ensure
|
The Aleph web server, built on top of Netty, gives the option of returning a manifold deferred object in addition to the standard ring response map. This allows the request to be carried out asynchronously.
The current
instrument
middleware assumes a synchronous implementation. It would be great if async was supported as well.It wouldn't be much work to get this working. Something along the lines of:
Of course, it means introducing manifold as a dependency. It's a small library though, and only introduces a couple of transitive dependencies.
Happy to submit a PR for this.
The text was updated successfully, but these errors were encountered: