iluwatar / java-design-patterns

Design patterns implemented in Java
https://java-design-patterns.com
Other
89.71k stars 26.55k forks source link

Pessimistic Offline Lock pattern #1307

Open iluwatar opened 4 years ago

iluwatar commented 4 years ago

Description

The Pessimistic Offline Lock design pattern ensures that only one process can access a particular resource at a time, preventing concurrent modifications and ensuring data consistency. This pattern is particularly useful in distributed systems where multiple processes might attempt to modify the same data. By locking resources before making changes, this pattern avoids conflicts and maintains data integrity.

Main elements of the pattern:

References

Acceptance Criteria

  1. Implement a lock management system that allows resources to be locked and unlocked by processes.
  2. Ensure that the lock management is integrated with transaction handling to maintain data consistency and avoid deadlocks.
  3. Document the implemented pattern with code examples and usage instructions in accordance with the project's contribution guidelines.
SangJinHyun commented 3 years ago

I would like to try and tackle this issue.

iluwatar commented 3 years ago

I'm happy to hear you're interested @SangJinHyun. The issue is now assigned to you. Looking forward to your pull request!

SangJinHyun commented 3 years ago

Thank you. I will begin working on it.

mhe98 commented 2 years ago

@iluwatar, would you mind assigning this issue to me? I would like an attempt to implement this offline concurrency pattern. Thanks!

iluwatar commented 2 years ago

Ok @mhe98

stale[bot] commented 1 year ago

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