-
-
Notifications
You must be signed in to change notification settings - Fork 106
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 new service annotation - @Method(GET|POST|PUT|...)
#861
Comments
Depends on #856 |
Consider moving the routing strategy from "client" side to discovery layer |
Plz elaborate more on this. |
When invoking service to service call, the caller (in this case a service acts like a client) uses the routing strategy (e.g. round-robin, random) based on the annotations, but IMHO the discovery layer should handle it. by that I mean that the service cluster discovery would do the load balancing and routing. And as always it is great to collaborate once again 😄 |
Yes, Im also glad to see you and your comments (despite that I don't agree with them) : ))
Yes, this is how to it works today, we don't bother which service instance to call. When RESTful support will be implemented on HTTP gateway, it will not be "shift in paradigms" "this change everything", no, it will be just a good extension of HTTP gateway, i.e those who loves RESTful approach will be able to write services in RESTful approach.
No, it never was like that.
In scalecube it's different philosophy, we let client to choose load balancing and routing strategies. If he doesn't want to deal with that, fine, round-robin will be used. If default round-robin is a concern, then no problem - implement consistent-hashing, or least-resources load-balancing. I.e philosophy is to - don't centralize decision making, delegate responsibility if it's "delegatable". |
Add support of optional service annotation
@Method
with value as HTTP method. Must be defined only on methods with annotation@ServiceMethod
.Idea is to support clients who wants to call scalecube service through the HTTP gateway and to support http methods RESTful semantic.
Expected changes
scalecube-services-api
with all http methods.ServiceReference
,ServiceMethodDefinition
objects must havemethod
field (optional).RandomServiceRouter
andRoundRobinServiceRouter
) so they begin to supportmethod
in the routing logic.Depends on
#856
The text was updated successfully, but these errors were encountered: