Presentation is loading. Please wait.

Presentation is loading. Please wait.

IRMIS3 Status Gabriele Carcassi Oct 15 2008. Web tools architecture IRMIS DB (MySQL) Data service Java applets AJAX components Scripts and CLI (perl,

Similar presentations


Presentation on theme: "IRMIS3 Status Gabriele Carcassi Oct 15 2008. Web tools architecture IRMIS DB (MySQL) Data service Java applets AJAX components Scripts and CLI (perl,"— Presentation transcript:

1 IRMIS3 Status Gabriele Carcassi Oct 15 2008

2 Web tools architecture IRMIS DB (MySQL) Data service Java applets AJAX components Scripts and CLI (perl, Python, …) Browser (Firefox, IE, …) XML protocol Web server (Glassfish)

3 Data service The architecture is your typical Service Oriented Architecture (SOA) and service is a Representational State Transfer Web Service (REST-WS) Allows to capture the business logic (all the rules that separate valid transactions from invalid transactions) in one place – Clients can be “stupid” Exposes the data in a well defined xml format – Allows the internals of the database to change – Allows to use any available xml tools

4 XML protocol (REST style WS) IRMIS software stack Few database utilities: backup, consistency check, etc… Client Server Integration with external tools (i.e. physcs) 3 rd party Perl/Pyton scripts 3 rd party Java apps Jython scripts Web applications JavaScript bridge Applets and Widgets Java Client API Data Service layer Database layer

5 How you can interact with IRMIS Just use the GUI Run scripts that we develop Read the XML directly Write phyton/perl scripts that consume the XML Write Jython script using the API

6 XML example: an Oscilloscope...

7 Importing components from Excel (using Jython) from gov.bnl.irmis.api import * from java.net import URI from java.io import File from jxl import * workbook = Workbook.getWorkbook(File(“components.xls")) sheet = workbook.getSheet(0) nRows = sheet.getRows() nColumns = sheet.getColumns() irmisDB = IrmisDB.getInstance(); irmisDB.setURI(URI("http://cs-build.nsls2.bnl.gov:8080/IRMISDataService/data")) transaction = irmisDB.createTransaction(); for row in range(1, nRows): componentTypeName = sheet.getCell(0, row).getContents(); componentType = ComponentTypes.getByName(componentTypeName); serialNumber = sheet.getCell(1, row).getContents(); Components.createComponent(transaction, componentType, serialNumber) transaction.save(); print "Operation successful"

8 Importing from Excel (Jython) from gov.bnl.irmis.api import * from java.net import URI from java.io import File from jxl import * workbook = Workbook.getWorkbook(File(“components.xls")) sheet = workbook.getSheet(0) nRows = sheet.getRows() nColumns = sheet.getColumns() irmisDB = IrmisDB.getInstance(); irmisDB.setURI(URI("http://cs-build.nsls2.bnl.gov:8080/IRMISDataService/data")) transaction = irmisDB.createTransaction(); for row in range(1, nRows): componentTypeName = sheet.getCell(0, row).getContents(); componentType = ComponentTypes.getByName(componentTypeName); serialNumber = sheet.getCell(1, row).getContents(); Components.createComponent(transaction, componentType, serialNumber) transaction.save(); print "Operation successful" Load excel file

9 Importing from Excel (Jython) from gov.bnl.irmis.api import * from java.net import URI from java.io import File from jxl import * workbook = Workbook.getWorkbook(File(“components.xls")) sheet = workbook.getSheet(0) nRows = sheet.getRows() nColumns = sheet.getColumns() irmisDB = IrmisDB.getInstance(); irmisDB.setURI(URI("http://cs-build.nsls2.bnl.gov:8080/IRMISDataService/data")) transaction = irmisDB.createTransaction(); for row in range(1, nRows): componentTypeName = sheet.getCell(0, row).getContents(); componentType = ComponentTypes.getByName(componentTypeName); serialNumber = sheet.getCell(1, row).getContents(); Components.createComponent(transaction, componentType, serialNumber) transaction.save(); print "Operation successful" Connect to the service

10 Importing from Excel (Jython) from gov.bnl.irmis.api import * from java.net import URI from java.io import File from jxl import * workbook = Workbook.getWorkbook(File(“components.xls")) sheet = workbook.getSheet(0) nRows = sheet.getRows() nColumns = sheet.getColumns() irmisDB = IrmisDB.getInstance(); irmisDB.setURI(URI("http://cs-build.nsls2.bnl.gov:8080/IRMISDataService/data")) transaction = irmisDB.createTransaction(); for row in range(1, nRows): componentTypeName = sheet.getCell(0, row).getContents(); componentType = ComponentTypes.getByName(componentTypeName); serialNumber = sheet.getCell(1, row).getContents(); Components.createComponent(transaction, componentType, serialNumber) transaction.save(); print "Operation successful" Loop over the rows

11 Importing from Excel (Jython) from gov.bnl.irmis.api import * from java.net import URI from java.io import File from jxl import * workbook = Workbook.getWorkbook(File(“components.xls")) sheet = workbook.getSheet(0) nRows = sheet.getRows() nColumns = sheet.getColumns() irmisDB = IrmisDB.getInstance(); irmisDB.setURI(URI("http://cs-build.nsls2.bnl.gov:8080/IRMISDataService/data")) transaction = irmisDB.createTransaction(); for row in range(1, nRows): componentTypeName = sheet.getCell(0, row).getContents(); componentType = ComponentTypes.getByName(componentTypeName); serialNumber = sheet.getCell(1, row).getContents(); Components.createComponent(transaction, componentType, serialNumber) transaction.save(); print "Operation successful" Get data out Create components

12 Application demos And now, let’s go to our development instance, and check out the web applications!

13 Component type editor Allows to browse the component types present in the database and to modify them or add new ones

14 Component browser Allows to browse the installed components, see their position in the hierarchies and how they are cabled.

15 Component editor Allows to modify the hierarchy and install/remove components


Download ppt "IRMIS3 Status Gabriele Carcassi Oct 15 2008. Web tools architecture IRMIS DB (MySQL) Data service Java applets AJAX components Scripts and CLI (perl,"

Similar presentations


Ads by Google