-
Notifications
You must be signed in to change notification settings - Fork 37.8k
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
Add support for flagging an interface to declaratively expose it as an rsocket remote service #32827
Comments
It's not clear what you mean. On the one hand, you mention service exporters which reference the implementation to use. On the other, autogen and proxy which is to create a client, but we already have that with |
@rstoyanchev sorry for the confusion.
having to write all the controller boilerplate for backend services is ridiculous vs the above snippet. |
I understand now. Can you add |
@rstoyanchev imo the declarative service exporters were completely viable post java annotations, they worked! @MessageMapping is method level only, so far from convenient:
Also, afaik its stomp only. I like stomp well enough, but it's not rsocket. It's also not really what I want. I have literally hundreds of interfaces I want to expose as services. The old apache cxf libraries do this for soap without pain, and without requiring modification, or annotation of those interfaces. The old declarative service exporters also could have supported my case with minimal effort. |
@jeacott1 have you looked at the documentation? Annotations declare routes, which allows us to map incoming requests to specific methods. How would this be expressed and done otherwise? I suppose you're asking for us to also create a client that inserts metadata in the RSocket request that indicates the service/method to call on the server side, and of course this would only work if using that client we would provide. |
@rstoyanchev yes I have, and I think you are missing the point. In order to practically use @MessageMapping I'd have to create myself a controller endpoint, and then manufacture myself (or leverage something) an RPC protocol, build myself a proxy that can map the incoming messages to the appropriate interface methods, and then build myself a client lib generator so that clients could use the rpc client. Spring remoting, particularly with hessian previously gave me all of this for the cost of a few lines of code! its simply not possible now without resurrecting and altering old spring code or DIY from scratch. What I'd like to be able to do is in the most simple way possible define service endpoints without touching existing code. |
Right, for this to work, both client and server have to agree on the routing metadata used. That means not only a service exporter but also a declarative client proxy. You mentioned the declarative rsocket client option that's now available, but that's not the same. What is available currently with the RSocket Interface expects an There are some customizations possible. In short, I think what we have with the RSocket service interface support is already quite close to what you are asking for. It just requires the |
@rstoyanchev it sounds like you have something in mind here. I'm not entirely sure its what I'm looking for, but what you suggest sounds ok. " In addition, we could explore first class support for a mode where you only need an interface, and routes are determined using default conventions." |
I have already implemented an RPC framework for RSocket in my framework. You can check out my code repository. I am starting a business and this is my open-source framework. The README.md is not up-to-date, but I will update it once the project is finished, as my team needs the documentation.
Moreover, this information is not stored in Redis cache and does not require network retrieval every time. Instead, it is included in the socket setup when establishing the connection through the RPC framework and then extracted into the contentView. The RPC framework utilizes a service registry such as Nacos or Zookeeper, or even direct TCP connections, for service calls." https://github.com/MrWangGang/lambda-framework Service Provider:
Service Consumer
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@MrWangGang I think it's useful to have a reference to such framework. However, this issue is not the right place for further details on how it works. |
Firstly, I'm pointing out that the
Yes, this is what I was also alluding to earlier. We can only help with Java peer interactions, not with other languages. There is no codegen involved, and this is not different from declarative service exporters. |
I really miss declarative service exporters.
I'm happy to see the declarative rsocket client option available, but the serverside still requires a ton of boilerplate. Creating controllers to mirror service interfaces is tedious.
To this end I'd like to see an option to trivially mark an interface and have it autogen the proxy etc required to expose it as an rsocket service. This should work with webflux and mvc worlds.
thoughts?
The text was updated successfully, but these errors were encountered: