Hello everybody,
I’m exploring Flink options to build statistics engine for call center solution.
One thing I’m not sure how to implement.
Currently have the following jobs in the architecture.
Job #1 – is for matching start and end events and calculate durations. Like having call started and call ended events it is possible to calculate how long was the call.
Job #2 – is for aggregating precomputed values using multiple time windows, like 1 hour, 1 day, 1 week. (can we define time windows run-time by the way?). Also it joins control stream to care of subscription requests.
Supervisors, who consume the statistics, are spread around the world and can work in different time zones.
So, having time window defined as 1 day results in different data for European and American supervisors at exactly the same moment.
I’m not sure how to achieve that with Flink.
What are the best practices to work with different time zones? Any hint is appreciated.
Thanks,
Alex
CONFIDENTIALITY NOTICE: This e-mail and any files attached may contain confidential information of Five9 and/or its affiliated entities. Access by the intended recipient only is authorized. Any liability arising from any party acting, or refraining from acting, on any information contained in this e-mail is hereby excluded. If you are not the intended recipient, please notify the sender immediately, destroy the original transmission and its attachments and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Copyright in this e-mail and any attachments belongs to Five9 and/or its affiliated entities. |
Regarding timezones, you should probably convert your time to the unix timestamp which will be consistent all over the world, and then you can create your window based on this timestamp.
|
Hi Biplob,
Yes unix timestamp is what I¹m using now. But the problem is that a time window like '1 day' is defined using different start-end timestamps for users in different time zones Let me try to draw it |----1------2-----3-----4-------| 1 and 3 - time frames for European users 2 and 4 - time frames for American users Now we need to calculate some metrics, like sum or max of call durations using time window '1 day¹. Evidently they are different for different time zones. Should I create an aggregation window for each and every time zone to cover that? For each possible reporting time interval? Is it how this can be achieved with Flink? Thank you, Alex On 8/15/17, 1:09 AM, "Biplob Biswas" <[hidden email]> wrote: >Regarding timezones, you should probably convert your time to the unix >timestamp which will be consistent all over the world, and then you can >create your window based on this timestamp. > > > > > >-- >View this message in context: >http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Time-z >ones-problem-tp14907p14911.html >Sent from the Apache Flink User Mailing List archive. mailing list >archive at Nabble.com. > ________________________________ CONFIDENTIALITY NOTICE: This e-mail and any files attached may contain confidential information of Five9 and/or its affiliated entities. Access by the intended recipient only is authorized. Any liability arising from any party acting, or refraining from acting, on any information contained in this e-mail is hereby excluded. If you are not the intended recipient, please notify the sender immediately, destroy the original transmission and its attachments and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Copyright in this e-mail and any attachments belongs to Five9 and/or its affiliated entities. |
Hi Alex,
Your problem sounds interesting and I have always found dealing with timestamps cumbersome. Nevertheless, what I understand is that your start and end timsstamp for American and European customers are based on their local clock. For ex the start and end timestamp of 12 AM - 12 AM in america would be different for the same time in europe (also would be different across timezones with the continent as well) What I can think of right now is to define your start and end timestamp from a reference timezone like take UTC as your reference and define one time globally. It solves your problem of creating multiple windows for all timezones but may not satisfy your customers need as the 1 day would be defined not from midnight anymore (if thats what you need). Otherwise, AFAIK about Flink ...you would have to define the timewindows for all the timezones u need, but the experts here may point out to some better solution. Regards, Biplob |
Hi,
I'm afraid you do indeed need to have a separate window for each timezone, yes. You can probably use an hourly window to pre-aggregate the results and then have specific daily windows for the different timezones with aggregate different (pre-aggregated) hourly results. Does that work for your case? Best, Aljoscha > On 16. Aug 2017, at 10:28, Biplob Biswas <[hidden email]> wrote: > > Hi Alex, > > Your problem sounds interesting and I have always found dealing with > timestamps cumbersome. > > Nevertheless, what I understand is that your start and end timsstamp for > American and European customers are based on their local clock. > > For ex the start and end timestamp of 12 AM - 12 AM in america would be > different for the same time in europe (also would be different across > timezones with the continent as well) > > What I can think of right now is to define your start and end timestamp from > a reference timezone like take UTC as your reference and define one time > globally. It solves your problem of creating multiple windows for all > timezones but may not satisfy your customers need as the 1 day would be > defined not from midnight anymore (if thats what you need). > > Otherwise, AFAIK about Flink ...you would have to define the timewindows for > all the timezones u need, but the experts here may point out to some better > solution. > > Regards, > Biplob > > > > > > -- > View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Time-zones-problem-tp14907p14925.html > Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com. |
Free forum by Nabble | Edit this page |