1 september 2007 – tango meeting – d. baraba-rossa, m. ounsy tango web protocol
TRANSCRIPT
2September 2007 – Tango Meeting –
D. Baraba-Rossa, M. Ounsy
Goals
Tango Web is a new API which allow to access to the Tango System through Internet.
The communication between Application and the Tango Web Server use only HTTP(80) or HTTPs(443) port.
3September 2007 – Tango Meeting –
D. Baraba-Rossa, M. Ounsy
Parameters
During project development of Tango Web, these goals have been forseen :
Low cost and quick development cycle.Low cost and easy maintenance.Reduce network traffic between client application
and the Tango Web Server.
5September 2007 – Tango Meeting –
D. Baraba-Rossa, M. Ounsy
TANGO WEB : General scheme
Tango
Database
JBOSS
DeviceTree
Jive
WEB Browser
Port 80 ou 443
Port 80 ou 443
Port 80 ou 443
FireWall
MachineStatusPort 80 ou 443
LDAP
6September 2007 – Tango Meeting –
D. Baraba-Rossa, M. Ounsy
TANGO WEB Architecture
TANGO
ATKCore.jar
ATKWidget.jar
TangORB.jar
ATKPanel.jar DeviceTree.jar
7September 2007 – Tango Meeting –
D. Baraba-Rossa, M. Ounsy
TANGO WEB Architecture
TANGO WEB
WebTangORB.jar
ATKCore.jar
ATKWidget.jar
TangORB.jar
ATKPanel.jar DeviceTree.jar
TangORBServer.war
The applications reach TANGO via Internet thanks to three jars:
-WebTangORB : Data Access Object module.
-ATKAppLauncher : Client side launcher
-TangORBServer : The Tango Web Server Core.
Server
Client
ATKAppLauncher.jar
8September 2007 – Tango Meeting –
D. Baraba-Rossa, M. Ounsy
WebTangORB
The data access is performed in two steps :
ATK components call WebTangORB components instead of TangORB components.
WebTangORb serializes and sends request to the Tango Web Server .
9September 2007 – Tango Meeting –
D. Baraba-Rossa, M. Ounsy
Code refactoring
DeviceProxy(Facade)
Private IDeviceProxyDAO deviceProxyDAO
Public … state(…) { }Public … command_list_query (…) { }
Public … get_attribute_property (…) { }Public … write_attribute (…) { }
IDeviceProxy(Interface)
Public … state(…) ;Public … command_list_query (…);
Public … get_attribute_property (…) ;Public … write_attribute (…);
DeviceProxyWEBImpl
Public … state(…) { }Public … command_list_query (…) { }
Public … get_attribute_property (…) { }Public … write_attribute (…) { }
DeviceProxyDefaultImpl
Public … state(…) { }Public … command_list_query (…) { }
Public … get_attribute_property (…) { }Public … write_attribute (…) { }
TangORBCommon
TangORBCommon
TangORBWebTangORB
10September 2007 – Tango Meeting –
D. Baraba-Rossa, M. Ounsy
Components serialization
A class could be serializable only if it implements the « java.io.serializable » interface.
For non-serializable objects :use of a « remote reference » system.
11September 2007 – Tango Meeting –
D. Baraba-Rossa, M. Ounsy
The « remote reference » system
The object is store in the http session of the Web Server with a single id.
Only the id is transmitted to the client. The client transfers the id to the server with every subsequent request.
12453
MAP
ID Objet
12453 DeviceData
Serveur Client
12September 2007 – Tango Meeting –
D. Baraba-Rossa, M. Ounsy
Serveur Internet
Communication protocol
Application cliente
ServletWebServerClient
WebRequest
arguments : Object[]
WebResponse
response : Object[]
Request
Response
13September 2007 – Tango Meeting –
D. Baraba-Rossa, M. Ounsy
Tango Web Server
Tasks :
Process client requests (Tango device access or database access).
Provide Java Web Start deployment descriptors
Tango Web Server delivery as a War (Web Application Archive) file. This file is deployed on a Java application Server (JBoss).
14September 2007 – Tango Meeting –
D. Baraba-Rossa, M. Ounsy
Request processing
ProcessAction
Class nameMethod name
Object idMethod name
1- Get the remote referents
process(String objectID…)
1- Create Object
process(String strClass…)
2 – Method call
processMethod(..)
TangORB
5 – Send the results
3 –TangORB process
4 – Store non serializable objects
SerializeObject.serializeObject()
ActionServlet
15September 2007 – Tango Meeting –
D. Baraba-Rossa, M. Ounsy
War file content
html : html files used by applicationjsp : Java Web Start descriptors (jnlp)img : icons, …lib : downloadable client JAR files.WEB-INF
classes : classes and applications properties fileslib : Server JAR filesweb.xml : Tango Web Server configuration file
16September 2007 – Tango Meeting –
D. Baraba-Rossa, M. Ounsy
Java Web Start
Use a « jnlp » file to download all resources needed (Jar files, configuration files …).
On each execution Java WS download the last version of the application.
All applications launched with Java WS are executed in a Sandbox much like Applets.
For a total access to the client workstation, the application must be signed.
17September 2007 – Tango Meeting –
D. Baraba-Rossa, M. Ounsy
An example of TANGO WEB deployment
Tango
Base de données
ServeurJBOSS 2 Serveur
Apache
DeviceTree
Jive
WEB Browser
Port 8080 ou 8443
Port 80 ou 443
Port 80 ou 443
Port 80 ou 443
FireWall FireWall
MachineStatusPort 80 ou 443
Annuaire LDAP
ServeurJBOSS 1
???
FireWall