Download presentation
Presentation is loading. Please wait.
1
Integration case study Week 8 – Lecture 1
2
Enrolment request (Workstation) Application server Database server Database New University Student Record System (all servers are on separate hosts) IT School Marking system Application
3
Some background The SRS –Is written in Java, –The DBMS is Oracle –There is only one application server host and one database server host –It is not a WEB based system The IT School marking system –Is written in C –The DBMS is Sybase
4
A student enrolling in a new subject will effect the following steps 1.The student will enter his/her SID and the unit code he or she wants to enrol in. 2.The Enrolment request process, will send a message to the Enrolment process 3.The Enrolment process will access the Database to ensure –The SID is valid –The student is permitted to take this course 4.The Enrolment process will now –Instruct the Database server to update the database –Confirm the change to the Enrolment request process –Advise the IT School marking system of the addition.
5
How does the Enrolment request process, send a message to the Enrolment process? By RMI (Remote Method Invocation) Note that J2EE offers other alternative approaches. It constructs a message along the following lines enrolment.add (2000123456,ISYS2007) Note this is written as if the process was local. The message is passed to a stub process on the same client host. (This stub was created by the RMI compile process.) The stub collect the arguments, and accesses the registry to obtain the address of the server containing the remote process and the port number of that process The stub process then sends the message on to the skeleton process on the server via the transport/network etc layers of the network architecture. That skeleton then passes the message to the server process. Because both client and server processes are Java, any incompatibility of data types due to the host hardware is handled by the Java Virtual Machines on both hosts.
6
How does the Enrolment process find and access the database? Via JDBC and SQL We know that the primary language for accessing a RDBMS is via SQL However we also need to –Establish a connection with the actual instance of the database we want to access. –Provide the interface between our process on the application server host and the DBMS process on the Database server host –This is carried out by the JDBC driver but initiated by the Java code in the Enrolment process – we can hard code the URL of the database, but that is inflexible We can now create and execute SQL within our Java code and pass it to JDBC JDBC in turn uses the network layers to pass messages containing the SQL to the DBMS and return the result sets.
7
Enrolment request (Workstation) Enrolment Process SQL processor Database RMI Stub Network stack JMI Skeleton Network stack JDBC driver Network stack JDBC interface Registry Contains the URL for the process we need to invoke In this example the process holds the URL of the instance of the database to be accessed
8
How does the SRS pass new enrolments to the IT School marking system? We have a number of options, here are some –Write a record to an interface file which can then be picked up from a predetermined directory and processed by the marking system in batch mode –The SRS enrolment process could update the Marking system database directly using ODBC –The SRS process could invoke a process in the Marking system to get it to update the Marking system database. –The SRS could publish changes of any type to its database and allow other authorised systems to subscribe i.e. each system could select the changes it was interested in and process them against its database
9
Write a record to an interface file which can then be picked up from a predetermined directory and processed by the marking system in batch mode. Easy to implement No transactional integrity - asynchronous The Marking system has to make any data transformations e.g. to take off the first two digits of the SID Any change in the interface requires both systems to change programs Enrolment process Database server Database Marking system Interface file 2001123456,BIT,Add,ISYS2007 2000654321,BSc,Delete,INFO1003 1999876543,BCST,Add,SOFT1000 etc
10
The SRS enrolment process could update the Marking system database directly using ODBC, or the SRS process could invoke a process in the Marking system to get it to update the Marking system database. Transaction integrity - synchronous High degree of integration – maybe central IT group does not want that responsibility. Places restrictions on what the IT school does with its marking system. Data transformations more difficult. Enrolment process Database server Database (Oracle) Database (Sybase) Marking system Database server JDBC ODBC
11
The SRS could publish changes of any type to its database and allow other authorised systems to subscribe i.e. each system could select the changes it was interested in and process them against its database Standard IDL (XML) – Published structure - Schema Asynchronous Only required fields need be selected by the Marking system - XSLT Changes can be made to published interface without changes having to be made to Marking system (as long as elements the marking system needs are not removed) Connectors carry out transformations. These include procedural code as well as executing XSLT Enrolment process Database server Database (Oracle) Database (Sybase) Marking system 2000123456 BIT add ISYS2007 Connector
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.