Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Integrated Meta Database (IMDB) Architecture November 5th, 2003 Statistics Canada 1 Design Goals • Web deployable (Project/Architectural) • Acceptable Performance (Project/Architectural) • Thin-client (Architectural) – Alleviates burden on client machine – Faster run and load time, ease of deployment • n-tier (Architectural) – Development of corporate components • Services/products available from multiple vendors (Architectural) • Bilingual (Architectural) 2 Implementation • Two different architectures: 1. 1999-2002: Phase 2 - Input of meta information for statistical business processes 2. 2002- 2003: Phase 3 - Input of meta data for data elements • Phase 2 implementation frozen because of: 1. Discontinued support for software by vendor 2. Size of system has exceeded the capabilities the selected web deployment technology. 3 Phase 2 2-Tier (plump client) Model Technologies Presentation & Application (Business Rules) Middleware Application (Business Rules + Data Access Logic) & Data Layer Web Browser Java Applet JDBC Tools GUI Internet Explorer Sun Java Plug-In V1.1.3 Swing 1.0.3 Oracle JDBC Driver Business Logic Database • Oracle 8i RDBMS with Stored Procs • Oracle (PL/SQL) 4 Phase 2 Bilingualism Menu items Directive Tabs English and French text fields Labels Coded fields Buttons 5 Phase 2 Bilingualism Text for elements of the interface English Resource Bundle Key Value menu_File tab_ID tab_Des … File Identification Description ... 6 Phase 2 Input Screens Text strings related to data components Directives Resource Bundle IMDB database Key Value SurveySDDS … Statistical Data Doc… ... Labels Resource Bundle Key Value SurveySDDS … SDDS ... 7 Phase 2 Input Screen Administered Item 8 Phase 2 - Identification Tab 9 Phase 2 - Organization Tab 10 Phase 2 – DescriptionTab Statistical Activity and Survey 11 Factory Pattern applied to Description Instrument Request Survey Request Description Factory 12 Phase 2 Model View Controller Pattern • Model – maintains the data • View – displays the data • Controller – event handlers for the Model and View • Phase 2 combines the View and Controller 13 Phase 2 Mapping of Relational Model to OO Visual Age DATA ACCESS BUILDER IMDB Relational Database JDBC Class 14 Phase 2 – 2001 Achievement of design goals • Web deployable? – via Applet however plug-in technology was not stable and removed from deployment. • Acceptable Performance? – Applet very slow for load time. Performance is improved by deployment as an application on the client. Support provided for both Applet and Application versions. • Thin-client? Plump client • n-tier? 2-tier • Services/products available from multiple vendors? No vendor support for Visual Age 3.0 DAB. Code is not compliant with JDK 1.3 • Bilingual ? English and French 15 Phase 2 Data Migration • Microsoft Access form to collect business meta data from various sources. • Load from existing meta data systems. • PL/SQL procedure for conversion and load into the phase 2 database 16 Phase 3 Considerations • Design Goals • Conformance with standards. • Minimize use of auto generation tools/wizards, therefore reducing risk of vendor lock-in. 17 Phase 3 3-Tier (thin client) Model Technologies Presentation Tier Web Browser Standards HTTP, HTML JSP 2.0 Servlet 2.4 Internet Explorer 6.0 Jakarta Struts 1.2.8 Jakarta Tomcat 5.5.15 XML 1.0 XSLT 1.0 Application Tier Web Server Data Tier Tools RDBMS HTTP Apache (?) JDBC 2.0 Oracle JDBC Driver SQL Oracle 9i 18 Phase3 MVC - Model Model Layers Business Layer • The Model role is realized by two software layers from the Application tier, plus the Data tier. • Layering reflects division of responsibilities. Persistence Layer Database • Each layer knows nothing about the layers above, and can delegate work only to the layer directly below. • This reduces the scope of change: for example, if a database table definition is altered, the Persistence layer can usually absorb the change, leaving the Business classes totally unaffected. 19 Phase3 MVC - Model The Database Business Layer • Responsible for storage and retrieval of data according to the relational model. • Enforces referential integrity. Persistence Layer • Provides vendor-specific tools for administration and data access. • Provides driver implementations for remote access through JDBC, ODBC, etc… Database • Some non-standard aspects are unavoidable, such as vendor-specific SQL dialects for data definition. 20 Phase3 MVC - Model The Persistence Layer Business Layer • Contains low-level Java classes that model the database tables closely. Persistence Layer • Knows how to store and retrieve data directly from the database using JDBC methods. •Also contains higher-level Java classes that provide data access services to any kind of Business layer, through a public API. Database • Protects the rest of the system from evolutionary changes in the type, vendor or release version of the database. 21 Phase3 MVC - Model The Business Layer Business Layer • Java classes in this layer model the objects and processes in the user’s world. In our case, these objects are instances of the metadata items defined by the ISO 11179 specification. Persistence Layer • Delegates the actual saving and retrieving of these objects to the Persistence layer. • Defines and enforces business rules. Database • Contains a public API that allows any Controller-level class to create and manipulate metadata objects. 22 Phase 3 MVC - Controller 1. User Action Struts Controller Classes MetaWeb 2. Process Request 4. System Response JSP Business Layer (Model) 3. Select View 23 Phase 3 MVC - Controller Struts Controller Classes • A Struts servlet intercepts requests from the user’s browser, and dispatches each request (by URL) to an Action class for processing. • Depending on the outcome of processing, the most suitable view is selected to display the result. • View selection can be controlled in an XML configuration file as well as in code. • The Struts framework enables a clean and flexible separation of MVC responsibilities in a web application. 24 Phase 3 MVC - View • The View role is realized by JavaServer Pages MetaWeb HTML Servlet JSP in the Application tier, and by the browser in the Presentation tier. • JavaServer Pages are similar to HTML pages, but combine HTML markup with special JSP tags that enable the insertion of dynamic content. • Struts provides a rich and powerful assortment of tags that integrate well with the rest of the framework. • Every JSP is transformed into a servlet when first requested, and the generated servlet returns the view as pure HTML to the browser. 25 Phase 3 Bilingualism • The user interface language can be changed by the user at any time, to any language for which a resource bundle has been created. (So far, the only demand is for English and French…) • Data in any two languages can be simultaneously displayed and edited. • Data in multiple languages can be stored in the database, and new languages can be supported without changes to the data model. • Java and the Struts framework both provide rich support for localized content, including variations by country, and formatting of dates, times, and currencies. 26 Phase 3 – 2003 Achievement of design goals • Web deployable? – Application resides entirely on the server and is available to any browser. • Acceptable Performance? – Servlets are designed for high efficiency and scalability. Database I/O can be optimized in the Persistence layer. • Thin-client? – Ultra-thin (no client-side code required). • n-tier? – 3-tier • Services/products available from multiple vendors? – Open solution using open software. • Bilingual? – Multi-lingual. 27