spring-cloud / spring-cloud/spring-cloud-commons
Provide Spring gRPC DiscoveryClient integration
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 751
- Forks
- 744
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
Description
spring-projects/spring-grpc issue #341 requested support for resolving gRPC client targets such as discovery:///service-name through Spring Cloud DiscoveryClient.
A working prototype was implemented in spring-grpc, but Spring gRPC maintainers noted that this integration should live on the Spring Cloud side because of the dependency direction between Spring Boot, Spring gRPC and Spring Cloud:
Proposed Scope
Add a Spring Cloud module that bridges Spring Cloud service discovery with Spring gRPC by:
- resolving
discovery:///service-nametargets throughDiscoveryClient - refreshing resolved addresses when Spring Cloud publishes a
HeartbeatEvent - preferring the
gRPC_portmetadata entry and falling back to the regular service instance port - optionally publishing
spring.grpc.server.portasgRPC_portmetadata through theRegistrationabstraction when metadata is mutable
Why This Belongs Here
The implementation depends on Spring Cloud abstractions such as:
DiscoveryClientHeartbeatEventRegistration
while the gRPC side can stay limited to Spring gRPC extension points.
Prior Art / Prototype
The current prototype and discussion live here:
- Spring gRPC issue: https://github.com/spring-projects/spring-grpc/issues/341
- Spring gRPC PR: https://github.com/spring-projects/spring-grpc/pull/394
Question
Would Spring Cloud Commons accept this as:
- a new module in this repository, or
- a different Spring Cloud repository / subproject?
If this repository is acceptable, I can adapt the current prototype to match Spring Cloud Commons conventions and open a PR here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the prototype and discussion in spring-grpc issue #341 and PR #394, then review the DiscoveryClient, HeartbeatEvent, and Registration abstractions named here. Confirm the module location and Spring Cloud Commons conventions before adapting the integration; done means discovery:/// targets resolve, heartbeat changes refresh addresses, and gRPC_port metadata behavior is covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- backend-api-design, cloud, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100