iluwatar / iluwatar/java-design-patterns

Acceptor-Connector pattern

Open
#231 2 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 Acceptor-Connector design pattern decouples connection establishment from connection handling in networked systems. The pattern's main components are the Acceptor, Connector, and Handler. The Acceptor is responsible for listening for incoming connection requests and creating a new connection. The Connector actively initiates connections to a remote service. Once a connection is established, the Handler takes over to manage the communication between peers.

Implementing this pattern will improve the system’s scalability and flexibility by separating connection handling from business logic, allowing each component to be managed and extended independently.

References:

  1. Extension and Java Implementation of the Reactor−Acceptor−Connector Pattern Combination
  2. Sample implementation
  3. Pattern-Oriented Software Architecture Volume 2: Patterns for Concurrent and Networked Objects

Acceptance Criteria:

  1. Implement the Acceptor component to handle incoming connection requests.
  2. Implement the Connector component to initiate outgoing connections.
  3. Implement the Handler component to manage established connections and business logic.
  4. Provide unit tests for each component to ensure proper functionality.
  5. Update documentation with usage examples and detailed descriptions of each component.

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

Start by reviewing the repository's existing Java design-pattern implementations and the three referenced Acceptor-Connector resources. Define the Acceptor, Connector, and Handler boundaries, add unit tests for each component, and update documentation with usage examples and component descriptions.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.