Closed NickLarsen closed 7 months ago
Hi @NickLarsen . So sorry I'm just seeing this now :( . This is a great CR and and you're right, it addresses several problems with the current implementation. It it's a bit out of date, and I think it should target dev
branch. When I get some time, I might fix this CR up and push it in, if you don't mind.
@swiftyspiffy thanks, I really dropped the ball on this because I shifted focus to something else for a bit but I'm happy to jump back in if you want to pick it up
The api documentation says:
I'm trying to write a web app for my stream team that will watch streams and provided functionality across the whole team. There are currently about 70 members of my team, of course they are not all streaming simultaneously. Once members of my team generate an account on my app, it will listen for
StreamUp
events and then subscribe to additional topics until it receives aStreamDown
event at which point it will unlisten all topics except the video playback topic. At some point we might want to expand this to support more than just my team.There are a number of concerns in the current implementation that need to be addressed to support this:
StreamUp
andStreamDown
events, but can be identified by the topic passed back with every messageStreamUp
~StreamDown
~ViewCount
~_previousRequests
is a memory leak because requests do not get removedListen...()
functions do not handle requests from multiple streams simultaneously due to varying oauth valuesRandom
in theGenerateNonce
function is not thread safe~I think the rest can be handled by the app code although one additional nice to have would be each connection tracking which topics it is actively subscribed to since that is going to be a concern of every multi-tenancy app. This is what I can see on the surface although more stuff might pop up as I work through the details.