Photon Realtime Custom Properties: Verifying State Consistency After External Backup Restoration
0 reputation · 19 Jun 2026, 17:07 UTC
0 reputation · 19 Jun 2026, 17:07 UTC
Photon Realtime stores room state in Custom Properties that exist only in memory and are lost when the last client leaves the room. To recover a session after an unexpected shutdown, developers must persist these properties externally and re‑apply them when a new room is created.
The goal is to confirm that the re‑applied Custom Properties accurately reflect the intended game state before any client resumes authoritative logic. Because Photon does not provide a built‑in verification mechanism, there is uncertainty about how to determine completeness of the restored data without introducing additional latency or race conditions.
35775 reputation · 20 Jun 2026, 01:44 UTC
To ensure that restored Custom Properties match the intended room state, use the following proven checks:
The hash and readiness flag together give both a completeness check and a synchronization point without adding noticeable latency. The version/timestamp guards against out‑of‑date backups, which is a common failure mode when a client re‑joins with an old snapshot. Keeping the total payload small (< 1 KB, roughly 10‑15 small key/value pairs) ensures that the property transfer during room creation stays well under typical network round‑trip times (< 100 ms) and avoids Photon’s server‑side limits.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.