It’s the Web, just Kwwika

The real-time web. Delivered. 
Filed under

Comet

 

The benefits of Real-Time Push-Once

There's so much excitement about real-time push technologies that quite often, in fact almost always, the benefits of using push are overlooked, forgotten, or simply not known. The technology excites programmers who want to use it, want to know how it works or want to write their own push framework, user experience (UX) professionals who understand how this paradigm shift will massively benefit users, general technologists who can see how the addition of such technology can improve an application or product and entrepreneurs who have the vision to see ground breaking ways of using push. 

The understood benefits

The cost and resource benefits that real-time push bring start to be considered when the excitement of the technology dies down and you start talking in detail about using a Cloud Platform as a Service (PAAS) such as Kwwika. Kwwika provides the more obvious benefit of allowing anybody to publish and add real-time data to any web page, web application, Rich Internet Application (RIA), desktop or service application and share information between all these and from a number of different sources. The first thoughts of resource and cost saving are when you start to consider that by using a service you don't need to buy servers to host your real-time push servers, you don't need to spend time and effort installing, setting up and learning how to use the software, you don't need to worry about maintaining the software and handling upgrades and you don't need to worry about how you deal with scaling your servers to meet increased demand as well as keeping resource usage to a minimum during lean spells. Kwwika offers all the benefits of a hosted scalable service, but for real-time push streaming as a service. This means you can concentrate on building your application, developing your product or service and winning business.

The benefits of real-time push-once

The best way to understand one of the fundamental, but as yet hidden, benefits of Kwwika, and ultimately real-time push-once, is through an example:

Imagine a website known as the best destination for up to the second sports information for the newest and most popular sports of all time: Multiball. It's a mixture of all the most popular sports including football (soccer), baseball, basketball, rugby, tennis, cricket and motor sports. This new game is fast paced and jam packed with statistics which change every second. Today there is a really big game on between Great Britain and USA. The world wants to watch this game but it's during the day for many people who will be at work in front of their computers so they'll be logging on to this well known website to keep up to date with the scores. The game is tied in the 4th quarter with only 1 minute remaining and millions of users from around the world starting hitting the F5 key and clicking the "Refresh" button in their web browser to refreshing the website and check for the latest score. The servers hosting the website can't handle the load and crash.
1_request
Some websites try to get around this scenario by adding some script to their score web page which polls the server for an update at a set interval. The problem with this is that the web server still has to deal with, in effect, a refresh although the data returned to the request can be much smaller.
2_polling
The most obvious use of a real-time push system is that as soon as a server (or score system) receives new information it can push it to any application instance that is interested in that information. In the above Multibal' website example the application instance is each web browser session logged on to the website. If the sports website were using a real-time push system this would mean that they could instantly push any changes in the score to each web browser session which would mean that each website user wouldn't need to refresh their page (reloading the whole page) to check if the score had changed.
3_push
This alone would take a massive load off of the sports website infrastructure, but it's possible to take things even further.

Even in the real-time push scenario the sports website would need to build and maintain the real-time push infrastructure and push an update to each of the millions of website users. From the information above you'll know that real-time push services can help them out with the infrastructure. The new, and game changing feature that Kwwika offers is that when Rooney Giggs McFadden makes that game winning manoeuvre-score for Great Britain the sports website would only need to publish the score update once into the Kwwika service (real-time push-once). Kwwika would then instantly distribute that update to the millions of website users. This means the website only ever needs to deal with single page loads from its users and push out each score change or game statistic once, Kwwika does the rest.
4_push-once

Thanks to Zen Elements Web Design & Development for the diagrams

Filed under  //   cloud   comet   paas   platform as a service   real-time push   real-time push-once   real-time web   streaming as a service  
Posted by email 

Comments [0]

Chrome/Safari (webkit) + real-time push = always loading indicator

With real-time push becoming mainstream more and more developers are going to start adding real-time push to their website. One minor user experience hurdle still to be fully solved for webkit based browsers is the "always loading indicator" which can appear if a streaming connection has been established to a push server or service. This indicator appears due to the streaming connection that has been established between JavaScript in the web browser, using an XMLHttpRequest object, where you are effectively continually loading, or waiting, for content from the push server.

(download)

It makes sense that webkit-based browsers do something to detect if a page has loaded and then stop displaying the loading indicator. However, it's still a bit unclear what determines if the loading indicator will be shown when a streaming connection is established from JavaScript. Following a bit of googling and some tinkering it would appear that you can stop the loading indicator if you establish your streaming connection after all other page content has loaded. Oh, it's easy then? Nope! Determining when all page content has loaded doesn't appear to be as simple as you would think.
To save some time I tried establishing my streaming connection to Kwwika at different points in the page loading process using the jQuery library:
  1. DomContentReady via the .ready() jQuery function (also see $(calback))
  2. window.onload via the .load() jQuery function
Google Chrome
When connecting within the .ready() callback the loading indicator would always appear.
$(document).ready(function()
{
    var oConn = kwwika.Service.connect();
});
However, if you use the .load() callback 99% of the time the loading indicator would disappear after the page was loaded and then the real-time push connection would be established.
$(window).load(function()
{
    var oConn = kwwika.Service.connect();
});

Safari
In Safari the results when using the .ready() callback were exactly the same.
For the .load callback I had to introduce an additional wait using window.setTimeout in order to lose the loading indicator.
$(window).load(setTimeout(function()
{
    var oConn = kwwika.Service.connect();
}, 10000));
If the .load() solution worked for both webkit-based browsers then I'd be happy to say that this problem has been resolved. However, having to add a random timeout to lose the loading indicator in Safari means that, for now, I think this is going to be a continuing annoyance for developers and will also impact the real-time push web application user experience by suggesting to users that the web application has not fully loaded.

Filed under  //   Chrome   Comet   Loading Indicator   Real-Time Push   Real-Time Web   Safari   Streaming   Throbber of doom   Webkit  
Posted by email 

Comments [0]