-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the Murphy for Delphi documentation! Murphy is a comprehensive Chaos Engineering library for Delphi that provides ready-to-use implementations of common resilience and fault-tolerance patterns.
Important
Warning: some of this documentation was generated or reworked with an LLM tool (Claude). It may therefore contain errors and/or inaccuracies. If you encounter any, please report the issue or propose a fix by submitting a pull request.
- Introduction - What is Murphy and why use it
- Getting Started - Installation and first steps
- Chaos Engineering Basics - Understanding Chaos Engineering principles
- Architecture - Design principles and internal architecture
-
API Reference Index
- Base Policy - Core interfaces and base classes
- Retry Policy - Retry pattern API
- Circuit Breaker Policy - Circuit Breaker pattern API
- Fallback Policy - Fallback pattern API
- Rate Limit Policy - Rate Limit pattern API
- Retry Pattern - Automatic retry with configurable delays
- Circuit Breaker Pattern - Prevent cascading failures
- Fallback Pattern - Provide alternative results on failure
- Rate Limit Pattern - Control operation rate
- Combining Patterns - Advanced: Using multiple patterns together
- Testing with Murphy - Unit testing and test mode
- Best Practices - Recommendations and common pitfalls
- Contributing - How to contribute to Murphy
# Using Boss package manager
boss install github.com/marcobreveglieri/murphy-delphiuses Murphy.Policy.Retry;
var
RetryPolicy: IRetryPolicy;
begin
// Create a retry policy
RetryPolicy := TRetryBuilder.Create
.Handle(EIdHTTPProtocolException)
.Retry(3)
.Wait(TTimeSpan.FromSeconds(1))
.Build;
// Execute code with automatic retry
RetryPolicy.Execute(
procedure
begin
// Your code here - will be retried on failure
MakeHttpRequest;
end);
end;| Pattern | Purpose | Use Case |
|---|---|---|
| Retry | Automatically retry failed operations | Transient network errors, temporary service unavailability |
| Circuit Breaker | Prevent cascading failures | Protect against persistent downstream failures |
| Fallback | Provide alternative results | Return cached data, default values, or degraded functionality |
| Rate Limit | Control operation rate | Prevent API throttling, protect resource consumption |
- Delphi 11 Alexandria or later
- Supports Windows (Win32, Win64)
Murphy for Delphi is released under the MIT License. See the LICENSE file for details.
We welcome contributions! Please see our Contributing Guide for details on how to get started.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Next Steps: Start with the Introduction to learn more about Murphy, or jump straight to Getting Started to begin using the library.