So I've been working on the Socket.IO implementation that has been released previously for a java package and netty. It's been extremely frustrating since I'm not a Java developer and the documentation for ColdFusions gateway stuff is CRAP. That and there doesn't seem to be any way to debug gateways AT ALL when they are running so I'm just walking blindly through the whole freaking thing, compiling stuff and pushing it to see if anything changes. Awesome.
Well in spite of all that, I was able to get some freaking connectivity going! I currently have it running as a gateway service in CF but it isn't actually tapping into any CFC's or anything like that, but it's at least RUNNING now. I have the WebSocket service just posting anything to everybody and I have to windows passing stuff back and forth at least so there is that. Now if I can get the cfc's to start working we'll be making some serious progress!
Details and breakdowns of my daily workings while using ColdFusion, JavaScript (Sencha's ExtJS right now), Bryntum Scheduler, and many other random pieces I slap together to make magic happen.
Friday, July 6, 2012
Tuesday, July 3, 2012
Socket.io, sounds great unless you don't use node.js
So when looking at utilizing WebSockets and all that exciting technology, I was really psyched about using Socket.io due to the fact that it can fail gracefully to other technologies to simulate such communication. Awesome! Except for the fact that Socket.io uses a different protocol when pushing/pulling data that needs your webserver to be customized to support it. Assuming your webserver even supports WebSocket stuff. It just so happens that ColdFusion 9 does not. Of course. So after much searching I found cf-websocket-gateway which seemed like it'd get the job done! It's based on webbit and netty at the moment which seems fine to me. I was able to get the test cases running smoothly but then when I tried using socket.io instead of the included WebSocket piece it freaked out on me (shock of shocks, it requires node.js to work nicely). That's when I found out that it used that super-special protocol to make magic happen. Back to the drawing board.
I have come across a new project called netty-socketio (not to be confused with socket.io-netty). This newer one seems more compatible with the latest Socket.io protocol (.6-0.9.3 at this writing) and is based on netty (which cf-websocket-gateway is based on in a roundabout fashion) but of course does not include the gateway wrapper to integrate with CF 9. So now I can either write the wrapper myself (which doesn't seem so bad, I just haven't used Java in a few years) or just stick with this other WebSocket js package that hasn't been updated in quite a while and I'm pretty sure only uses the Flash fail-over or the browser-based method of WebSocket compatibility.
I think my plan is to write an ExtJS wrapper around this other package with the eventual plan to migrate to Socket.io with this netty-socketio package on the backend. Awesome. The joys of trying new things out but being restricted by your current setup.
Subscribe to:
Posts (Atom)