Skip to content

Websockets - synchronize with and subscribe to servers  #80

Closed
@joepio

Description

@joepio

See atomicdata-dev/atomic-data-docs#61

  • When a client connects to an Atomic Server, subscribe using the /ws endpoint.
  • When a Component subscribes to a Resource, subscribe to that through the websocket
  • When there are no more localSubscribers to a Resource (no more components / hooks using the data), unsubscribe through the websocket.
  • If the Server sends a Commit, process it
  • Allow for multiple websockets (since it should be possible to receive updates from multiple domains / servers). Probably store the WebSockets in the Store as a HashMap / Map.
  • Add e2e test for live updates

I think we can use the existing Store.subscribers map, which keys represent the subjects that should be subscribed in the websocket.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions