With the addition of Websockets, other people's updates to a project backlog are pushed to everyone else viewing it. In this way Pusher is an incremental improvement, TrueStory didn't rely on these real time updates, they just improved the user experience in much the same way both CSS and JavaScript should enhance the user experience of a plain html page.
Existing Architecture
The bulk of the application code in TrueStory is on the client side, and relies on libraries …
…handle talking directly to slow clients and high-latency apps ( Comet/ WebSockets) without nginx in front.
What is a "low-latency, high-bandwidth connection"?
Anything on localhost or the local area network that doesn't make the server sit idle, unable to service other requests.
Debugging
Can you give me an example of how to debug?
Reproducibility is critical to debugging. Processes are inherently simpler, as the process state is always well-defined on a per-request …
…connection to a server, and have immediate feedback when there are events they need to be notified of. Websockets make your applications more dynamic, and break them out of the traditional stateless request-response cycle. Your applications can therefore rely on maintained state in the browser which will be kept fresh with messages from your server.
Pusher makes adding Websockets to your application a quick and easy process. Pusher provides a simple Ruby gem ) for interacting with …
…atomicity and speed make it an excellent tool when tracking things directly from the web, e.g. through WebSockets or Comet. If you can use it asynchronously, all the better.
Affiliate Click Tracking with Rack and Redis .
Simple approach to tracking clicks, I probably wouldn't use a list for all clicks, but instead have one for each path, but there's always several ways to get to your goal with Redis. Not exactly the same, but Almaz can track URLs visited …
The one thing to take from all this? WebSockets are important. You can add them easily to your web applications and build your own, domain-specific protocols on top of them. AND IT'S ALL JAVASCRIPT.
I hope you are excited by now.
NOTE: The server side of WebSockets world is a whole different post. While the protocol itself is ridiculously simple, there are some performance considerations to have in mind. Luckily smarter people than us have already done most of the work. There are …
If you aren't aware already, HTML5 has Websockets API - enabling bidirectional communication between client and server. You should check Iliya's post Ruby & WebSockets: TCP for the Browser for a better explanation.
Starting with version 0.9, Cramp has in built support for Websockets. Unlike other solutions , Cramp extends the underlying webserver ( thin or Rainbows! ) to add the websockets superpower. …
Support for WebSockets in Chrome and Safari also means that our mobile devices will soon support bi-directional push, which is both easier on the battery, and much more efficient for bandwidth consumption. However, WebSockets can also be utilized outside of the browser (ex: real-time data firehose), which means that a regular Ruby HTTP client should be able to handle WebSockets as well:
require 'eventmachine' EventMachine. run { http …
WebSockets
Yes, I have discussed WebSockets in the previous blog entires and I will discuss more in the following sections.
The many implementations of WebSockets.
I think the node.js evented approach goes very well with WebSockets, but does it mean that we should abandon our favourite server side language/framework? Not quite. Like Jetty and APE already support WebSocket, most concurrency orientated languages, libraries, and frameworks already have WebSocket…
I got lots of positive comments/retweets about my last article "Real time online activity monitor example with node.js and WebSocket" .
(if you haven't read the very long article, and not interested into the technical detail, don't worry. I try not to get into technical detail this time )
I am glad that I was able to show how exciting node.js and WebSockets are to make real time web application.
However, I don't think my "activity monitor" example …