iluwatar / java-design-patterns

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

Implement Fallback design pattern #2846

Open iluwatar opened 8 months ago

iluwatar commented 8 months ago

Description: The Fallback design pattern is a resiliency pattern used in microservices architecture to handle failures gracefully. It ensures that when a service is unavailable or fails, the system can continue to operate by providing an alternative response or executing a predefined fallback mechanism. This pattern enhances the robustness and reliability of microservices by preventing cascading failures and improving the overall user experience.

Main Elements of the Pattern:

References:

  1. Microservices Patterns - Fallback
  2. Spring Cloud Netflix - Hystrix Fallback
  3. Resilient Microservices with Spring Boot and Hystrix
  4. Java Design Patterns - Contribution Guidelines
  5. Fallback pattern

Acceptance Criteria:

  1. Implement a Fallback design pattern in the existing microservices architecture.
  2. Ensure the primary service call and fallback handlers are properly defined and integrated.
  3. Use a Circuit Breaker pattern to monitor the health of the primary service.
  4. Configure timeouts for service calls to trigger fallback mechanisms promptly.
  5. Provide unit and integration tests to validate the fallback functionality.
  6. Document the implementation details and usage instructions in the project’s README file.
sharathkumar55 commented 7 months ago

Hi @iluwatar could you please assign this task to me so that I can start work on this .Thank you!!

stale[bot] commented 3 months ago

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.

hrishikesav commented 3 months ago

Hi @iluwatar, please assign this issue to me. I have an approach to implement this pattern. Thank you.

stale[bot] commented 8 hours ago

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.