-
Notifications
You must be signed in to change notification settings - Fork 583
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/await API #83
Comments
I think moving to an async API with I've seen .NET libraries (e.g. MongoDB client) that go async do it in a way that splits the entire API into an old/new set of namespaces if not actual libraries (that need to be separately pulled from nuget). Generally, the non-async methods become wrappers for the async ones, thus the split. |
That's what we have in mind. |
+1 |
Could I help out somehow? |
@danielmarbach a good way to start would be to look into how much effort it would be to have an |
Should I do a spike then to see what is affected?
|
@danielmarbach feel free. Thank you very much for your time! |
I do this the all-in way. No more sync APIs.
|
Sorry but we cannot remove existing APIs. A ton of code in the field depends on them. We can build them on top of |
Fine with me if you know what the consequences of this decision are: Having two completely sep. code paths and therefore the potential of fixing one path and forgetting the other one
|
See for example what we did http://particular.net/blog/async-await-its-time
|
@danielmarbach thank you for your perspective. RabbitMQ (and this client) is almost 9 years old. We understand the consequences of major changes, in client libraries and elsewhere. We also know very well what happens when you break things. .NET client has two versions ("regular" and WinRT) that share effectively all unit tests, for example. So far so good. |
Didn't want to imply that you guys are clueless or anything. Sorry if I sounded like a jerk. I was talking about the implications on the team maintaining the lib not the breaking changes per se
|
No offence taken. We understand that it will be a long and potentially difficult path to get to the new world where everybody uses .NET Core and only C# 5.0+ APIs. We definitely want to get our client there, just without disruptive upgrade-or-leave-it releases. Also note that certain operations are synchronous by design in the protocol. This does not include publishing or consumption of messages, which is why the issue title only mentions publishing. |
By "synchronous" above I mean semantics, not necessarily implementation, of course. Nobody's complained about the blocking nature of |
Fair enough. You'd have at least the change to base that decision on the shoulders of the whole ecosystem. Many OSS libs and IO bound libs are moving to async only. Just saying ;)
|
@michaelklishin See the effect a proper async implementation would have |
I updated the issue to reflect the (greatly) extended scope of this issue. |
Here is a brain dump of a plan of attack:
Goal:
Thoughts? Extensions? Corrections? |
There are parts of the API that are naturally events, e.g. consumer cancellation or server-sent Otherwise, sounds reasonable. |
Ok, but normal event handlers are a PITA with async. We need a better concept
|
How would you handle things with |
This shows how we could handle async events #151 |
@michaelklishin thanks |
Just to restate: I offered my help as well.
|
We've outlined our plan for the future of this client on rabbitmq-users. |
Hello all, very nice to see effort in this direction. Do you have any news on availability of async client? Latest comments are from end of May as far as I know and I was wondering if you have a clearer picture by now. This https://github.com/clearctvm/RabbitMqNext for sure looks great but I would sleep better if we can have it backed up by the community behind rabbit. |
@PeterKottas no updates. We've focussed on #148 in June and likely won't start working on the new client until September or so. It will take months to develop anyway. |
Thanks for the info @michaelklishin , I'll check back around the end of the year then. |
@PeterKottas I'd check back in Q1-Q2 2017. |
@michaelklishin Just my two cents: @PeterKottas' referenced RabbitMqNext looks like a very decent starting point for an officially supported Another alternative is https://github.com/EasyNetQ/EasyNetQ, which also has |
@asbjornu thank you for the input. Our plan is to develop a client from scratch. That said, we are happy to heavily borrow from existing projects. EasyNetQ is quite different in scope from a "regular" RabbitMQ client, though. |
EasyNetQ is a convenience/conventions wrapper over the current .NET client but there may be aspects of the surface API that we could learn from.
|
@michaelklishin: Thanks for the info. I agree with @kjnilsson's list of concerns. It would be awesome if the client provided both a low-level API as well as a higher level abstraction such as EasyNetQ. To be honest, the current official client leaves a lot to be desired in terms of user friendliness. If one's not a die-hard expert on how RabbitMQ works, it's very hard to set it up "right" (where "right" matches 80% of the most common usage patterns) the first time. Properties such as I'm really looking forward to how and where this ends up. 😃 |
Automatic recovery was introduced less than 2 years ago. Now that we know that it works well in practice (and what kind of issues there were in the Java client, which is a couple of steps ahead of this client in some areas) perhaps it can be enabled by default in a future version. That doesn't have to wait for the new client, though. |
I hope the higher level abstraction will be a dedicated package and not coupled together with the low level driver in one package
|
It's unlikely that we will include any abstractions meaningfully higher On Fri, Oct 28, 2016 at 12:05 AM, Daniel Marbach [email protected]
MK Staff Software Engineer, Pivotal/RabbitMQ |
@kjnilsson Just a shout-out from a user looking forward to the TPL-based client. Quick question: Is the progress of the new client available here on GitHub? If so, can you share a link to the repo? Thanks! |
I meant @michaelklishin - sorry :) |
The work on the new client begins next year.
|
I sent in a PR which would enable opt-in async consumer dispatch in a non-breaking way that can be delivered as a minor, see #307 as soon as I get green light I'll make it a bit more efficient |
+1 |
1 similar comment
+1 |
+1 |
I'm locking this because it's been decided that we will develop a new async/await-oriented client from scratch. Isolated improvements such as #307 are still possible but no major API revisions are going to happen in this client. Sorry but we don't need any more +1s. |
Labeled for next-gen client and closing. |
Version 7 of this library will provide a TPL-based interface. |
Originally this issue was about enabling of message publishing with a natural future ("awaitable" in the .NET world) API.
After some discussions with the .NET community, it makes more sense for us to switch to
async/await
entirely. This is a major change. The users who cannot upgrade in the meantime will be able to use3.6.x
versions with future RabbitMQ releases.The decision is to develop a completely new client oriented towards async/await, although #307 introduce it in a place where it makes most sense and can be done with relatively few breaking changes.
The text was updated successfully, but these errors were encountered: