Smartupdater

  |   Home  |   Basic  |   Stop / Restart  |   Programmable Timeout  |   Smart Updating   |   Remote Control  |   Download  |   Blog

Smartupdater-3.0.beta is released. Please visit http://www.eslinstructor.net/smartupdater3/


Remote Control ( JSON only )

Time on server:
Smartpdater Timeout:


sec.  


$("#example1").smartupdater({
   url : 'foo.php',
   dataType : 'json',
   minTimeout: 5000 // 5 seconds
   }, function (data) {
     $("#example1").html(data.servertime);
   }
);

The simpliest JSON data can look like this one:

{
  "servertime":"03:19:11",
  "smartupdater":"15000"
}

How to Avoid Server Overload

Everybody who has deal with polling systems knows, that server can be easily overloaded with client-side requests, so we try to set polling period as low as possible. But if number users grows, we have to either increase polling period and make our application less dynamic or spend money on either upgrading hardware or buying additional resurces from service provider.
Another problem - simultanious access of large number of users which is very common for educational applications.

Smartupdater resolves these problems! "Remote programming" feature allows server to programm polling interval on client side dynamically. How it works.

Server:
  1. Server gets regular polling request from a client
  2. gathers requested data and build JSON
  3. checks CPU usage.
  4. in pre-defined look-up table finds the best polling period for current CPU-usage level.
  5. appends polling period parameter to the JSON.
  6. sends JSON to a client
Client:
  1. Smartupdater receives JSON data from server
  2. Smartupdater check the data and if finds configuration portion, extracts a new timeout and re-programs itself by appling this timeout
  3. passes data to a callback function

You even don't need to configure Smartupdater to activate this feature :) It's done automatically.



©2010 Vadim Kiryukhin