Current section
Files
Jump to
Current section
Files
CHANGELOG.md
# Changelog
All notable changes to erl-esdb will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [0.3.0] - 2025-12-20
### Added
- **Capability-Based Security** (`esdb_capability_verifier.erl`, `esdb_revocation.erl`):
- Server-side verification of UCAN-inspired capability tokens
- Ed25519 signature verification using issuer's public key from DID
- Token expiration and not-before time validation
- Resource URI pattern matching (exact, wildcard suffix, prefix)
- Action permission checking with wildcard support
- Token revocation management (ETS-based, gossip integration planned)
- Issuer revocation for compromised identities
- Content-addressed token IDs (CIDs) for revocation tracking
- Comprehensive unit tests (13 verifier tests + 6 revocation tests)
This completes Phase 3 of the decentralized security implementation.
Client-side token creation is in erl-esdb-gater, server-side verification is here.
### Changed
- **Documentation**: Replaced ASCII diagrams with SVG in README and guides
### Fixed
- **README API documentation**: Fixed incorrect function signatures
- Subscriptions: Added missing `unsubscribe/3`, `get/2` functions
- Snapshots: Fixed `load/3` → `load_at/3`, `delete/3` → `delete_at/3`, added `exists/2`, `exists_at/3`
- Aggregator: Completely rewrote section - was showing non-existent API (`foldl/4`, `foldl_from_snapshot/4`)
- **guides/snapshots.md**: Fixed `load/3` → `load_at/3`, `delete/3` → `delete_at/3`, rewrote aggregator example
- **guides/cqrs.md**: Fixed subscription key usage in emitter group join
- **guides/subscriptions.md**: Fixed invalid map access syntax
- **guides/event_sourcing.md**: Fixed aggregator foldl signature (takes events list, not store/stream)
## [0.2.0] - 2024-12-19
### Added
- **End-to-end tests**: 24 comprehensive e2e tests for gater integration:
- Worker registration (4 tests)
- Stream operations via gater (9 tests)
- Subscription operations (4 tests)
- Snapshot operations (4 tests)
- Load balancing (3 tests)
- **Subscriptions**: Added `ack/4` function for acknowledging event delivery
### Fixed
- **Gateway worker API compatibility**:
- `get_version` now handles integer return correctly
- Snapshot operations use correct function names (`save`, `load_at`, `delete_at`)
- Subscription unsubscribe uses correct 3-arg version
- **Header conflicts**: Added `ifndef` guards for `DEFAULT_TIMEOUT` macro
### Changed
- **erl-esdb-gater integration**: Updated to work with gater's pg-based registry (replacing Ra)
- **Test counts**: Now 72 unit + 53 integration + 24 e2e = 149 total tests
## [0.1.0] - 2024-12-18
### Added
- Initial release of erl-esdb, a BEAM-native Event Store built on Khepri/Ra
- Event stream operations:
- `append/4,5` - Write events with optimistic concurrency control
- `read/5` - Read events from streams (forward/backward)
- `get_version/2` - Get current stream version
- `exists/2` - Check if stream exists
- `list_streams/1` - List all streams in store
- `delete/2` - Soft delete streams
- Subscription system:
- Stream subscriptions - events from specific streams
- Event type subscriptions - events by type across streams
- Pattern subscriptions - wildcard stream matching
- Payload subscriptions - content-based filtering
- Snapshot management:
- `save/5` - Save aggregate state snapshots
- `load/2,3` - Load latest or specific version snapshots
- `list/2` - List all snapshots for a stream
- `delete/3` - Delete old snapshots
- Aggregation utilities:
- `foldl/4` - Fold over events with accumulator
- `foldl_from_snapshot/4` - Fold starting from latest snapshot
- Cluster support:
- UDP multicast discovery (LibCluster gossip compatible)
- Automatic Khepri/Ra cluster formation
- Node monitoring and failover
- Leader election and tracking
- Emitter pools for high-throughput event delivery
- Partitioned writers for concurrent stream writes
- BEAM telemetry integration with configurable handlers
- Comprehensive test suite (72 unit + 53 integration tests)
- Educational guides:
- Event Sourcing fundamentals
- CQRS patterns
- Subscriptions usage
- Snapshots optimization
### Dependencies
- Khepri 0.17.2 - Raft-based distributed storage
- Ra 2.16.12 - Raft consensus implementation
- Telemetry 1.3.0 - BEAM telemetry for observability