250 likes | 417 Views
Adding Mathematica Software to an ORACLE database Roberto Terenzi CNR-IFSI & INFN CERN. EXPLORER Experiment at Cern. EXPLORER Building 171. Adding Mathematica Software …. Gravitational waves events: Amplitude Time Confident time interval (IGEC2000) SNR ……. Detectors data:
E N D
Adding Mathematica Software to an ORACLE databaseRoberto Terenzi CNR-IFSI & INFN CERN
EXPLORER Experiment at Cern EXPLORER Building 171
Gravitational waves events: Amplitude Time Confident time interval (IGEC2000) SNR …….. Detectors data: on/off periods sensitivity ……. IGEC data at IGEC sites: IGEC= International Gravitational Event Collaboration
Project Goals • Both text and graphic data presentation. • No special software requirements on Client-side (WEB Browsers only). • Flexible architecture (distributed systems & resources ).
Hardware System Architecture ORACLE Server Middle-Tier Client(s) CERN 0racle Server (cern Geneva) SUN Ultra 10 (CNR-Rome) PC's w/s's etc. (WORLD) Internet internet = Internet connection
Hardware Architecture • 3-Tier architecture benefits: • Client • any computer running a WEB Browser ( Netscape, Internet Explorer). • Middle-Tier • To shadow database implementation details to client (tables structure etc.): Client sees physics quantities, not ORACLE tables, columns etc. • To do not overload Oracle server with application software. • Flexible, but robust architecture (distributed systems & resources ).
Software System Architecture ORACLE Server Middle-Tier Client Communication, Oracle Interface, Data elaboration & Data formatting WEB Browser 0racle HTML FORMS & PAGES SQL QUERY & DATA = Internet connection
Mathematica PACKAGES Middle-Tier Software Architecture HTML FORMS & PAGES JAVA Servlet classes Custom Java Classes Java JDBC Methods Override post/get/service 0racle WEB Browser Servletrunner Java JLINK SQL QUERY & DATA Mathematica = Internet connection
Application 1:Simple data Request(1) HTML FORMS & PAGES JAVA Servlet classes Custom Java Classes Java JDBC Methods Override post/get/service 0racle WEB Browser Servletrunner SQL QUERY & DATA = Internet connection
Application 1:Simple data Request(2) • Client • Send HTML FORM for requesting data. • Display HTML page sent back by Middle-Tier. • Middle-Tier • Translate Html Form into sql queries . • Send queries to Oracle. • Get data from Oracle and format them. • Send data as an Html page to client.
Why Mathematica? (1) • Client Requirements: • Data Presentation (for example graphics) • Data elaboration (for example data filtering) • Database administrator requirements: • Do not overload Oracle server with application programs.
Why Mathematica? (2) • Client Requirements: • graphical presentation, • data elaboration and data filtering are “easy” using Mathematica. • Database administrator requirements: • Mathematica can run outside Oracle server (Middle-Tier). • Program Developer: • Application, i.e. Mathematica Package(s),can be developed by client too.
Application 2:Data elaboration(1) CLIENT MIDDLE-TIER SERVER HTML FORM SQL QUERIES HTML Middle-Tier Software 0racle Page(GIF) DATA Graphics DATA (GIF) DATA Mathematica
Application 2:Data elaboration(2) • Client: • send HTML FORM to request data. • Middle-Tier • translate Html Form into sql queries . • Send queries to Oracle. • get data from Oracle and elaborate them via Mathematica program. • send computed data as an Html page to client (text orGIF images as needed).
Mathematica PACKAGES Application 2:Data elaboration (3) HTML FORMS & PAGES JAVA Servlet classes Custom Java Classes Java JDBC Methods Override post/get/service 0racle WEB Browser Servletrunner Java JLINK SQL QUERY & DATA Mathematica = Internet connection
Mathematica Interface Software //open link to Mathematica: String [ ] args= {“-linkmode”,”launch”,math -mathlink”}; KerneLink ml= MathLinkFactory.createKernelLink(args); ……. // Now load Mathematica Package(s): …….. ml.evaluate(”<<Graphics`Color`”); /* Standard packages */ ……. ml.evaluate (”<<MyPackage`MyModule`”); /*Custom Packages */ // Now send and get back data byte[ ] imageEX= ml.evaluate(mathCommand,width); • JLINK • KerneLink • ml.evaluate(String command) • …...
Application 3:Data warehousing (1) CLIENT (“Power” User) MIDDLE-TIER SERVER SQL QUERIES HTML FORM HTML Middle-Tier Software DATA Page 0racle INSERT DATA F(DATA) DATA Mathematica
Application 3:Data warehousing (2) • Client (Administrator) send HTML FORM for data elaboration • Middle-Tier • translate Html Form into sql queries . • Send queries to Oracle. • get data from Oracle and elaborate them via Mathematica program. • INSERT into Oracle tables computed data .
M-T 1 M-T 2 M-T n ORACLE Server CERN 0racle Server (cern Geneva) Message dispatcher Scalability Client 1 Client 2 …….. Client_m PC's w/s's etc. (WORLD) • ..... LAN INTERNET
Mathematica PACKAGES Mathematica on client side (1) _____________________ CLIENT ___________________________________ | | HTML FORMS & PAGES JAVA Servlet classes Custom Java Classes Java JDBC Methods Override post/get/service 0racle WEB Browser Servletrunner Java JMLINK SQL QUERY & DATA Mathematica = Internet connection
Custom Java Classes GUI Java JLINK Mathematica PACKAGES Mathematica Mathematica on client side (2) Servletrunner JAVA Servlet classes Methods Override post/get/service HTML FORMS & Text 0racle Custom Java Classes SQL QUERY & DATA Java JDBC
CLIENT PACKAGES Mathematica PACKAGES Mathematica on client side (3) HTML FORMS & PAGES JAVA Servlet classes Custom Java Classes Java JDBC Methods Override post/get/service 0racle WEB Browser Servletrunner Java JLINK SQL QUERY & DATA Mathematica
Custom Java Classes Java JLINK Mathematica Mathematica on client side (4) Servletrunner JAVA Servlet classes Notebook Methods Override post/get/service 0racle Custom Java Classes HTML FORMS & TEXT SQL QUERY & DATA Mathematica “calls” Java Java JDBC