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

Key Value Store Laravel Package

doctrine/key-value-store

Doctrine Key Value Store provides a lightweight Doctrine-style mapper for NoSQL key-value backends. Use simple @Entity/@Id annotations, schema-less values mapped to objects, and a stripped-down object manager with events. Drivers include Redis, DynamoDB, MongoDB, CouchDB and more.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. Buy: Justifies buying a lightweight abstraction layer for key-value storage instead of building a custom solution, reducing development time and maintenance overhead.
  • Multi-Cloud/Backend Flexibility: Enables seamless switching between Azure Table, DynamoDB, Redis, or RDBMS without rewriting core logic, aligning with cloud-agnostic or hybrid infrastructure strategies.
  • Feature Roadmap:
    • Real-time analytics dashboards (e.g., tracking user engagement via Redis-backed key-value stores).
    • Session management (e.g., storing user sessions in DynamoDB or Couchbase for scalability).
    • Caching layers (e.g., replacing Redis directly with a Doctrine-wrapped cache for consistency with ORM patterns).
    • Legacy system modernization (e.g., migrating from flat-file or proprietary KV stores to managed services like Azure Table).
  • Use Cases:
    • Event sourcing (storing immutable event data with composite keys like [aggregateId, eventType]).
    • Feature flags/toggles (dynamic KV storage for A/B testing configurations).
    • Temporary data processing (e.g., batch jobs writing intermediate results to CouchDB).

When to Consider This Package

  • Adopt if:

    • Your team already uses Doctrine ORM/ODM and wants consistency in persistence patterns.
    • You need multi-backend support (e.g., dev/staging uses Redis, production uses DynamoDB).
    • Your data model is simple (no complex relationships, just schema-less objects).
    • You prioritize developer velocity over fine-grained control (e.g., no need for custom serialization).
    • Your use case fits single-value or embedded-object storage (no references between KV entities).
  • Look elsewhere if:

    • You require joins or complex queries (this is a KV store, not a document/relational DB).
    • Your data model needs rich relationships (e.g., graph structures, hierarchical data).
    • You’re locked into a single backend (e.g., only MongoDB) and want to avoid abstraction overhead.
    • Your team lacks Doctrine experience (learning curve for annotations, EntityManager patterns).
    • You need real-time sync (e.g., WebSockets + KV updates; this is for persistence, not pub/sub).
    • The package’s last release (2019) is a blocker (though MIT license allows forks/maintenance).

How to Pitch It (Stakeholders)

For Executives: "This package lets us standardize on a lightweight, Doctrine-backed key-value store that works across cloud providers (Azure, AWS, etc.) without rewriting code. For example, we could track email campaign responses in DynamoDB during load testing, then switch to Redis in production—all while using the same PHP objects. It cuts dev time by 30% for use cases like session storage or feature flags, and aligns with our existing Doctrine stack. The MIT license means no vendor lock-in, and the abstraction layer future-proofs us against backend changes."

For Engineers: *"If you’re tired of writing boilerplate to serialize/deserialize objects for KV stores, this gives you a Doctrine-like API for Redis, DynamoDB, or even SQL tables—with zero ORM bloat. Key benefits:

  • @Entity annotations map to KV backends automatically (no XML/YAML config unless you want it).
  • Composite keys (e.g., [campaignId, userId]) work out of the box.
  • Swap backends by changing one config line (e.g., from DoctrineCacheStorage to AzureSdkTableStorage).
  • Events (postPersist, postRemove) let you hook into lifecycle logic, like logging or analytics. Tradeoff: It’s not for complex queries or relationships—think of it as a simplified Doctrine for KV data."*
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.
besmartand-pro/php-quality-config
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
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