Feature request: receiving initial event snapshot / bulk loading
Posted: 31 Jul 2019 11:55
I've made this request before for OTMS but they wouldn't hear me - hopefully this will work out better on O2G
When an application starts up, e.g one that would do CTI and thus monitors calls and call routing, you need an initial state. So, at the moment, before you make the subscription, you would load the current call state of all devices that you're interested in. Depending on your system size, this means thousands of requests. Of course you can parallelize, but there's a sweet spot after which you'll just bog down the system instead of speeding things up. It would be useful to have the means to do this more efficiently.
One way would be to indicate that you want an initial event snapshot when you make the subscription. So you'd immediately get the current call state / routing state for all the users you've subscribed for (assuming you're subscribing for telephony and routingManagement) . So if a user is in a call when your application starts, you know.
Alternatively, it would be useful to have a way to get these states in bulk. So instead of thousands of requests to GET /telephony/calls?loginName=oxeXXXX, you'd have a way to do a POST, providing a list of loginNames, and you'd get their state. Again, focus on telephony and routing state.
Now, you might say... for telephony.. what kind of OnCallXXX would be sent? I'd say OnCallCreated.. if you're extracting the info, you'd get the call(s) without the info about since when they're active, too. So the initial snapshot would send an OnCallCreated even if the call isn't new. But the CTI App could do whatever needs doing (if somebody thinks it would be useful an optional isSnapshop tag could be added to the event so you know what's a snapshot and what isn't)
I hope you consider this. I think it would help us write more efficient solutions. At the moment I have a tool that when fully rolled out will do about 3.5k users.. that's a lot of state loading at startup.
When an application starts up, e.g one that would do CTI and thus monitors calls and call routing, you need an initial state. So, at the moment, before you make the subscription, you would load the current call state of all devices that you're interested in. Depending on your system size, this means thousands of requests. Of course you can parallelize, but there's a sweet spot after which you'll just bog down the system instead of speeding things up. It would be useful to have the means to do this more efficiently.
One way would be to indicate that you want an initial event snapshot when you make the subscription. So you'd immediately get the current call state / routing state for all the users you've subscribed for (assuming you're subscribing for telephony and routingManagement) . So if a user is in a call when your application starts, you know.
Alternatively, it would be useful to have a way to get these states in bulk. So instead of thousands of requests to GET /telephony/calls?loginName=oxeXXXX, you'd have a way to do a POST, providing a list of loginNames, and you'd get their state. Again, focus on telephony and routing state.
Now, you might say... for telephony.. what kind of OnCallXXX would be sent? I'd say OnCallCreated.. if you're extracting the info, you'd get the call(s) without the info about since when they're active, too. So the initial snapshot would send an OnCallCreated even if the call isn't new. But the CTI App could do whatever needs doing (if somebody thinks it would be useful an optional isSnapshop tag could be added to the event so you know what's a snapshot and what isn't)
I hope you consider this. I think it would help us write more efficient solutions. At the moment I have a tool that when fully rolled out will do about 3.5k users.. that's a lot of state loading at startup.