iluwatar / iluwatar/java-design-patterns

Service Registry pattern

Open
#383 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

epic: pattern info: help wanted type: feature
Dominant language
Java
Stars
94.7k
Forks
27.4k
Avg merge
3d 4h
Merged PRs (30d)
10

Description

Description

The Service Registry design pattern is a central service registry that maintains a database of available services. It acts as a lookup mechanism, allowing services to register themselves and clients to discover services. This pattern is crucial for service-oriented architectures (SOA) and microservices, facilitating dynamic discovery and decoupling of service consumers and providers.

Main Elements of the Pattern
  1. Service Registry: A central database that holds the details of available services, such as their network locations and interfaces.
  2. Service Provider: Registers its service with the service registry, providing metadata such as the service name, version, and network address.
  3. Service Consumer: Queries the service registry to find services and obtain their metadata for consumption.
  4. Heartbeat Mechanism: Ensures that the service registry has up-to-date information about the service availability through periodic heartbeat messages from the service providers.
References

Acceptance Criteria

  1. Implement a basic service registry that can register services and allow querying for service details.
  2. Include a heartbeat mechanism for service providers to periodically update their status in the registry.
  3. Provide example implementations of a service provider registering itself and a service consumer querying the registry.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No project files or tests are named. Start by reading the Project Contribution Guidelines and the linked Service Registry Pattern reference, then inspect existing Java pattern conventions in the repository. Done means a service registry supports registration, querying, heartbeat updates, and examples for both a provider and a consumer.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.