duality-labs / hapi-indexer

A Node.js based indexer for the Duality Cosmos chain
1 stars 0 forks source link

Add real-time update system for continuous liquidity data #24

Closed dib542 closed 11 months ago

dib542 commented 11 months ago

This could be through websockets, or long-polling, or HTTP2 Server Sent Events (SSE).

In my opinion web sockets aren't as scalable as the other options which all use standard HTTP requests. There used to be an issue with limited connections of websockets over HTTP1 (due to no multiplexing for websockets) but that appears to be resolved with HTTP2. The main challenge around websockets is in a production environment with many indexer instances: keeping connections open, restarting connections, what to do when errors occurs, and what do you do when you roll out a code/architecture update and everybody reconnects at once.

I think we will start with the simplest options first:

notes: