Closed stevenhao closed 4 years ago
This pull request is being automatically deployed with Vercel (learn more). To see the status of your deployment, click below or on the icon next to each commit.
π Inspect: https://vercel.com/downforacross/downforacrosscom/b8pz835d8 β Preview: https://downforacrosscom-git-server-init.downforacross1.now.sh
firebase realtime db = πΈπ aws ec2 + elasticache = ππ
Infra & Routing
Server Architecture
/socket.io
gid
s to list of clients subscribed to that game's eventsWebsocket message protocol
Messages sent by client:
join (gid)
sync_all (gid)
game_event ({gid, event})
{.sv: 'timestamp'}
withDate.now()
)game_event (event)
message to all subscribers of gidClient logic
game_event
message, optimistically anticipategame_event
message from the server before it's received)?ws=1
to determine whether to create games in beta (poor man's feature flagging)