承接 awd-studio/es-lib 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

awd-studio/es-lib

最新稳定版本:v0.0.9.8-alpha

Composer 安装命令:

composer require awd-studio/es-lib

包简介

An advanced event-sourcing library for PHP 8.3+ designed to handle domain events effectively.

README 文档

README

This is a PHP library designed to simplify the implementation of Event Sourcing patterns in your applications. It provides a robust set of tools and abstractions to manage aggregates, events, event storage, and snapshots, enabling you to build scalable, maintainable, and auditable systems.

What is Event Sourcing?

Event Sourcing is a design pattern where changes to an application's state are captured as a sequence of events. Instead of storing only the current state, the application maintains a history of all events that have occurred. This approach offers several advantages, including:

  • Auditability: Every state change is recorded, providing a complete history.
  • Scalability: Events can be processed asynchronously or in parallel.
  • Reconstructability: Past states can be rebuilt by replaying events.

Features

  • Aggregates: Manage domain entities with built-in support for event sourcing.
  • Events: Define and handle domain events easily.
  • Event Store: Persist and retrieve events from a configurable storage backend.
  • Repositories: Simplify loading and saving aggregates.
  • Snapshots: Optimize performance by storing snapshots of aggregate states.

Installation

You can install ES Lib via Composer:

composer install awd-studio/es-lib

Usage

Se the example section.

Integration

To use the library in your projects, you need to implement such interfaces:

# Storage / DB layer

## Reading
\AwdEs\Event\Storage\Fetcher\EventFetcher::class
\AwdEs\Event\Storage\Fetcher\Handling\CriteriaHandlingCase::class

## Writing
\AwdEs\Event\Storage\Recorder\EventRecorder::class


# Metadata

## Applying
\AwdEs\Event\Applying\EventApplier::class

## Reading metadata
\AwdEs\Event\Handling\EventHandlerMethodResolver::class
\AwdEs\Meta\Event\EventMetadataResolver::class

License

This library is licensed under the MIT License. See the LICENSE file for details.

统计信息

  • 总下载量: 47
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-03-19