State Management with PHP

    Dapr offers a great modular approach to using state in your application. The best way to learn the basics is to visit the howto.

    Many state components allow you to pass metadata to the component to control specific aspects of the component’s behavior. The PHP SDK allows you to pass that metadata through:

    Every state operation allows passing metadata.

    In the PHP SDK, there are four classes that represent the four different types of consistency and concurrency in Dapr:

    When doing a bulk read or beginning a transaction, you can specify the amount of parallelism. Dapr will read “at most” that many keys at a time from the underlying store if it has to read one key at a time. This can be helpful to control the load on the state store at the expense of performance. The default is .

    Hardcoded key names are useful, but why not make state objects more reusable? When committing a transaction or saving an object to state, you can pass a prefix that is applied to every key in the object.