Websocket in OutSystems

Websocket in OutSystems

I am building an app required realtime features, can anyone advise if there is a plugin for web socket ?
Hi Dongyu,

You can find two forge applications that are using node.js. Check the implemenation if you want to understand how it works, but basically they depend on a secondary application server (external) for node.js.
  • Chat - Mobile and Inline Chat for OutSystems' Applications (uses node.js) 
  • RFID - Read information from a COM (serial) port into your web page via nodeJS such as an RFID card
    Uses nodeJS as the server 

Paulo Garrudo
Hi DY, I would just like to step back and validate whether you truly need a "real-time" solution or whether a simple "pooling" solution would do the job? To have a page reacting to a specific event on the server side, you can simply have a piece of javascript on the page that "pools" the server to understand whether a specific event occured - for example, you can simply use the standard setTimeout javascript function to run a piece of javascript that calls a REST service on the server side to detect whether the event occured and react to it.

It you truly need real-time, the solutions provided by Paulo make all sense (Eg. gaming, trading, etc.). If this is not needed, I would definitely avoid it because it will add uneeded complexity to your ecosystem - everytime you setup an OutSystems server you have to remember to setup that external technology, everybody in the development team will have to deal with more complexity, you will have to worry about upgrading that technology over time, etc.

Kind Regards,

Daniel Lourenço
Hi Dongyu,
following Daniels suggestion (in case that is an option for you), the setTimeout should only be called after the previous request has been finshed. 
That way, in case the requests become slower, they don't have the risk of being run in parallel and making extra load to the system.