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

Simplified service discovery and refactoring of registry events #342

Merged
merged 8 commits into from
Sep 18, 2018

Conversation

segabriel
Copy link
Member

@segabriel segabriel commented Sep 12, 2018

part of #331

Motivation:
For now, we have two approaches to subscribe to an available/unavailable endpoint events. But the way via discovery has a side effect. because we can receiver registered event with some endpoint inside it and this endpoint is not registered in the service registry yet.

@@ -23,7 +23,9 @@

ServiceEndpoint unregisterService(String endpointId);

Flux<RegistryEvent> listen();
Flux<ReferenceRegistryEvent> listenReferenceEvents();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont like this contract its bloated to have this kind in the interface

maybe we can provide more clean interface?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something like:

listen(RegistryEvent::reference)

listen(RegistryEvent::endpoint)

Flux<RegistryEvent> listen();
Flux<ReferenceRegistryEvent> listenReferenceEvents();

Flux<EndpointRegistryEvent> listenEndpointEvents();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

…rvices

# Conflicts:
#	benchmarks/src/main/java/io/scalecube/services/benchmarks/services/ServicesBenchmarksState.java
#	examples/src/main/java/io/scalecube/examples/BootstrapExample.java
#	examples/src/main/java/io/scalecube/examples/helloworld/Example1.java
#	examples/src/main/java/io/scalecube/examples/helloworld/Example2.java
#	examples/src/main/java/io/scalecube/examples/orderbook/Example1.java
#	services/src/test/java/io/scalecube/services/ErrorFlowTest.java
#	services/src/test/java/io/scalecube/services/ServiceCallRemoteTest.java
#	services/src/test/java/io/scalecube/services/ServiceRegistryEventsTest.java
#	services/src/test/java/io/scalecube/services/ServiceRemoteTest.java
#	services/src/test/java/io/scalecube/services/ServiceTransportTest.java
#	services/src/test/java/io/scalecube/services/StreamingServiceTest.java
#	services/src/test/java/io/scalecube/services/routings/RoutersTest.java
#	services/src/test/java/io/scalecube/services/routings/ServiceTagsExample.java
@segabriel segabriel merged commit 06370d9 into develop Sep 18, 2018
@segabriel segabriel deleted the feature/hide-service-discovery-in-microservices branch September 18, 2018 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants