Best Practices
3. Data Modeling and Sync Logi...
Time-Based Replication
When handling data in fast-paced industries, such as airlines, retail, quick-service restaurants, and other time‑sensitive environments, implement a design pattern that focuses on efficient memory management and performance optimization.
A common implementation is the time-based replication design pattern, in which you use a Time‑to‑Live (TTL) Eviction strategy to set document retention logic; for example, logic specifying that only data written to the local Ditto store within the past 24 hours persists on the device.
The implementation process of the time-based replication design pattern with a TTL Eviction strategy varies based on your approach to TTL-based eviction management:
- Big Peer Management (Recommended) — Through regular interval HTTP API calls, the Big Peer cloud deployment delegates all TTL-based evictions mesh-wide. (For instructions, see Big-Peer-Based Evictions ) By opting for the Big Peer approach, you ensure that locally stored documents sync with the Big Peer before eviction.
- Small Peer Local Management — Each Small Peer device manages its own TTL-based evictions. (For instructions, see Small-Peer-Based Evictions )
Updated 03 Oct 2024
Did this page help you?