-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Kotlin Coroutine API #1387
Kotlin Coroutine API #1387
Conversation
d373597
to
5d9993f
Compare
Thank you for your pull request. This is an impressive contribution and we would like to include it. For the implementation part, we typically keep all command implementations in a single support class to avoid an excessive number of classes. I'm a bit confused why there are three variants, I'm also missing the entry point, i.e. how to obtain suspendable commands from a Redis Connection. Finally, it would make also sense to provide a bit of documentation (simply drop an asciidoc file into |
5d9993f
to
a898a40
Compare
My first idea was just to add extensions to async and reactive APIs (spring approach btw), but it is impossible now without changing a method signature/name/scope. Although suspend functions have a different signature in bytecode (by adding the
it was just simpler to generate and then just have one class that implements all segregated interfaces by delegating to the generated ones (see
Totally forgot, will add it soon val cmd1 = connection.reactive().asSuspendable()
val cmd2 = connection.async().asSuspendable()
Absolutely |
85f8662
to
380de5f
Compare
380de5f
to
3a129d1
Compare
Thanks. I'm going to take this pull request from here targeting the 6.0 RC2 release. Specifically, I'll keep only a single suspendable implementation based on top of the reactive API to avoid a maintenance hell. There's no actual reason to keep both implementations. |
Reduce Coroutine implementations to a single adapter using the reactive API. Rename implementations to Redis…Impl instead of Redis…ReactiveCommands. Remove comments from implementations as these are for internal use only. Refactor type hierarchy. Expose a specific Cluster Coroutines API. Update method signatures to accept non-null values only. Fix nullability definitions for Sentinel and Transaction API. Return Flow instead of List where applicable. Remove deprecated methods. Remove Coroutine access to the connection object to simplify future development. Remove suspend keyword for isOpen and other non-blocking methods. Remove StreamingChannel methods in favor of a Flow-based API. Add integration tests. Add license headers.
Thanks a lot for your contribution. That's merged and polished now. I removed all deprecated methods and I created a few tickets to polish up the code generator. Feel free to have a look if you want to contribute to Lettuce. |
That's great! |
Related issue: #1386