Skip to content
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

Service Proxies handling Observables #11

Closed
brunoriscado opened this issue May 18, 2015 · 2 comments
Closed

Service Proxies handling Observables #11

brunoriscado opened this issue May 18, 2015 · 2 comments

Comments

@brunoriscado
Copy link

This is relate with issue #5, which has been closed (but incorrectly in my opinion):

previous issue: #5

While the generated proxies offer an Observable handing implementation on the client side, there is no way for the handler to put and observable (coming from the service implementation side) in the eventbus for a reply.

So right now on the service implementation side, if you're doing any operations with an Observable you need to subscribe to those observables first, so that you then pass a concrete entity class into the handler.

I'm sure it is possible to put observable in the event bus, as I've done it before using Vertx Codecs/Buffer, but I'm not entirely sure what would be the best way to do it, once you enter the realm of dealing with the proxy generated handler classes?

Are you guys going to add such a feature?

@brunoriscado
Copy link
Author

This issue can be closed, at the time of opening it, I obviously failed to understand how the event bus worked locally.

In any case for anyone looking for an rxjava/observable solution that works across the hazelcast eventbus, we ended up serializing our request/responses into the event bus (using any of the pre available codecs, ex: byte[] or buffer) and unwrapping/wrapping them into observable streams on each side of the handlers, as all of our services reply with Observable<?>.

It is not the most elegant solution but seems to work without a lot of fuss.

@cescoffier
Copy link
Member

Thanks for the feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants