SOA Patterns > Inventory Implementation Patterns > State Repository
State Repository (Erl)
How can service state data be persisted for extended periods without consuming service runtime resources?
Large amounts of state data cached to support the activity within a running service composition can consume too much memory, especially for long-running activities, thereby decreasing scalability.
State data can be temporarily written to and then later retrieved from a dedicated state repository.
A shared or dedicated repository is made available as part of the inventory or service architecture.
The addition of required write and read functionality increases the service design complexity and can negatively affect performance.
By deferring state data to a state repository, the service is able to transition to a stateless condition during pauses in the activity, thereby temporarily freeing system resources.