Re: KStreamManager and IKStreamManager

2020-04-28 Thread Maxim Solodovnik
Thanks :) On Wed, 29 Apr 2020 at 03:24, seba.wag...@gmail.com wrote: > > Okay, then let's try to use StreamProcessor as the place to store the > reference to the KStreams. No interface. > > And I will put up a PR to refactor that. > > And you can have a look > > Cheers > Seb > > Sebastian Wagner

Re: KStreamManager and IKStreamManager

2020-04-28 Thread seba.wag...@gmail.com
Okay, then let's try to use StreamProcessor as the place to store the reference to the KStreams. No interface. And I will put up a PR to refactor that. And you can have a look Cheers Seb Sebastian Wagner https://www.linkedin.com/in/sebastianwagner/ On Tue, 28 Apr 2020 at 18:13, Maxim Solodovn

Re: KStreamManager and IKStreamManager

2020-04-27 Thread Maxim Solodovnik
On Tue, 28 Apr 2020 at 03:29, seba.wag...@gmail.com wrote: > > I understand the motivation for the 2 lists. But you could even have 2 lists > but in ONE class. > > This should be abstracted into one place, that has a defined API to access > the KStream. So that no consumer comes up with the idea

Re: KStreamManager and IKStreamManager

2020-04-27 Thread seba.wag...@gmail.com
I understand the motivation for the 2 lists. But you could even have 2 lists but in ONE class. This should be abstracted into one place, that has a defined API to access the KStream. So that no consumer comes up with the idea to bypass the methods to directly access a KStream. Other then the defin

Re: KStreamManager and IKStreamManager

2020-04-27 Thread Maxim Solodovnik
Hello Sebastian, If I do remember correctly `StreamProcessor::streamByUid ` was created to speed-up stream search (to avoid iterating all KRooms) The main source-of-truth should be KRoom Duplication is bad thing - no doubt but I thought extra-iterating is worst :) I tried to make both consistent

Re: KStreamManager and IKStreamManager

2020-04-26 Thread seba.wag...@gmail.com
I also can see that those lists have slightly different meaning 1. StreamProcessor::streamByUid => Will be populated when the stream start 2. KRoom::streams => Will be populated when KStream is created Still that would be no problem to replicate this functionality in 1 place. Cheers Seb Seb

Re: KStreamManager and IKStreamManager

2020-04-26 Thread seba.wag...@gmail.com
This should be actually a pretty simple refactor. And much easier than trying to replicate StreamHandler events in to the KRoom. As well as having a defined API in the IKStreamHandler. Cheers Seb Sebastian Wagner https://www.linkedin.com/in/sebastianwagner/ On Mon, 27 Apr 2020 at 10:33, seba.

KStreamManager and IKStreamManager

2020-04-26 Thread seba.wag...@gmail.com
Hi, currently we have 2 places that hold a reference to the KStream objects: 1. StreamProcessor::streamByUid 2. KRoom::streams Removing it from one place may or may not result removing it in the other place. This can lead to memory leaks. As well as those lists can get out of sync. And y