Websocket Browser Limit
-
I've got the websockets to work, and I prefer them highly -- they're much more responsive. However, we have hundreds and hundreds of points we need to pull constantly to a front-end custom-made dashboard type thing, and i find that i have a hard limit of about 255ish websockets open at once. I did a bit of research and found that it is a browser/OS limitation and tried to increase it with no effect (OSX, same limitation on windows though...)
Has anyone hit this issue at all? I have to do endless 5-second-delays on getValue api requests instead =\ I would prefer sockets but they have proven to be unfortunately limiting. Any solutions on this that I don't know about?
-
One solution would be to use the Realtime data endpoint with a nicely crafted RQL query to return all of the current values for all the points you want, this of course will still require you to poll every 5s.
The best solution would be for us to code up a new type of Point Value web socket that publishes data for more than one point at a time. We are busy at the moment with the 2.6 release stream but in the coming weeks I can slide this feature into the MangoApi module.
Any chance you could let us know what you are using Mango for? This might give us some ideas as to what other features you might want in this new web socket endpoint.
Thanks,
Terry -
I mispoke in my last post, you should be able to use 1 web socket for all your data point values. If you review the web/js/mango-2.0/RealtimeDataProvider.js file in the Dashboards module you can see how this would work. Basically you just need 1 web socket and can then send additional registration requests for each data point you want.
The next version of the Dashboards module (1.1.1) will contain an example of how to use 1 web socket for all point values captured within Mango.