Entries Tagged as “WebSocket”

Debugging ColdFusion WebSockets

July 27, 2012 / Kunal Saini

  HTML5 | Adobe ColdFusion 10 | ColdFusion | productivity | web application development | WebSocket

Debugging ColdFusion websockets is not the easiest things, at least not as easy as using websockets. ColdFusion 10 provides a seamless integration to websockets. It provides it's own messaging layer and client side JS functions to subscribe and publish messages to a web sockets. As CF websockets works Asynchronously that makes debugging even more complicated.

However CF10 websockets messages provides some sort of information. It is a bit difficult for beginners.
Specifically when there is an error message. it is very difficult to determine it is from client side or server side.

Here is a small tool that will help the beginners in CF10 websockets to debug their application(from client side).This tool will enable a CF programmer to see what is going in and out of the websocket at the browser. It also highlights if there  is any error.

 

download and view screenshots

 


ColdFusion WebSockets Use case: Video over WebSockets

April 19, 2012 / Sagar Ganatra

  HTML5 | Adobe ColdFusion 10 | Rapid Application Development | web application development | WebSocket | Zeus

ColdFusion WebSockets are lightning fast and presents an opportunity to create realtime applications. This time I've created an application that tries to push HTML5 video content over a WebSocket. The idea here is to use a temporary Canvas, since it allows you to draw a video frame on it and then transfer the contents of the drawn video frame (as base64 encoded Image) over a ColdFusion WebSocket channel to the subscribers.

I've posted this on my blog along with the demo video and code. Check out Pushing HTML5 Video content over ColdFusion WebSockets.


ColdFusion WebSocket: Restricting Right to Publish

March 14, 2012 / Evelin Varghese

  HTML5 | Adobe ColdFusion 10 | Application Server | ColdFusion | creating a website | productivity | Rapid Application Development | web application development | web programming | WebSocket | Zeus

The very first and  easy step to setup WebSocket is to use the default Channel Listener .But if you need to implement business logic to control the WebSocket system in your application you will have to use a custom Channel Listener CFC.

Channel Listener has six methods which can be used to control

For more details on how to implement the logic to restrict the right to publish data , read my blog entry - ColdFusion WebSocket Part4:Restricting Right to Publish

 


Interpreting ColdFusion WebSocket responses

March 07, 2012 / Evelin Varghese

  HTML5 | ColdFusion | WebSocket | Zeus

Most of the ColdFusion WebSocket responses are asynchronous, which essentially means that  the response to your WebSocket method calls (such as getSubscriberCount, getSubscriptions, publish, invokeAndPublish, or invoke) come to message handler.

Since there are different types of responses and all of them come to the message handler, application developer has to interpret each response, figure out the operation that triggered, and show the responses appropriately.

Let us try to crack  how to categorize the responses received.For more details checkout  my thrid entry on ColdFusion Websocket blog series 

-Evelin Varghese


CFB Extension for Server Stats using WebSocket

March 05, 2012 / Ram Kulkarni

  CFBuilder | ColdFusion | WebSocket

The new WebSocket feature in ColdFusion 10 is useful in many scenarios. One such usecase is pushing server statistics to client applications.

This ColdFusion Builder extension  uses WebSocket feature of ColdFusion 10 to display two server stats - heap and CPU usage. It uses point-to-point (instead of publish-subscribe) mode of WebSocket communication. Once websocket is opened (using cfwebsocket tag), it invokes a method on CFC, that starts a thread and pushes server data to the client every 5 seconds using WebSocket API, wsSendMessage.

The client plots this data as graphs and updates them whenever new data is avilable from the CFC (which is every 5 seconds). It (client) keeps buffer of 200 readings and when it exceeds this limit, it compacts the array by merging some of the earlier readings. Here is a screen shot of this extension -

Screenshot - Server Stats Extension

Hovering mouse over the graph shows stats at that time. Note that this data is interpolated from nearby values. The CPU usage graph could be little misleading. It might appear that server is using CPU cycles all the time. But, since the CFC that sends this stats also run on the same server, some CPU cycles would be used by the script. And the graph is plotted by filling the area between current and previous readings. However this graph could be useful in observing change in CPU usage over a period of time.

Non-extension version of this tool is also available. Download this file, unzip it in the wwwroot and run index.cfm.

-Ram Kulkarni

 


Blue Mango Theme Design By Mark Aplet

Super Powered by Mango Blog