Closed nyh closed 1 year ago
@nyh I'm wondering if this feature is production ready/is planned to get merged in sometime? We're looking to use this feature at our company.
Good question. @elcallio did you do anything with this recently? If not, I guess I can do this myself - should be fairly straightfoward, right @elcallio ?
IIRC, the annoying thing is that you need to literally override the actual client in sdk v2, so it is somewhat more intrusive than the v1 requesthandler approach. But you should just be able to move AlternatorAsyncHttpClient
and include it in the load balance library. You probably need to do a similar class for the sync case.
If you want I can try to do v2 versions of the loadbalance lib, but is the goal to have one artifact for both SDK v1 and SDK v2? Since they changed namespaces, I guess it would be technically possible, though third-party dependencies might be troublesome...
I don't think it really matters if we have just one artifact for both, or even the same instructions. Every user will know which instructions and/or library they need, and pick the right one.
Yes
Closing as solved by #10 which I just merged.
@elcallio maybe you can add at least a few lines for example how to use this new async version in java/README.md? Otherwise I fear users will have no idea how to use it.
In https://github.com/elcallio/kraken-dynamo/blob/master/syncer/src/main/java/com/scylladb/alternator/AlternatorAsyncHttpClient.java @elcallio use AWS SDK v2's asynchronous (future-based) API, and added load balancing support to it. We should also add such support (and documentation for it) in the alternator-load-balancing project.