-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
How to enable the client to support reactive #2379
Comments
@zhaojiq : I think it might be quite involved effort. Would you like to elaborate a bit on how you plan to add this reactive support? You can also go ahead and create PR before discussing, we can discuss there also. |
@rohanKanojia Yes, it's going to do a lot of things, and it seems easier to reconstruct a reactive version of the client based on okhttp3. So do we have such a plan? (reusing our design and models, and some methods are turned into a reactive implementation.) Or do you think it's necessary? |
Hi @zhaojiq A few months back I created a PoC for a Kubernetes Client with a different approach to that of the existent clients. Besides reasons like having low-level access to the REST API and less opinionated configurations and helpers (which are really good for most of the users, but a problem for a few), another motivation was to have reactive support from the start. For list-like endpoints you will get reactive watchers (using ReactiveX), here you will find some examples of its usage: And also vanilla Java Stream support: Coming back to your question, I think adding Reactive support for the client is possible but it would be quite an involved challenge given its current state and code generation methods. |
Thx @manusa I'll try to write a sample implementation. So |
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions! |
any update about this topic ? |
@aleboulanger with 6.0 the core of the client and 2 of the http client implementations (jdk and jetty) are mostly reactive and make conservative use of threads - the okhttp client of course still does not. So with 6.0 and the jdk client you can for example create as many informers as you want and they will all share the same jdk client worker pool, rather than holding multiple threads per informer. However that core logic has not been exposed directly to the end user. |
Hi ,
I'll use Kubernetes or OpenShift clients in reactive frameworks(such as projectreactor or rxjava2 and so on.) that typically make asynchronous calls easier and consume fewer threads. Typically, Kubernetes api responsed in a relatively short period of time, but when Kubernetes has a problem, the time becomes uncontrollable. Also because it is a synchronous pattern, a limited number of threads in the reactive framework maybe cause other businesses to be blocked.
If we don't have time for reactive support for the time being, I'd be happy to contribute to this feature.
The text was updated successfully, but these errors were encountered: