Skip to content

Commit bbd546f

Browse files
anconguiAndrés Contreras Guillén
andauthored
feat: add pyfly.domain DDD primitives + OrderService sample (v26.05.02) (#8)
Adds the DDD building blocks that mirror fireflyframework-starter-domain (Java) and FireflyFramework.Starter.Domain (.NET), plus a complete OrderService sample that exercises every primitive end-to-end. pyfly.domain (new module, zero runtime dependencies) - Entity[TID]: identity-based equality, transient/persisted distinction, (type, id) hashing. - ValueObject: marker base for @DataClass(frozen=True) records with structural equality, immutability, replace() helper. - AggregateRoot[TID]: extends Entity[TID] with a pending_events buffer (raise_event / pending_events / clear_events). Distinct from the event-sourced pyfly.eventsourcing.AggregateRoot; both coexist. - DomainEvent: frozen-dataclass base with auto-assigned UUID event_id, UTC occurred_at, and event_type defaulted to the subclass name. - Specification[T]: composable in-memory predicate with & / | / ~ combinators and a Specification.of(callable) factory. - DomainRepository[A, TID]: runtime-checkable collection-like protocol (add, find, remove, next_id). - DomainException, BusinessRuleViolation (DOMAIN_RULE_VIOLATION), AggregateNotFound (DOMAIN_AGGREGATE_NOT_FOUND): extend pyfly.kernel.BusinessException so the existing RFC 7807 mappers translate them automatically. - pyfly.starters.domain re-exports every primitive alongside enable_domain_stack so a single import line is enough for a domain-tier service. OrderService sample (samples/order_service/) Mirrors the layered split used by Java domain microservices in firefly-oss and the .NET FireflyFramework.Samples.OrdersService: interfaces/ DTOs + enums (PlaceOrderRequest, OrderDto, OrderStatus) models/ Order aggregate root + repository (port + InMemory adapter) core/ Commands, queries, handlers, mapper, ConfirmOrderSaga web/ @rest_controller for /api/v1/orders sdk/ Typed httpx-based client app.py @pyfly_application + @enable_domain_stack Order is a real AggregateRoot[str] with state-machine invariants enforced by BusinessRuleViolation. PlaceOrderHandler creates and persists the aggregate and publishes its pending events. ConfirmOrderSaga walks the order through PLACED -> INVENTORY_RESERVED -> PAID -> SHIPPED with full compensation via three stub external services (InventoryService, PaymentService, ShippingService). 13/13 end-to-end tests pass against the real CQRS bus and saga engine -- no mocks. Fixed: async saga and TCC step support @saga_step / @try_method / @confirm_method / @cancel_method used to wrap the target with a synchronous functools.wraps adapter that masked inspect.iscoroutinefunction. The engine therefore called async def steps without await and the actual coroutine never ran. The wrappers were no-ops; metadata is now attached directly to the original function. Regression test pinned in tests/transactional/saga/test_async_steps.py. Versioning - pyproject.toml: 26.5.1 -> 26.5.2 - pyfly.__version__: 26.05.01 -> 26.05.02 - install.sh PYFLY_VERSION: 26.05.01 -> 26.05.02 - README badge, install URLs, "Current" section, Modules count (38 -> 39) - ROADMAP marks Phase 4 DDD as complete; Backoffice and Utils planned - CHANGELOG.md adds v26.05.02 entry - New module guide docs/modules/domain.md 42 new tests (35 domain + 1 async-saga regression + 13 sample). All existing tests still pass (1279 in the impacted slices). Co-authored-by: Andrés Contreras Guillén <ancongui@Andress-MacBook-Pro.local>
1 parent 0172266 commit bbd546f

68 files changed

Lines changed: 3471 additions & 58 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,92 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66

77
---
88

9+
## v26.05.02 (2026-05-08)
10+
11+
### Added — `pyfly.domain` DDD building blocks
12+
13+
A new pure-Python module that mirrors `fireflyframework-starter-domain`
14+
(Java) and `FireflyFramework.Starter.Domain` (.NET). Zero runtime
15+
dependencies — just standard-library Python — so it imports from any
16+
layer of the application.
17+
18+
- **`pyfly.domain.Entity[TID]`** — base class with identity-based
19+
equality, transient-vs-persisted distinction, and `(type, id)` hashing.
20+
- **`pyfly.domain.ValueObject`** — marker base for `@dataclass(frozen=True)`
21+
records with structural equality, immutability, and a uniform
22+
`replace(...)` helper.
23+
- **`pyfly.domain.AggregateRoot[TID]`** — extends `Entity[TID]` with a
24+
`pending_events` buffer plus `raise_event` / `pending_events` /
25+
`clear_events`. Distinct from the event-sourced
26+
`pyfly.eventsourcing.AggregateRoot`; both coexist.
27+
- **`pyfly.domain.DomainEvent`** — frozen-dataclass base that
28+
auto-assigns a UUID `event_id` and UTC `occurred_at` timestamp; the
29+
`event_type` property defaults to the subclass name.
30+
- **`pyfly.domain.Specification[T]`** — composable in-memory predicate
31+
with `&` / `|` / `~` combinators and a `Specification.of(callable)`
32+
factory.
33+
- **`pyfly.domain.DomainRepository[A, TID]`** — runtime-checkable
34+
collection-like protocol (`add`, `find`, `remove`, `next_id`).
35+
- **`pyfly.domain.DomainException`** + **`BusinessRuleViolation`**
36+
(`code="DOMAIN_RULE_VIOLATION"`) + **`AggregateNotFound`**
37+
(`code="DOMAIN_AGGREGATE_NOT_FOUND"`) — extend
38+
`pyfly.kernel.BusinessException` so existing RFC 7807 mappers,
39+
filters, and `@controller_advice` handlers translate them
40+
automatically.
41+
- **`pyfly.starters.domain`** now re-exports every primitive above
42+
alongside `enable_domain_stack`, so a single import line is enough
43+
for a domain-tier service.
44+
45+
### Added — OrderService sample
46+
47+
`samples/order_service/` is a complete, runnable DDD microservice that
48+
mirrors the layered split used by Java domain services in
49+
[`firefly-oss`](https://github.com/firefly-oss) and the .NET
50+
`FireflyFramework.Samples.OrdersService`:
51+
52+
```
53+
samples/order_service/
54+
├── interfaces/ DTOs + enums (PlaceOrderRequest, OrderDto, OrderStatus)
55+
├── models/ Order aggregate root + repository (port + in-memory adapter)
56+
├── core/ Commands, queries, handlers, mapper, ConfirmOrderSaga
57+
├── web/ @rest_controller exposing /api/v1/orders
58+
├── sdk/ Typed httpx-based client
59+
└── app.py @pyfly_application + @enable_domain_stack
60+
```
61+
62+
`Order` is a real `AggregateRoot[str]` with state-machine invariants
63+
enforced by `BusinessRuleViolation`. `PlaceOrderHandler` creates and
64+
persists the aggregate and publishes its pending events.
65+
`ConfirmOrderSaga` walks the order through
66+
`PLACED → INVENTORY_RESERVED → PAID → SHIPPED` with full compensation
67+
via three stub external services (`InventoryService`, `PaymentService`,
68+
`ShippingService`). 13/13 end-to-end tests pass against the real CQRS
69+
bus and saga engine — no mocks.
70+
71+
### Fixed — async saga and TCC step support
72+
73+
The `@saga_step`, `@try_method`, `@confirm_method`, and `@cancel_method`
74+
decorators used to wrap the target function with a synchronous
75+
`functools.wraps` adapter. That made `inspect.iscoroutinefunction`
76+
return `False` for `async def` steps, so the engine called them
77+
without `await` and the actual coroutine never ran. The wrappers were
78+
no-ops (they just forwarded args to the original); they have been
79+
removed and the metadata is now attached directly to the original
80+
function. Regression test added at
81+
`tests/transactional/saga/test_async_steps.py`.
82+
83+
### Documentation
84+
85+
- New module guide [`docs/modules/domain.md`](docs/modules/domain.md)
86+
with end-to-end examples for every primitive.
87+
- README adds a "Domain — DDD Building Blocks" section to the
88+
Featured Patterns and a row to the Modules table; module count
89+
updated from 38 to 39.
90+
- ROADMAP marks Phase 4 DDD as complete; Backoffice and Utils remain
91+
planned.
92+
93+
---
94+
995
## v26.05.01 (2026-05-07)
1096

1197
### CalVer migration

README.md

Lines changed: 77 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<a href="https://github.com/fireflyframework"><img src="https://img.shields.io/badge/Firefly_Framework-official-ff6600?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0id2hpdGUiIGQ9Ik0xMiAyQzYuNDggMiAyIDYuNDggMiAxMnM0LjQ4IDEwIDEwIDEwIDEwLTQuNDggMTAtMTBTMTcuNTIgMiAxMiAyeiIvPjwvc3ZnPg==" alt="Firefly Framework"></a>
1212
<a href="https://www.python.org/"><img src="https://img.shields.io/badge/python-3.12%2B-blue?logo=python&logoColor=white" alt="Python 3.12+"></a>
1313
<a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-green" alt="License: Apache 2.0"></a>
14-
<a href="#"><img src="https://img.shields.io/badge/version-26.05.01-brightgreen" alt="Version: 26.05.01"></a>
14+
<a href="#"><img src="https://img.shields.io/badge/version-26.05.02-brightgreen" alt="Version: 26.05.02"></a>
1515
<a href="#"><img src="https://img.shields.io/badge/type--checked-mypy%20strict-blue?logo=python&logoColor=white" alt="Type Checked: mypy strict"></a>
1616
<a href="#"><img src="https://img.shields.io/badge/code%20style-ruff-purple?logo=ruff&logoColor=white" alt="Code Style: Ruff"></a>
1717
<a href="#"><img src="https://img.shields.io/badge/async-first-brightgreen" alt="Async First"></a>
@@ -732,6 +732,68 @@ class StripePayment(PaymentMethod):
732732

733733
The plugin manager resolves the dependency graph, loads plugins in order, and registers extensions with the DI container. See [docs/modules/plugins.md](docs/modules/plugins.md).
734734

735+
### Domain — DDD Building Blocks
736+
737+
`pyfly.domain` ships the foundational types every domain-driven design codebase ends up reinventing — `Entity`, `ValueObject`, `AggregateRoot`, `DomainEvent`, `Specification`, `DomainRepository`, and domain-flavoured exceptions. The module is **pure standard-library Python** with zero runtime dependencies.
738+
739+
```python
740+
from dataclasses import dataclass
741+
from pyfly.domain import AggregateRoot, BusinessRuleViolation, DomainEvent, ValueObject
742+
743+
@dataclass(frozen=True, slots=True)
744+
class Money(ValueObject):
745+
amount: int
746+
currency: str
747+
748+
@dataclass(frozen=True)
749+
class OrderShipped(DomainEvent):
750+
order_id: str = ""
751+
tracking_number: str = ""
752+
753+
class Order(AggregateRoot[str]):
754+
def __init__(self, id: str, total: Money) -> None:
755+
super().__init__(id)
756+
self.total = total
757+
self.status = "placed"
758+
759+
def ship(self, tracking_number: str) -> None:
760+
if self.status == "shipped":
761+
raise BusinessRuleViolation("order-already-shipped")
762+
self.status = "shipped"
763+
assert self.id is not None
764+
self.raise_event(OrderShipped(order_id=self.id, tracking_number=tracking_number))
765+
766+
# Application service:
767+
order = Order("o-1", Money(100, "EUR"))
768+
order.ship("trk-42")
769+
770+
events = order.clear_events() # drained by the repository
771+
# repository.save(order); for e in events: bus.publish(e)
772+
```
773+
774+
For domain-tier microservices, the **`@enable_domain_stack`** starter activates CQRS, the transactional engine (saga/workflow/TCC), event sourcing, the rule engine, and the relational data layer in a single decorator — mirroring `fireflyframework-starter-domain` (Java) and `AddFireflyDomain` (.NET):
775+
776+
```python
777+
from pyfly.core import pyfly_application
778+
from pyfly.starters.domain import enable_domain_stack
779+
780+
@enable_domain_stack
781+
@pyfly_application(name="my-service", scan_packages=["my_service"])
782+
class Application:
783+
pass
784+
```
785+
786+
The full DDD primitives are also re-exported from `pyfly.starters.domain` so a single import line is enough:
787+
788+
```python
789+
from pyfly.starters.domain import (
790+
AggregateRoot, BusinessRuleViolation, DomainEvent, DomainRepository,
791+
Entity, Specification, ValueObject, enable_domain_stack,
792+
)
793+
```
794+
795+
See **[`samples/order_service/`](samples/order_service/README.md)** for an end-to-end DDD microservice that uses every primitive: layered split (interfaces / models / core / web / sdk), a real `Order` aggregate that protects its invariants, CQRS handlers, and a `ConfirmOrderSaga` that walks the order through `PLACED → INVENTORY_RESERVED → PAID → SHIPPED` with full compensation. See [docs/modules/domain.md](docs/modules/domain.md).
796+
735797
---
736798

737799
## Installation
@@ -742,13 +804,13 @@ The plugin manager resolves the dependency graph, loads plugins in order, and re
742804

743805
```bash
744806
# Install the latest release (uv)
745-
uv add "pyfly @ https://github.com/fireflyframework/fireflyframework-pyfly/releases/latest/download/pyfly-26.5.1-py3-none-any.whl"
807+
uv add "pyfly @ https://github.com/fireflyframework/fireflyframework-pyfly/releases/latest/download/pyfly-26.5.2-py3-none-any.whl"
746808
747809
# Install with specific extras
748-
uv add "pyfly[web,data-relational,cache] @ https://github.com/fireflyframework/fireflyframework-pyfly/releases/latest/download/pyfly-26.5.1-py3-none-any.whl"
810+
uv add "pyfly[web,data-relational,cache] @ https://github.com/fireflyframework/fireflyframework-pyfly/releases/latest/download/pyfly-26.5.2-py3-none-any.whl"
749811
750812
# Or with pip
751-
pip install "pyfly @ https://github.com/fireflyframework/fireflyframework-pyfly/releases/latest/download/pyfly-26.5.1-py3-none-any.whl"
813+
pip install "pyfly @ https://github.com/fireflyframework/fireflyframework-pyfly/releases/latest/download/pyfly-26.5.2-py3-none-any.whl"
752814
```
753815

754816
### One-Line Install (CLI + Framework)
@@ -925,7 +987,7 @@ See the full [CLI Reference](docs/cli.md) for details.
925987
926988
## Modules
927989
928-
PyFly ships with **38 fully-implemented modules** organized into five layers — covering everything from HTTP routing and database access to distributed transactions, event sourcing, identity, content management, and observability:
990+
PyFly ships with **39 fully-implemented modules** organized into five layers — covering everything from HTTP routing and database access to distributed transactions, event sourcing, identity, content management, observability, and DDD building blocks:
929991
930992
### Foundation Layer
931993
@@ -964,6 +1026,7 @@ PyFly ships with **38 fully-implemented modules** organized into five layers —
9641026
| **Shell** | CLI commands, interactive REPL, runners | Spring Shell |
9651027
| **Transactional** | Saga + Workflow + TCC orchestration: signal-driven, DAG, compensation, multi-backend persistence, DLQ, recovery | `fireflyframework-orchestration` |
9661028
| **Event Sourcing** | AggregateRoot, EventStore, snapshots, transactional outbox, projections, upcasting | `fireflyframework-eventsourcing` |
1029+
| **Domain (DDD)** | `Entity`, `ValueObject`, `AggregateRoot`, `DomainEvent`, `Specification`, `DomainRepository`, `BusinessRuleViolation` | `fireflyframework-starter-domain` |
9671030
| **Plugins** | `@plugin` / `@extension_point` / `@extension`, dependency-ordered lifecycle | `fireflyframework-plugins` |
9681031
| **Rule Engine** | YAML DSL, AST evaluator, batch evaluation, rule-set repository | `fireflyframework-rule-engine` |
9691032
| **Config Server** | Spring Cloud Config Server analogue + client | `fireflyframework-config-server` |
@@ -1017,6 +1080,7 @@ Browse all guides in the [Module Guides Index](docs/modules/README.md):
10171080
- [Custom Actuator Endpoints](docs/modules/custom-actuator-endpoints.md) — Build your own actuator endpoints
10181081
- [Transactional Engine](docs/modules/transactional.md) — Saga, Workflow, and TCC distributed transaction patterns
10191082
- [Event Sourcing](docs/modules/eventsourcing.md) — Aggregates, event store, snapshots, outbox, projections
1083+
- [Domain (DDD primitives)](docs/modules/domain.md) — Entity, ValueObject, AggregateRoot, DomainEvent, Specification, DomainRepository, exceptions
10201084
- [Plugins](docs/modules/plugins.md) — Plugin SPI, extension points, lifecycle
10211085
- [Rule Engine](docs/modules/rule-engine.md) — YAML DSL, AST evaluator, batch evaluation
10221086
- [Callbacks (outbound)](docs/modules/callbacks.md) — Dispatch domain events to external HTTP endpoints
@@ -1045,7 +1109,7 @@ See **[ROADMAP.md](ROADMAP.md)** for the full roadmap toward feature parity with
10451109
| **Phase 1** | Core Distributed Patterns | Saga/TCC, Workflow, Event Sourcing | Complete (v26.05.01) |
10461110
| **Phase 2** | Business Logic | Rule Engine, Plugins | Complete (v26.05.01) |
10471111
| **Phase 3** | Enterprise Integrations | Notifications, IDP, ECM, Webhooks, Callbacks, Config Server | Complete (v26.05.01) |
1048-
| **Phase 4** | Administrative | Backoffice, Utils, DDD starters | Planned |
1112+
| **Phase 4** | Administrative & DDD | Backoffice, Utils, ~~DDD starters~~ (done in v26.05.02) | DDD complete; backoffice / utils planned |
10491113
10501114
**v26.05.01** closes the parity gap with the Java Firefly Framework: the transactional engine has been rewritten from scratch (Saga + Workflow + TCC), nine new modules have been added (Event Sourcing, Callbacks, Webhooks, Notifications, IDP, ECM, Plugins, Rule Engine, Config Server), 12 third-party adapters were added, four new client protocols (SOAP/gRPC/GraphQL/WebSocket) were introduced, and the validation library now ships 16 domain validators. The framework is feature-complete for production microservice workloads.
10511115
@@ -1071,7 +1135,13 @@ The git tag and human-readable display use the leading-zero form (`v26.05.01`);
10711135
10721136
See **[CHANGELOG.md](CHANGELOG.md)** for detailed release notes.
10731137
1074-
**Current:** `v26.05.01` (2026-05-07) — Full Java framework parity. Highlights:
1138+
**Current:** `v26.05.02` (2026-05-08) — DDD primitives + OrderService sample + async-saga fix:
1139+
1140+
- **`pyfly.domain`** — pure-Python DDD building blocks: `Entity`, `ValueObject`, `AggregateRoot`, `DomainEvent`, `Specification` (with `&` / `|` / `~` combinators), `DomainRepository` protocol, `DomainException` / `BusinessRuleViolation` / `AggregateNotFound`. Mirrors `fireflyframework-starter-domain` (Java) and `FireflyFramework.Starter.Domain` (.NET).
1141+
- **OrderService sample** — `samples/order_service/` is a complete DDD-flavoured microservice with the same layered split (interfaces / models / core / web / sdk) used by the firefly-oss Java services and the .NET OrdersService sample. Includes a real `Order` aggregate, CQRS handlers, and a `ConfirmOrderSaga` that walks the order through `PLACED → INVENTORY_RESERVED → PAID → SHIPPED` with full compensation. 13/13 tests pass end-to-end.
1142+
- **Async-saga fix** — `@saga_step` / `@try_method` / `@confirm_method` / `@cancel_method` no longer wrap the function with a sync adapter that masked `inspect.iscoroutinefunction`. `async def` saga and TCC steps are now correctly awaited by the engine. Regression test pinned in `tests/transactional/saga/test_async_steps.py`.
1143+
1144+
**Previous:** `v26.05.01` (2026-05-07) — Full Java framework parity:
10751145
10761146
- **Transactional engine rewrite** — `pyfly.transactional` now ships Saga + Workflow + TCC patterns on a shared core (DAG topology, retries with jitter, backpressure, idempotency, DLQ, recovery, REST controllers, health indicators)
10771147
- **Nine new modules** — `eventsourcing`, `callbacks`, `webhooks`, `notifications`, `idp`, `ecm`, `plugins`, `rule_engine`, `config_server`

ROADMAP.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ PyFly's roadmap is driven by achieving feature parity with the full [Firefly Fra
44

55
---
66

7-
## Current State (v26.05.01)
7+
## Current State (v26.05.02)
88

9-
PyFly ships with **38 fully-implemented modules** covering the foundation, application, infrastructure, integration, and cross-cutting layers — including the rewritten transactional engine (Saga + Workflow + TCC), Event Sourcing, IDP, ECM, Notifications, Webhooks, Callbacks, Plugins, Rule Engine, and Config Server. See the [Changelog](CHANGELOG.md) for full details on what's included.
9+
PyFly ships with **39 fully-implemented modules** covering the foundation, application, infrastructure, integration, and cross-cutting layers — including the rewritten transactional engine (Saga + Workflow + TCC), Event Sourcing, IDP, ECM, Notifications, Webhooks, Callbacks, Plugins, Rule Engine, Config Server, and the new **`pyfly.domain` DDD primitives** (`v26.05.02`). See the [Changelog](CHANGELOG.md) for full details on what's included.
1010

11-
Phases 1, 2, and 3 of the original roadmap have all landed in `v26.05.01`. Phase 4 is the remaining set.
11+
Phases 1, 2, and 3 of the original roadmap landed in `v26.05.01`. The **DDD starters** portion of Phase 4 landed in `v26.05.02`. Backoffice and Utils remain planned.
1212

1313
---
1414

@@ -46,13 +46,13 @@ Phases 1, 2, and 3 of the original roadmap have all landed in `v26.05.01`. Phase
4646

4747
---
4848

49-
## Phase 4 — Administrative & Infrastructure 🔄 **Planned**
49+
## Phase 4 — Administrative & DDD 🔄 **Partially complete (DDD done in v26.05.02)**
5050

51-
| Module | Description | Java Source |
52-
|--------|-------------|-------------|
53-
| **Backoffice** | Admin/backoffice layer with impersonation and enhanced audit | [`fireflyframework-backoffice`](https://github.com/fireflyframework/fireflyframework-backoffice) |
54-
| **Domain (DDD starters)** | DDD building blocks — base entities, value objects, aggregate roots, domain events | [`fireflyframework-starter-domain`](https://github.com/fireflyframework/fireflyframework-starter-domain) |
55-
| **Utils** | Shared utility library — template rendering, filtering, common helpers | [`fireflyframework-utils`](https://github.com/fireflyframework/fireflyframework-utils) |
51+
| Module | Description | Java Source | Status |
52+
|--------|-------------|-------------|--------|
53+
| **Domain (DDD starters)** | `Entity[TID]`, `ValueObject`, `AggregateRoot[TID]`, `DomainEvent`, `Specification`, `DomainRepository`, `BusinessRuleViolation`, `AggregateNotFound`, plus the `enable_domain_stack` decorator. Pure-Python primitives with zero runtime dependencies. Includes a complete OrderService sample under `samples/order_service/`. | [`fireflyframework-starter-domain`](https://github.com/fireflyframework/fireflyframework-starter-domain) | Done in v26.05.02 |
54+
| **Backoffice** | Admin/backoffice layer with impersonation and enhanced audit | [`fireflyframework-backoffice`](https://github.com/fireflyframework/fireflyframework-backoffice) | Planned |
55+
| **Utils** | Shared utility library — template rendering, filtering, common helpers | [`fireflyframework-utils`](https://github.com/fireflyframework/fireflyframework-utils) | Planned |
5656

5757
---
5858

docs/modules/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ Coordinate multi-step operations across services with automatic compensation and
105105
|-------|-------------------|
106106
| [Transactional Engine](transactional.md) | Saga (`@saga`, `@saga_step`), Workflow (`@workflow`, `@workflow_step`, `@wait_for_signal`, `@wait_for_timer`, `@child_workflow`), TCC (`@tcc`, `@tcc_participant`, `@try_method`, `@confirm_method`, `@cancel_method`), parameter injection (`Input`, `FromStep`, `Header`, `Variable`), 5 compensation policies, DAG execution, persistence (in-memory / Redis / SQLAlchemy / cache), recovery, dead-letter queue, scheduling, REST endpoints |
107107
| [Event Sourcing](eventsourcing.md) | `AggregateRoot`, `EventStore` (in-memory + SQLAlchemy), `SnapshotStore`, `TransactionalOutbox`, `Projection` / `ProjectionRunner`, `EventUpcaster`, `EventSourcedRepository` |
108+
| [Domain (DDD primitives)](domain.md) | `Entity[TID]`, `ValueObject`, `AggregateRoot[TID]`, `DomainEvent`, `Specification` (in-memory predicate), `DomainRepository` protocol, `DomainException` / `BusinessRuleViolation` / `AggregateNotFound`, `enable_domain_stack` |
108109

109110
---
110111

0 commit comments

Comments
 (0)