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

Disruptor Pattern #112

Open
npathai opened this issue Jul 24, 2015 · 9 comments
Open

Disruptor Pattern #112

npathai opened this issue Jul 24, 2015 · 9 comments

Comments

@npathai
Copy link
Contributor

npathai commented Jul 24, 2015

Description:
The Disruptor is a high-performance inter-thread messaging library. It provides a way to achieve high throughput and low latency in message processing systems. The main elements of the Disruptor pattern include:

  1. Ring Buffer: A pre-allocated circular buffer that holds the data to be processed. The ring buffer is the core of the Disruptor, allowing for efficient memory allocation and access.
  2. Event Processors: Components that consume events from the ring buffer. They can be set up in different configurations such as single, multiple, or parallel consumers.
  3. Sequencers: Components that control the order of events being processed. They ensure that events are processed in the correct sequence and manage dependencies between different event processors.
  4. Producers: Components that publish events to the ring buffer. Producers write data to the ring buffer, which is then consumed by the event processors.
  5. Wait Strategies: Strategies that determine how consumers wait for events to be available in the ring buffer. Different strategies can be used to balance between CPU usage and latency.

References:

  1. Disruptor Pattern Wikipedia
  2. LMAX Disruptor: High Performance Inter-thread Messaging Library
  3. Martin Fowler on LMAX Architecture

Acceptance Criteria:

  1. Implement a ring buffer with configurable size to hold the events.
  2. Develop event processors that consume events from the ring buffer, supporting different processing configurations.
  3. Ensure proper sequencing of events using a sequencer component.
  4. Implement producers that can publish events to the ring buffer efficiently.
  5. Include at least one wait strategy for managing how consumers wait for events.

Please refer to the project contribution guidelines before submitting your pull request.

@iluwatar
Copy link
Owner

Great find @npathai 👍

@npathai
Copy link
Contributor Author

npathai commented Jul 29, 2015

@iluwatar Yup its an amazing pattern. I will keep adding newer ones. I like learning patterns and will contribute lot here. :)

@iluwatar
Copy link
Owner

@jomariabejo
Copy link

Hello everyone! I'm new to Java Design Patterns and excited to contribute.
I'd love some guidance on how I can be of assistance here. Specifically, are there plans to incorporate a new module focusing on the 'Disruptor' pattern? I'm eager to learn and contribute to its implementation if that's in line with the project's objectives.

@iluwatar
Copy link
Owner

iluwatar commented Dec 5, 2023

Sure, check here first https://github.com/iluwatar/java-design-patterns/wiki/01.-How-to-contribute

Study the existing design patterns. The new one is expected to follow the same technical structure.

@jomariabejo
Copy link

Thank you for talking me to the requirements for contributions. Before proposing the Disruptor pattern implementation, I'll thoroughly research the existing design patterns to ensure they correspond with the technical structure.

Copy link

stale bot commented Feb 4, 2024

This issue has been automatically marked as stale because it has not had recent activity. The issue will be unassigned if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status: stale issues and pull requests that have not had recent interaction label Feb 4, 2024
@stale stale bot removed the status: stale issues and pull requests that have not had recent interaction label Mar 24, 2024
@iluwatar iluwatar added info: help wanted status: stale issues and pull requests that have not had recent interaction labels Mar 24, 2024
@stale stale bot removed the status: stale issues and pull requests that have not had recent interaction label Mar 24, 2024
@iluwatar
Copy link
Owner

Updated task description

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