Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Eventsauce Snapshotting Laravel Package

andreo/eventsauce-snapshotting

Extended snapshotting components for EventSauce: Doctrine DBAL snapshot repository plus versioned snapshotting support. Includes version-aware aggregate repository, snapshot version inflector/comparator, and VersionedSnapshotState for evolving snapshot schemas on PHP 8.2+.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Performance Optimization: Enable event sourcing snapshotting to reduce aggregate reconstruction time for high-frequency or long-running aggregates (e.g., financial ledgers, user activity logs).
  • Versioned State Management: Support backward-compatible schema evolution for aggregates (e.g., migrating from UserProfileV1 to UserProfileV2 without breaking reads).
  • Conditional Snapshotting: Implement cost-efficient snapshotting (e.g., trigger snapshots only after 200 events or on demand) to balance storage vs. performance tradeoffs.
  • Tech Stack Alignment: Leverage Doctrine DBAL for persistence if already using Doctrine, avoiding reinventing snapshot storage logic.
  • Roadmap Flexibility: Future-proof for EventSauce ecosystem (e.g., integrating with Symfony or custom event handlers).

When to Consider This Package

  • Avoid if:
    • Your aggregates are small/stateless (no need for snapshotting).
    • You’re not using EventSauce (incompatible with other event-sourcing libraries).
    • Your team lacks PHP/Doctrine expertise (steep learning curve for versioned snapshots).
    • You need real-time consistency (snapshots introduce eventual consistency).
  • Look elsewhere if:
    • You require multi-model snapshots (e.g., MongoDB/Redis) → Use eventsauce-snapshotting forks or custom implementations.
    • You need built-in conflict resolution → Pair with EventSauce\EventSourcing\ConflictResolution.
    • Your PHP version is <8.2 (hard dependency).

How to Pitch It (Stakeholders)

For Executives: "This package lets us optimize performance for critical aggregates (e.g., order histories, audit logs) by storing snapshots—reducing load times by 80%+ for large datasets. It’s a low-risk extension of our existing EventSauce stack, with versioning support to safely evolve schemas. Minimal dev effort (30–60 mins setup) for significant scalability gains."

For Engineering: *"We’re adding Doctrine-backed snapshotting to EventSauce to:

  1. Cut aggregate reconstruction time (e.g., from 500ms → 50ms for 10K events).
  2. Support versioned states (e.g., UserProfileV1V2) without breaking reads.
  3. Control snapshot frequency (e.g., trigger every 200 events or manually). Tradeoff: Adds ~100 lines of config but leverages our existing Doctrine setup. Docs are sparse but the API is intuitive for EventSauce users."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky