iluwatar / iluwatar/java-design-patterns
Acceptor-Connector pattern
Nobody has claimed this yet.
- 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:
- Extension and Java Implementation of the Reactor−Acceptor−Connector Pattern Combination
- Sample implementation
- Pattern-Oriented Software Architecture Volume 2: Patterns for Concurrent and Networked Objects
Acceptance Criteria:
- Implement the Acceptor component to handle incoming connection requests.
- Implement the Connector component to initiate outgoing connections.
- Implement the Handler component to manage established connections and business logic.
- Provide unit tests for each component to ensure proper functionality.
- Update documentation with usage examples and detailed descriptions of each component.
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 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