Anyone know if the websocket gateway even works in...
# lucee
s
Anyone know if the websocket gateway even works in Lucee 6.1.1? Trying to follow the instructions but there's no 'websocket' option in the dropdown for Event Gateways, despite adding the application.
These same options exist whether or not the websocket app is enabled.
Is websocket the 'async gateway?'
e
Web sockets are separate installable applications in Lucee. After you install it, restart the service if it doesnt restart for you.
s
I did restart the service, but still no “websocket” option in the dropdown
b
I've not heard of the websocket gateway. Is this a new feature? Do you have a link to the docs?
I am aware of the WebSocket Extension that Igal wrote awhile back, but I wasn't aware of that extension registering new gateway types
Go into the Event Gateway section of your Lucee admin panel. Create a new gateway instance of type WebSocket. Choose a name that makes sense and is unique into your Lucee context.
Event Gateway section is in the web, not server context, btw
b
Nice, I like that. Not sure how I missed it
That said, you should prolly reach out on the issue tracker for the websocket extension
It's not maintined by the Lucee core team (who don't hang out her much anyway) and Igal left this slack team a while back if I recall
The extension doesn't have wide use from my perspective, and support has been difficult for people to get due to Igal's limited time
Glancing at the source code, I'm having a hard time finding the gateway driver anywhere in there.
Here's a related ticket on Github from 6 years ago https://github.com/isapir/lucee-websocket/issues/20
s
Wow. There's a README update with an updated install that was never committed. https://github.com/isapir/lucee-websocket/blob/04efe28860d8253083c7dbdb29a833106b185989/README.md
b
Yeah, like I said-- support has been... difficult for people to get on this extension
Most people who I know who tried to use it, gave up on it
For what it's worth, I came out recently with a library called SocketBox which works on Adobe CF, Lucee, and BoxLang alike, BUT requires you are running on CommandBox. It doesn't have a gateway extension, but you may find it useful.
s
I'll take a look into that for my own personal/open-source projects (I prefer commandbox for those), thanks
b
Websockets are always a little bit of a pain in CF since we run on the servlet and are pretty far removed from the underlying connection management. It requires us to rely on a lower level implementation to manage the incoming connections for us, or to start a web socket server on a separate port
SocketBox has two forms. Standard, low level messaging https://community.ortussolutions.com/t/introducing-socketbox-a-new-websocket-library/10381 and a STOMP broker, which is more along the lines of what Adobe's websockets or socket.io offer https://community.ortussolutions.com/t/introducing-the-socketbox-stomp-broker-demo/10396
Both of those posts have links to online demos you can play with. (give them a few seconds to start on Render.com's free tier)