I was having similar thoughts before I wrote the extension
Thanks for the quick reply.
I’ve never used NGinx, but we use IIS which I would hope/imagine doesn’t have any limits on Windows ( we also run exclusively Windows Server 2012 R2 at the moment ). Would you think that’d be the case?
Maybe when I get around to it I’ll run some load tests and see what it can handle, I have a CF => Node/Socket.io thing running on a production site that averages 100-200 active users at any moment and seems to use almost 0% CPU and < 70MB of RAM, so other than the whole making http requests from CF to Node on the same server it seems like a viable option. Something about those cfhttp calls though just make me feel uncomfortable , hoping to switch to your extension for future use.
I expect no such issue with IIS since it’s native to Windows.
It’d be great if you can post somewhere your WebSocket proxy settings for IIS for future users. Some users asked in the past and I don’t think that they got any useful replies in our forums.
As far as I know we’re not using any proxying. I have Node listening on port 8443, which Socket.io connects to, and then just cfhttp post to it over that port.
Ah, didn’t sleep much last night. In this moment I’m realizing IIS won’t be a part of this at all. It’s just people’s browser connecting directly to the Node app, which is also its own web server
Haven’t touched that code in a while, forgot how it worked until I just looked at it.
Exactly. If you set it up with nginx that same way then there’s no issue there either, since the web server is not part of that system anyway.
Until you get to 512 concurrent connections right?
Yes, of course.
WebSocket connections remain open for as long as the websocket session is alive, so as long as the clients are connected at the same time they are all concurrent. That is very different from HTTP where the connection is opened and closed for the request.
But if you’re not using nginx on Windows then that’s not a factor.
isapir, I’m wondering if you have any resources available for a very simple, very basic simple example of connecting to a socket.io endpoint and displaying that data on a CFML page. No need to serve socket data to anybody, no need to communicate packets back and forth. Just a very, extremely basic simple uncomplicated brief simple example of connecting to a socket.io endpoint and then displaying that data on the page.
I’m trying to understand your tutorials but they all seem to be focused on serving data out from the server and doing chat-like things, rather than just simply connecting to a endpoint and displaying that data.
Is that possible with this extension?
The extension currently only implements the server side, so that is not possible.
IIUC you want to connect from Lucee to a node.js server, so the Lucee end will act as a WebSocket client, which is not implemented at this time.
I was planning to add that functionality, but… life happens.
There is actually a websocket client in the beta extension provider that allows you to connect to websocket servers. http://download.lucee.org/?type=extabc
Awesome, I will give it a shot. Is there any documentation for this extension that I could reference to help get me started? Thank you!
Not that I am aware of
You might try the project itself:
The project documentation WIKI:
And these tutorial videos…
I was actually looking for documentation for the beta websockets client version, referenced in Yamaha32088’s comment here.
Whoops. Sorry about that not as much documentation on that side of the equation.
Any way to receive binary messages? Perhaps using the underlying Java connection object?
How about sending ping messages?
Hello @isapir !
We used Lucee and you Websocket extension with IIS on Windows R2 test environment.
To run this on iis i used this Troubleshooting Lucee Websockets with IIS and ARR , so i created proxy to rewrite call to localhost:8888 to use websockets, looks like works correctly.
So the question:In the future we should have possibility to open 10 000 at one time, does it looks possible and does lucee has some limitation for one time sockets count?
Thanks in advance
The only limitation should be your hardware, not Lucee.