https://github.com/protolambda/airviz-server
EthNY hack, websocket server for network graph viz of eth 2.0
https://github.com/protolambda/airviz-server
Last synced: about 2 months ago
JSON representation
EthNY hack, websocket server for network graph viz of eth 2.0
- Host: GitHub
- URL: https://github.com/protolambda/airviz-server
- Owner: protolambda
- License: mit
- Created: 2019-05-18T17:40:09.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-07T00:48:37.000Z (almost 6 years ago)
- Last Synced: 2025-02-08T16:32:32.435Z (3 months ago)
- Language: Go
- Size: 33.2 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# airviz - server
EthNewYork hack, websocket server
## Server
Hub: maintains clients and routes data pushes to each client
Client: listens for messages from user, gets pushes from hub.
DataReqHandler: filters pushes by time range, batches pushes into requests. Handles requests together with user requests. Only acts on latest request.
Topic: `byte`
Time index: `uint32`
DAG: dag structure, items per layer
Node: dag item, *points* to parent node
Box: index, parent key, self key, value
Status: client status, count (depth) of items at each time index. Offset by possibly different time index than server, window is of constant length.
Update atom: only new items are send to the client, i.e. the `[old_depth:new_depth]` range. One item per message.
## Messages:
### request
```
4 bytes | 4 bytes | 4 bytes per index
topic | time index | depth per index, starting from time index, defines window of request.
```### response: update item
```
4 bytes | 4 bytes | 4 bytes | 20 bytes | 32 bytes | 32 bytes | n bytes
topic | time index | depth | unused | parent key | self key | SSZ serialized data
```