IFAE06 - Pavia - Italy April 2006http://iguana.web.cern.ch
Interactive Web-based Analysis
Clients using AJAX: examples for
CMS, ROOT and GEANT4
Giulio EulisseGeorge AlversonShahzad MuzaffarIanna OsborneLucas TaylorLassi Tuura
Northeastern University, Boston (MA), U.S.A.
IFAE06 - Pavia - Italy- April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
What is AJAX?
2
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
What AJAX is not...
3
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
What AJAX is not...
4
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
What AJAX is not...
5
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
Asynchronous
Javascript
And
XML
6
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
AJAX
AJAX is a buzz-word used to indicate a set of techniques and programming patterns, involving Javascript and XML, which allow to create web applications that give the same feel and
responsiveness of traditional desktop applications.
7
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
Traditional web pages workflow
8
Client
Server
HTTP GET Request
The client does an HTTP GET Request to the server
time
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
Traditional web pages workflow
9
Client
Server
The server constructs the full web page
time
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
Traditional web pages workflow
10
Client
Server
The full page is sent...
time
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
Traditional web pages workflow
11
Client
Server
...and processed by the client...
time
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
Traditional web pages workflow
12
Client
Server
If the complete web page is complex enough, a big interval of time intercours between request for a page and its actual availability to the user
time
Big latency!
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
Traditional web pages workflow
13
Client
Server
moreover the user cannot use the web page until fully loaded.
time
Period the web page is unavailable to the user
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
AJAX
14
Client
Server
The client does an HTTP GET Request to the server
time
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
AJAX
15
Client
Server
The server constructs the minimal web page for the user to start browsing
time
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
AJAX
16
Client
Server
The minimal page is sent
time
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
AJAX
17
Client
Server
The client processes the web page
time
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
AJAX
18
Client
Server
...if (and only if) more information is requested by the user....
time
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
AJAX
19
Client
Server
a new request for DELTAs is done
time
XMLHTTPRequest
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
AJAX
20
Client
Server
the server processes the request and decides what has changed
time
Server processing deltas
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
AJAX
21
Client
Server
response is given formatting delta into XML
time
with deltas
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
AJAX
22
Client
Server
the delta is processed asynchronously using javascript
time
Asynchronous processing
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
AJAX
23
Client
Server
and the page is finally updated
time
Page update
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
AJAX
24
Client
Server
iterate on new user’s requests
time
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
The AJAX advantage
25
Client
Server
time
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
The AJAX advantage
26
Client
Server
time
LOW LATENCY!
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
The AJAX advantage
27
Client
Server
time
Reduced time the web page is not available
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
The AJAX advantage
28
Traditional AJAX
data
sen
t
time
Initial user’s request
User’s request / page
update
User’s request / page
update
On update only deltas are sent
IFAE06 - Pavia - Italy- April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
IGUANA and AJAX
29
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
Interactive
Graphics for
User
Analysis
30
CHEP06 - Mumbai - INDIA - February, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
IGUANA object model and visualization toolkit
Data sources
Offline softwareOnline software Data Quality Monitoring G4
QT Open Inventor ROOT
31
CHEP06 - Mumbai - INDIA - February, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
IGUANA object model and visualization toolkit
Data sources
Offline softwareOnline software Data Quality Monitoring G4
QT Open Inventor ROOT
32
CHEP06 - Mumbai - INDIA - February, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
IGUANA object model and visualization toolkit
Data sources
Offline softwareOnline software Data Quality Monitoring G4
QT Open Inventor ROOT
33
CHEP06 - Mumbai - INDIA - February, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
IGUANA object model and visualization toolkit
Data sources
Offline softwareOnline software Data Quality Monitoring G4
QT Open Inventor ROOT
34
CHEP06 - Mumbai - INDIA - February, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
IGUANA object model and visualization toolkit
Data sources
Offline softwareOnline software Data Quality Monitoring G4
QT Open Inventor ROOT
35
CHEP06 - Mumbai - INDIA - February, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
IGUANA object model and visualization toolkit
Data sources
Offline softwareOnline software Data Quality Monitoring G4
QT Open Inventor ROOT
36
CHEP06 - Mumbai - INDIA - February, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
IGUANA object model and visualization toolkit
Data sources
Offline softwareOnline software Data Quality Monitoring G4
QT Open Inventor ROOT IGUANA embedded HTTP/1.1 server IGUANA Web Services Framework
IGUANA Web Services IGUANA Javascript GUI library
37
CHEP06 - Mumbai - INDIA - February, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
IGUANA object model and visualization toolkit
Data sources
Offline softwareOnline software Data Quality Monitoring G4
QT Open Inventor ROOT IGUANA embedded HTTP/1.1 server IGUANA Web Services Framework
IGUANA Web Services IGUANA Javascript GUI library
38
CHEP06 - Mumbai - INDIA - February, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
IGUANA object model and visualization toolkit
Data sources
Offline softwareOnline software Data Quality Monitoring G4
QT Open Inventor ROOT IGUANA embedded HTTP/1.1 server IGUANA Web Services Framework
IGUANA Web Services IGUANA Javascript GUI library
39
CHEP06 - Mumbai - INDIA - February, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
IGUANA object model and visualization toolkit
Data sources
Offline softwareOnline software Data Quality Monitoring G4
QT Open Inventor ROOT IGUANA embedded HTTP/1.1 server IGUANA Web Services Framework
IGUANA Web Services IGUANA Javascript GUI library
40
CHEP06 - Mumbai - INDIA - February, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
IGUANA object model and visualization toolkit
Data sources
Offline softwareOnline software Data Quality Monitoring G4
QT Open Inventor ROOT IGUANA embedded HTTP/1.1 server IGUANA Web Services Framework
IGUANA Web Services IGUANA Javascript GUI library
41
CHEP06 - Mumbai - INDIA - February, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
IGUANA object model and visualization toolkit
Data sources
Offline softwareOnline software Data Quality Monitoring G4
QT Open Inventor ROOT IGUANA embedded HTTP/1.1 server IGUANA Web Services Framework
IGUANA Web Services IGUANA Javascript GUI library
42
CHEP06 - Mumbai - INDIA - February, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
IGUANA object model and visualization toolkit
Data sources
Offline softwareOnline software Data Quality Monitoring G4
QT Open Inventor ROOT IGUANA embedded HTTP/1.1 server IGUANA Web Services Framework
IGUANA Web Services IGUANA Javascript GUI library
43
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
G4 Visualization
44
Tree browser with the full G4 description of CMS, as found in the old OSCAR
simulation program
Live, navigable by mouse dragging
3D window.Does not require any plugin.
Framework controller.
Panning and zooming
controllers
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
CMS offline software
45
Getting ready for CMS cosmic challenge
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
Generic DQM GUI
46
QT & ROOT
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
Generic DQM GUI
47
AJAX&ROOT
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
Generic DQM GUI
48
The two implementations share most of the code!!!
AJAX allows to have the same behaviour of desktop and web applications.
QT AJAX
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
Generic DQM GUI
49
DQM Services
Internal object representations
Controller
Root ModelQT Tree Model
QT GUI and controls
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
Generic DQM GUI
50
DQM Services
Internal object representations
Controller
Root ModelQT Tree Model
QT GUI and controls
XML Tree Model
IGUANA Web Services for controls
JAVASCRIPT GUI
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
MC Request system
51
Javascript generated GUI with connection to backend DBs via CORAL
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
MC Request system
52
Tree widget populated on the fly with requests from the request DB.
Actions performed by the toolbars and menus are lazily loaded only when clicking.
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
Google Map
53
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
Tracker Map
54
IFAE06 - Pavia - Italy- April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
Final words
55
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
AJAX recap
v AJAX breaks the GET/DISPLAY/RELOAD paradigm used by standard web pages.
v In AJAX web applications data is transferred a little bit at the time in small chunks, when the user requests for it.
v The updates of web pages are asynchronous and happen without touching what the user sees until the end.
v It allows complex, interactive, low latency web applications, without the need for external plugins or JAVA virtual-machine (JAVASCRIPT is not related to JAVA !!!)
56
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
IGUANA and AJAX
IGUANA provides a framework for creating AJAX applications and has examples for a variety of tasks
CMS, ranging from event display to data quality monitoring to MC request system.
57
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
Who else uses AJAX
v There are a few “startups” ;) that are using AJAX techniques more and more as well...
58
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
Who else uses AJAX
v There are a few “startups” ;) that are using AJAX techniques more and more as well...
59
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
Who else uses AJAX
v There are a few “startups” ;) that are using AJAX techniques more and more as well...
60
IFAE06 - Pavia - Italy - April, 2006 Giulio Eulisse, Northeastern Universityhttp://iguana.web.cern.ch
and a few others...
61