etr2460 commented on a change in pull request #11498:
URL: 
https://github.com/apache/incubator-superset/pull/11498#discussion_r520098944



##########
File path: superset-websocket/index.js
##########
@@ -0,0 +1,175 @@
+const config = require('./config.json');
+const http = require('http');
+const WebSocket = require('ws');
+const jwt = require('jsonwebtoken');
+const cookie = require('cookie');
+const Redis = require('ioredis');
+const redis = new Redis(config.redis);
+
+const server = http.createServer();
+const wss = new WebSocket.Server({ noServer: true });
+
+const globalEventStreamName = `${config.streamPrefix}full`;
+let channels = {};
+let lastFirehoseId = '$';
+let redisRequestCount = 0;
+
+
+/*
+NOT using Redis Stream consumer groups due to the fact that they only read
+a subset of the data for a stream, and Websocket clients have a persistent
+connection to each app instance, requiring access to all data in a stream.
+Horizontal scaling of the websocket app means having multiple websocket 
servers,
+each with full access to the Redis Stream.
+
+Stream options:

Review comment:
       which of these options do you recommend here?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to