Every time a user promulgates an edict, simply push that edict via SSE to all connected endpoints.
On the client-side, the client GUI is responsible for filtering the incoming stream of edicts and only updating the GUI with edicts that the user is subscribed for.
Edict Grid would update in real-time, instantaneously as soon as edicts are promulgated.
Option 2:
As soon as a user promulgates an edict, push a new edicts awaiting flag to all of the user's citizens. Wait ___ minutes? The user will then perform a GET request for all new edicts after the wait interval.
The server is responsible for tracking when subscribers need to get an update. On the server-end, every client needs to be represented by an edict cache and as soon as that cache goes stale, the flag push to all endpoints needs to happen. Does this solution scale? Need to ponder this more... (9/18).
Different Options of Edict Promulgation Streaming
Option 1 (Naive and easiest to implement):
Option 2:
new edicts awaiting
flag to all of the user's citizens. Wait ___ minutes? The user will then perform a GET request for all new edicts after the wait interval.edict cache
and as soon as that cache goes stale, the flag push to all endpoints needs to happen. Does this solution scale? Need to ponder this more... (9/18).