Tuesday, July 10, 2012

Functional ColdFusion Gateway for Socket.IO

So I got my ColdFusion Gateway working pretty nicely with Socket.IO. I have a sample running via Chrome, Firefox, and IE and it's going from the Socket.IO js package on the frontend to the netty-socketio package that I previously mentioned, to the CFC I built, and right back out. I tested it and I can send messages to specific users as well as broadcast to all users. I can send string messages as well as Json objects. Seems to do what I need it to do for now. I broke it out from the original cf-websocket-gateway package that I used as inspiration so that depending on the message type it will call a different function. I really only plan on using the Json message but figured I'd push it a little bit for those who might be interested in other functionality.
Speaking of which, I am trying to get my customer to allow me to release my package as an Open Source project to maintain. It's nothing fancy but I think it would help a number of ColdFusion users out there who want to try some new/cool stuff with WebSocket and Socket.IO. I know I am! My next task is to create a nice and modular ExtJS store plugin that can push store updates to all users who are connected. It would be a useful tool when having a large grid that needs to be refreshed from multiple users (who wants users to overwrite each others' data?) or even chart data like a stock market ticker (note to self, that'd be a perfect example to build!)
So that's my plan. I will try and release what I have to the outside world and I'll continue to develop some additional components to help interface with what I put together. Should be fun! Maybe one day I'll even get users looking at what I've done. Hah. We'll see.


  1. I am interested in this, I really hope your customer allows you to release the code. If not the entire package perhaps a tutorial or something...?

  2. does the cf-socketiogateway provide any benefit over cf-websocket-gateway?