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

WIP: Implement application discovery with Spring Netflix #74

Open
wants to merge 18 commits into
base: spring-2-rewrite
Choose a base branch
from

Conversation

punycode
Copy link
Member

This will adapt the previous mechanism for CoffeeNet application discovery to the current Spring Netflix stack, while trying to keep it hidden behind interfaces, that will let us replace the stack easily.

The associated issue is #69.

@punycode punycode changed the title Implement application discovery with Spring Netflix WIP: Implement application discovery with Spring Netflix May 30, 2020
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 7, 2020

SonarCloud Quality Gate failed.

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 5 Code Smells

100.0% 100.0% Coverage
5.6% 5.6% Duplication

The `DefaultCoffeeNetApplication` is a default implementation, that cannot
instantiated or subclassed and is only constructable by a builder. We
move the builder to the actual `CoffeeNetApplication` interface and hide
the default implementation at the package level.
Since we may want to serialize the domain interfaces to JSON, we should
add consistent naming for the resulting JSON keys emitted.
This adds the allowed authorities feature to `CoffeeNetApplication`
instances. This is instantly deprecated, since we will use this only to
temporarily add the previously present Eureka based application
discovery service.
Those parameters are not available in JDK 8 and have been added later.
Similar to the previous service API in `CoffeeNetAppService#getApps(AppQuery)`
this simple interface will allow filtering the applications. The
implementation for those services will be part of another module.
This is based on the original implementation in the legacy CoffeeNet. It
uses a Spring Cloud based `DiscoveryClient` and is not tied to a
particular implementation like Eureka.

This way it can be used with either Eureka or with a statically
configured `SimpleDiscoveryClient`. Theoretically it could also use the
Kubernetes based version, but this one does not really work for services
exposed to the outside world.
…pplications

This adds an instance of `CoffeeNetApplications` to the application
context, if there is a discovery client available and the
`rocks.coffeenet.platform.discovery` dependency has been added to your
application.
@punycode punycode force-pushed the spring-netflix-eureka branch from a96b1ce to 5270b8a Compare November 7, 2020 14:45
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 7, 2020

SonarCloud Quality Gate failed.

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 5 Code Smells

100.0% 100.0% Coverage
5.6% 5.6% Duplication

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

Successfully merging this pull request may close these issues.

Migrate service/application discovery mechanism to Spring Boot 2.x/Spring Cloud Hoxton
1 participant