Re: Flink Event specific window

2021-05-05 Thread Swagat Mishra
Hi Arvid, I sent a separate mail titled - Session Windows - not working as expected ( to the user community ) All other details are here if you need, closing this thread. Please have a look when you have a few minutes, much appreciated. Regards, Swagat On Thu, May 6, 2021 at 1:50 AM Swagat Mis

Re: Flink Event specific window

2021-05-05 Thread Swagat Mishra
Hi Arvid, I sent a separate mail titled - Session Windows - not working as expected closing this thread. Please have a look when you have a few minutes, much appreciated. Regards, Swagat On Wed, May 5, 2021 at 7:24 PM Swagat Mishra wrote: > Hi Arvid, > > Tried a small POC to reproduce the b

Re: Flink Event specific window

2021-04-29 Thread Swagat Mishra
Thanks Arvid. very helpful. On Thu, Apr 29, 2021 at 5:46 PM Arvid Heise wrote: > Hi Swagat, > > 1. Where the data primarily resides depends on the chosen state backend > [1]. In most cases, it's written to some file with a memory cache. It's > possible to query the state [2] but not with SQL. I

Re: Flink Event specific window

2021-04-29 Thread Arvid Heise
Hi Swagat, 1. Where the data primarily resides depends on the chosen state backend [1]. In most cases, it's written to some file with a memory cache. It's possible to query the state [2] but not with SQL. In fact, it's so basic that we decided to drop the feature in the future to make room for a m

Re: Flink Event specific window

2021-04-26 Thread Swagat Mishra
Hi Arvid, On 2 - I was referring to stateful functions as an alternative to windows, but in this particular use case, its not fitting in exactly I think, though a solution can be built around it. On the overall approach here what's the right way to use Flink SQL: Every event has the transaction

Re: Flink Event specific window

2021-04-25 Thread Arvid Heise
1. It always depends on the data volume per user. A million user is not much if you compare it to the biggest Flink installations (Netflix, Alibaba, PInterest, ...). However, for a larger scale and scalability, I'd recommend to use rocksDB state backend. [1] 2. Are you referring to statefun? I'd s

Re: Flink Event specific window

2021-04-25 Thread Swagat Mishra
1. What if there are a very high number of users, like a million customers won't the service crash? Is it advisable to hold the data in memory. 2. What if state-functions are used to calculate the value ? How will this approach differ from the one proposed below. Regards, Swagat On Wed, Apr 21,

Re: Flink Event specific window

2021-04-21 Thread Arvid Heise
Hi Sunitha, the approach you are describing sounds like you want to use a session window. [1] If you only want to count them if they happen at the same hour then, you want to use a tumbling window. Your datastream approach looks solid. For SQL, there is also a session (and tumbling) window [2].