Converting Agent Comms to Websockets

Discussions about development of VICIDIAL and astGUIclient

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Converting Agent Comms to Websockets

Postby mariusmarais » Thu Aug 27, 2020 4:17 am

I've been looking at Vicidial Agent Screen performance on older hardware recently, combined with the background tab throttling that Chrome does. (We're in a regulated industry, so sticking to older browsers is difficult from a security compliance perspective.)

Is there any interest in converting the Agent Screen's comms with the webservers away from polling to using only websockets and push from the server?

As far as I can tell from https://caniuse.com/#search=websockets , websockets should be available in common browsers > 2012, so it should be supported in the wild.

It may well just move strain from the web browser to the web servers, as something would still need to check for updates server-side, unless an event-based system were implemented.

So before going down that road, is there any interest? Can you think of non-obvious reasons why this would be a bad idea? From the ViciPhone success stories it seems like websockets generally work well in practise.

(FWIW, this is about Vicidial Agent Screen <=> Vicidial Web Servers, not Agent Screen <=> custom app, which should be covered by http://vicidial.org/docs/WEBSOCKETS_SUPPORT.txt)
mariusmarais
 
Posts: 16
Joined: Mon Aug 19, 2019 8:24 am

Re: Converting Agent Comms to Websockets

Postby mariusmarais » Thu Aug 27, 2020 6:09 am

Incidentally, aside from playing audio via ViciPhone, it looks like using websockets (at all?) may exempt a tab from some of the background throttling, besides the fact that it should use less resources in general than polling.

There are a number of automatic exemptions from this throttling:
...
Applications with real-time connections (WebSockets and WebRTC), to avoid closing these connections by timeout. The run-timers-once-a-second rule is still applied in these cases.

(from https://developers.google.com/web/updat ... throttling)
mariusmarais
 
Posts: 16
Joined: Mon Aug 19, 2019 8:24 am

Re: Converting Agent Comms to Websockets

Postby mflorell » Thu Aug 27, 2020 7:57 am

That would be a rather large undertaking, but we would certainly be willing to take a look at it to see how viable it may be.

Yes, this would certainly require a lot more webserver resources, although the impact would be hard to measure until you were able to get some installations running it in production.
mflorell
Site Admin
 
Posts: 18383
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Converting Agent Comms to Websockets

Postby mariusmarais » Fri Aug 28, 2020 2:28 am

OK, I'll start poking at it to get an idea what I'm for.

Will report back as soon as I have a rough plan.
mariusmarais
 
Posts: 16
Joined: Mon Aug 19, 2019 8:24 am


Return to Development

Who is online

Users browsing this forum: No registered users and 27 guests