https://github.com/netgusto/realtime-reactive
Realtime reactive experimental data synchronization between a server and multiple clients
https://github.com/netgusto/realtime-reactive
Last synced: 10 months ago
JSON representation
Realtime reactive experimental data synchronization between a server and multiple clients
- Host: GitHub
- URL: https://github.com/netgusto/realtime-reactive
- Owner: netgusto
- Created: 2018-02-11T16:42:11.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-23T16:49:23.000Z (over 7 years ago)
- Last Synced: 2025-01-29T02:45:12.485Z (12 months ago)
- Language: TypeScript
- Homepage:
- Size: 132 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# realtime-reactive
```bash
$ yarn install
$ yarn start
# then open http://localhost:3000
```
This little experiment simulates 2 clients and 1 server connected by Websockets, where clients subscribe to GraphQL queries on the server. The server, both clients and the websocket connexions are all simulated on the JS environment of your browser.
Any data change on the server (spontaneous, or emanating from a client) is reactively pushed to the relevant clients with as little data transmitted on the wire as possible.
This is made possible by:
1. subscriptions by the server to the database on low level CRUD events
2. making GraphQL queries transparent to the static analisys of the nature of their parameters
3. an algorithm (the core of the experiment) that's able to determine (thanks to 1. and 2.) whether or not a change in data requires the recomputation of any query / aggregation
