Skip to content
Marco Breveglieri edited this page Nov 24, 2025 · 2 revisions

Murphy for Delphi - Documentation

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.

Table of Contents

Getting Started

Core Concepts

  • Architecture - Design principles and internal architecture

API Reference

Pattern Guides

Advanced Topics

Quick Links

Installation

# Using Boss package manager
boss install github.com/marcobreveglieri/murphy-delphi

Quick Example

uses 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;

Supported Patterns

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

Requirements

  • Delphi 11 Alexandria or later
  • Supports Windows (Win32, Win64)

License

Murphy for Delphi is released under the MIT License. See the LICENSE file for details.

Contributing

We welcome contributions! Please see our Contributing Guide for details on how to get started.

Support


Next Steps: Start with the Introduction to learn more about Murphy, or jump straight to Getting Started to begin using the library.

Clone this wiki locally