Richard Searle

home

Performance feasibility of "Real time" display via comet

04 Jun 2011

Chat and stock tickers are the canonical Comet applications. The latter indicates that web applications might be able to implement "real time" applications that are currently the domain of Swing and SWT applications. For example: process control mimic panels, network status displays, etc. Lift provides a very easy to use Comet implementation that is particularly well suited to these problem domains. A trivial test of feasibility was created from the Clock example code, modified as follows: The test environment is a single dual core 2.8 Ghz processor, running both the Jetty server and the browser. Chrome javascript console indicates each Comet request has ~ 14ms latency, which is impressive.  The CPU load is much less impressive: > 50 % of a one core.   This is surprisingly large, but certainly acceptable for a direct replacement of a Swing/SWT application where the machine is dedicated to a single user.  The Jetty server load increases slowly with additional clients, allowing a dozen or so clients to be supported from a single server.  This is more than sufficient for the domains of interest.