Skip to content
This repository has been archived by the owner on Aug 19, 2018. It is now read-only.

Redudant methods found at ServiceCall class #212

Open
artem-v opened this issue Jul 27, 2018 · 3 comments
Open

Redudant methods found at ServiceCall class #212

artem-v opened this issue Jul 27, 2018 · 3 comments
Labels
question Further information is requested

Comments

@artem-v
Copy link
Contributor

artem-v commented Jul 27, 2018

Mono<Void> oneWay(ServiceMessage request, Address address)

Mono<ServiceMessage> requestOne(ServiceMessage request, Class<?> responseType, Address address)

Flux<ServiceMessage> requestMany(ServiceMessage request, Class<?> responseType, Address address)

Looks like those methods were added for sending on concrete address, bypassing phase router.route()

Why we can't just set a custom router (it's just a biFunction) at serviceCall. In this case public api would remain clear (w/o those overloaded variants) and client would have to have to use setup mechanism in order to do something custom.

Looping @ronenhamias

@artem-v artem-v added the question Further information is requested label Jul 27, 2018
@ronenhamias
Copy link
Owner

there are rare cases where you want to control manually the addressing to specific endpoint
for example if you are developing some distributed algo such as leader election.

@artem-v
Copy link
Contributor Author

artem-v commented Jul 27, 2018

control manually the addressing

totally + 1 for this

there are rare cases

That's the point: it's rare. Hence let's not pollute public api with overloaded signatures. In such cases let's client go and define a custom router on service call.

@ronenhamias
Copy link
Owner

ronenhamias commented Jul 27, 2018

router does not answer the case as with router you delegate it to router to make decesion
in this case we already know what is the target.

anyhow its not written in stone so if you think there is much better alternative please do suggest :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants