Skip to content

Use websockets for pushing data to clients and improve UX #16

@Parth59

Description

@Parth59

AWS Api Gateway now supports websockets which allows for our serverless API to accept socket connections and push data to consumers. See https://github.com/neverendingqs/serverless-websocket-example

A partial implementation of this feature can be found in backend/src/connection.ts

Implementing this feature would require the following things to be done

On websocket connection, store socketId to playerId mapping in a fast in-memory db like Redis
When data is to be pushed to a player, lookup this Redis db and find the socketId which will be passed to the ApiGateway websocket API to push data
On the frontend side, a socket connection would have to be established and listeners setup to listen for events from the backend

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions