Hey Jelle,
You have couple of option with websocket, best one is for sure use Mendix builded widget
Pusher - https://docs.mendix.com/appstore/services/pusher/, it's easy to use and from performance view it's should be fine, down side it's free to use until number of request per day and it's comunited out site of your application if you are using on-premise definitely not widget for you, in that case you can use
EZWebsocket - https://marketplace.mendix.com/link/component/205276 I was testing it locally it's was easy to implement performance was great, only down side publisher is not Mendix and updates are dependent on developer of widget.
Personally if you can I will go with Mendix pusher since is create by Mendix, but if not EZWebsocket will do the pretty much great job as Pusher and always if both not suits you, you can always build your own widget.
Hope this answer your question,
Best regards, Slavko
I believe there is still an issue with running web sockets on clustered (i.e. multi-instance) Mendix applications. As long as you are using a single instance you are fine.
I tried the EZWebsocket widget and for Single Instance it is a very handy/simple to use solution.
As the above discussion states MultiInstance is not easy supported. The current EZWebSocket_MultiInstance solution leans on using TaskQueues which result in a continuous stream of inserts in the TaskQueue-table. I think this will eventualy result in full-databases. So I would not recommend using this AddOn at this moment.
Is there maybe a different/beter solution (without TaskQueue-inserts) for constantly retrieving records from the PendingNotification table ?
Thank you Nathan.
Since I made a copy of your module because I use 9.24.15 I already tried this solution for a couple of days now (without a ShutdownHelper :-) ).
After the first run I noticed an increase in database-cpu and transactions. This stayed heigh:
In trying to solve this I added a Delay of 1 second and then the metrics dropped and after that no heigh spikes anymore. Don't know why this made such a big difference.
For our purpose this delay of 1 second will be fine.
I also added a configuration to this module, because we don't have multi-instances on every environment. On TEST this boolean = false and the SUB_Notify calls the Notify JavaAction. On ACC this boolean = true and the SUB_Notify will use the PendingNotification-logic.
I still have one usecase that seems not to work. I will post this in a new "Answer" below this one. [EDIT: everything works fine now]