murthy

34
Presentation & Project Demonstration CSE 622 – Computer Systems Theory Spring 2006 Under the guidance of Dr. Bina Ramamurthy Professor, Computer Science & Engineering Dept. SUNY Buffalo

Upload: zubin67

Post on 18-Nov-2014

291 views

Category:

Documents


4 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Murthy

Presentation & Project Demonstration

CSE 622 – Computer Systems Theory

Spring 2006

Under the guidance of Dr. Bina RamamurthyProfessor, Computer Science & Engineering Dept.

SUNY Buffalo

Page 2: Murthy

Presentation by

Narasimha Murthy H.NMS StudentComputer Science &

EngineeringSUNY Buffalo.

Page 3: Murthy

Area of Study

Service Oriented Architecture An Emphasis on:

- Legacy systems - Platform Interoperability- Web Services as the carrier- Architecture Design- Identification & Granularity of services

Page 4: Murthy

Motivation Work Experience

Redundancy in Enterprise Applications. Difficulty in Disparate application integration. Code Reuse restricted to ‘Copy-Paste’ or

Proprietary components ‘DLL Hell’. Services/ business logic buried under

complex procedures, SQL statements. Failures in interdepartmental agreements

(Our database is Highly-secured! Ex. Seibel and CPC Integration)

Page 5: Murthy

My Project

SO CLOSEService Oriented Container Loading

SystEm

An extension to CoLoSy, developed by CCE Software India.

Page 6: Murthy

What is a Container Loading System (CoLoSy)?

A 3 Dimensional space optimizer VB6 based tool designed to optimize and speed up the loading of goods into rectangular cuboids. The product is based on a well-designed and tested 3D space-optimizing algorithm. CoLoSy optimizes spaces depending on the volume and weight of the goods and on last-in-first-out methods.

Page 7: Murthy

Why SO CLOSE ? Currently, a Stand-alone product. Hasn’t tapped the huge demand for Space

Optimization in Transportation & Shipping industries.

Has the Potential to be an important part of an ERP system.

Legacy (10-Years old). Any extensibility requires new architecture.

A similar product ‘Truck Loading System’ can benefit from its SOA architecture.

Page 8: Murthy

Existing Architecture

- A monolithic, Stand-Alone, Procedural, 2-Tier application.

Visual Basic Application

(Executable)

CLSMS Access Database

GUI Algorithm

Graphics

Page 9: Murthy

SOA Architecture Stack

Legacy Component (VB6 DLL)

Database

Data Access Layer – VB.Net

ADO.Net

BL/ Integration Layer – C#.Net

Web Service Remoting

WSDL

Proxy Objects

Web Service Clients

.Net Clients

Page 10: Murthy

SOA Architecture N-Tier, Extensible, Heterogeneous SOA Architecture

Page 11: Murthy

SOA Architecture (Contd.)

Legacy Component Created by extracting only the application logic code

from the 2-tier legacy application. Little/ No modification done to the application logic code

it-self. Procedural, Contains mostly application Logic. No/ very minimal GUI Related code. Shouldn’t contain any Message / dialogue boxes (No

User interaction) Introduce a Manager class to communicate with the BL/

Integration Layer. Contains methods to be invoked from this layer.

Page 12: Murthy

SOA Architecture (Contd.)

BL/Integration Layer Object-Oriented, Model Driven. Provides a wrapper functionality to the legacy

component through COM Interop. Forms the crux of the application logic along

with the legacy layer. Provides Strong typing through XSD Schema,

typed datasets (new in .Net). Additional architectures (Web services,

Remoting) can be built on top of this layer.

Page 13: Murthy

Class Diagram – BL Layer

Page 14: Murthy

SOA Architecture (Contd.)

Data Access Layer Contains utility functions to deal with the

database objects (Make Connection, Create table, Get Dataset etc.).

All database related operations are performed only through this layer.

When the underlying database is changed, makes a very less impact on the code in other layers.

Helps debug and fine-tune database connectivity for any problems or performance.

Page 15: Murthy

SOA Architecture (Contd.)

Web Services Layer Provides platform independent access to the application

logic as ‘Services’. Uses XML as the data & message carrier. Uses XSLT (Extensible Style Language Transformations)

to create new XML, HTML documents based on the existing XML documents.

Interacts with other Web Services to provide messaging, additional functionality.

Page 16: Murthy

SOA Architecture (Contd.)

Remoting/ DCOM Layer A Future enhancement to this project. A Microsoft implementation to be used Only with .Net

Clients. Uses Binary data & message transfer as opposed to

Web Services XML. Performance is better than Web Services, as it meant to

be used with the .Net Clients Only. Employs TCP/IP connection instead of HTTP.

Page 17: Murthy

Design Approach Study the existing Legacy Application. Identify and Model the Services using

Use Case Diagram. Determine the Scope & list Features. Design the Deployment model. Evaluate the existing database design. Design the BL/ Integration Layer. Design the Data Access Layer. Determine the various client platforms

the Services will be utilized.

Page 18: Murthy

Design Approach (contd.) Evaluate the need for Various other

technologies such as .Net Remoting, RMI, COM/DCOM based on the client platforms identified.

Design and implement additional features and functionality.

Test the implemented Services in incremental steps.

Page 19: Murthy

Design Approach (contd.)

Study the existing Legacy Application. Evaluate your (organization) knowledge on the Legacy

application. Decide whether you can treat this as a Black box or a White box (In this project, it was a ‘Gray Box’!)

Refactor the code to separate it from the GUI tier. Identify the methods (group) that can be exposed as a

service. Create an interface to provide a contract to the BL Integration layer containing all these methods.

Test these methods through a simple client (same technology as the legacy application). In this project, it is a VB6 application.

Page 20: Murthy

Design Approach (contd.) Identify and Model the Services using

Use Case Diagram. Has Major impact on the entire system design. Determine the granularity of services (Every method in OO

Application is NOT a Service!). Remember, a Service is referred to a visible, mostly result-

oriented action. Ex. ValidateCreditCard, CreateConsignment, CreateInvoice etc

are Services. Ex. CloseScreen, ConvertIntToString are unlikely to be called

as Services. Create a Use Case Diagram to depict services.

Page 21: Murthy

Design Approach (contd.)

Determine the Scope & list Features.

Extremely important to scope the project. Drives the requirements of various technologies.

Ex. If your Service clients are always Non-Microsoft platform, XML Web Services is your choice. Otherwise, you might even think of ‘Remoting’ technology.

List all the features that you ever want to implement in your application. Even if you don’t implement it in your early phases, it helps in future implementations.

Page 22: Murthy

Design Approach (contd.)

Design the Deployment model. Helps in determining the deployment technology

specific features. Ex. IIS 6.0 Works great for Microsoft based Web

Services, where as Apache could be better solution for a Java based counterpart.

Page 23: Murthy

Design Approach (contd.) Evaluate the existing database design.

Databases in some Legacy applications mayn’t be multi-user compliant. Need to refactor the database for an SOA architecture.

Design mayn’t be good enough to support the Heavy Load transactions (Now that your application will have more users, client applications).

Consider a ‘wrapper’ database (though it degrades` the system performance) , if your legacy application operates directly on the database rather than objects.

Minimal upgrades such as adding Primary, foreign keys and providing Referential Integrity, Indexes should help increase the performance (This will be very critical with Web Service based SOA).

Page 24: Murthy

Design Approach (contd.)

Design the BL/ Integration Layer. Probably the most important layer in the design. Identify the missing methods and properties from the

legacy application and incorporate them here. In this project, ‘Create’, ‘Read’, ‘Update’, ‘Delete’ methods are provided for Container and Good entities.

Provide wrapper methods for the existing legacy application methods available through ‘Contract’ classes.

Design an OO model as if it is a new application. Chose the most recent and advanced technology such as

Java, .Net to implement this layer.

Page 25: Murthy

Design Approach (contd.)

Design the Data Access Layer. Optional, but really helpful in migrating to new database

technologies. Further abstracts the data access mechanism. Identify the various Data Access Objects you would need in

your system (Datasets, Table Objects, Connection Objects etc.)

Manage connection pooling mechanism here (Especially, if your DB Engine doesn’t provide one).

Extensible enough to provide the same level of access to various Database Formats.

Page 26: Murthy

Design & Implementation Details Web Services

CreateContainer – Creates a new container into the database based on the I/P XML String with Container Details.

CreateGood – Creates a new Cube/Cylinder into the database based on the I/P XML String with Good Details.

CreateConsignment – Creates a new consignment into the database based on the I/P XML String with consignment Details.

Optimze – Optimizes the given consignment bythe specified method (LIFO, Weight or volume) and returns an XML string with the consignment results.

GetConsignmentImages – Returns the images of the 3D graphics generated by the legacy application during the optimized loading simulation of a consignment.

GetGoodList – Returns a list of goods available in the database. GetContainerList – Returns a list of containers available in the

database.

Page 27: Murthy

Design & Implementation Details (contd.)

Web Services GetConsignmentList – Returns a list of consignments

available in the database. GetContainerInfo – Returns the details of a container in the

form of XML string. GetGoodInfo – Returns the details of a good in the form of

XML string.

Page 28: Murthy

Design & Implementation Details (contd.)

Collaboration of Services New Services are created by combining or collaborating

multiple services. This helps in achieving the desired granularity of services for a specific requirement.

In SO CLOSE, the service ‘CreateConsignment’ is a collaboration of two existing services:

CreateContainer – Creates a new container. CreateGood – Creates a new good.

When the ‘CreateConsignment’ service is invoked, the Service layer checks to see if the container and goods corresponding to the given consignment exists. If so, it only creates the consignment, otherwise, it first creates the container and the good and then creates the consignment. This mayn’t be a desired functionality in the BL/ Integ. Layer, but in Web Service layer, it is desirable.

Page 29: Murthy

Design & Implementation Details (contd.)

Use of XSLT in SOA XML Output generated by an SOA application mayn’t suit all

the client’s requirements. Data format may differ, amount of information required may vary in size, or may need to generate styled documents such as HTML etc. XSLT provides just that.

An XSLT maps one XML into another form XML or HTML. It is an XML based language to define the mapping. When an XML document is applied this XSLT, it generates a new XML or HTML document based on this definition.

Change of business vocabulary is very common in enterprise systems. What one department calls as an ‘Item’, may be called as a ‘Product’ in another department. These transformations are not just restricted to names, but even the values. Ex. A field in the original XML document may appear as ‘boolean’, but it may be required in ‘Yes’ ‘No’ format (As a ‘string’ in another XML document.

Page 30: Murthy

Design & Implementation Details (contd.)

Use of XSLT in SOA (contd.)XSLT Sample from the project

<?xml version='1.0' ?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="xml" indent="yes"/>

<xsl:template match="/"><ConsignmentResult>

<Name> <xsl:value-of select="ConsignmentResult/Name"/> </Name>

</ConsignmentResult></xsl:template>

<xsl:template match="ConsignmentResult"/>

Page 31: Murthy

Future Enhancements SOAP Security & authentication. Data Caching (useful, especially while generating the 3D

images of the loading process). Remoting for .Net Clients Directory service using UDDI. SLU (Service Level Usage) – New concept of mine (At

least, new to me), which provides detailed information about the usage of services by various service consumers. This is particularly useful for ‘Billing Purposes’

and can be used in general in any SOA solution. Client activated ‘Goods Loading’ 3D graphics

implementation.

Page 32: Murthy

Problems Faced COM Interoperability is difficult to achieve. Incompatibility in Standardization

Java supports SOAP with attachments; SAAJ (SOAP API Attachments Java), but .Net doesn’t! Use DIME or MTOM.

SOAP Message encoding is NOT identical between Microsoft and Java technologies.

Time Spent in resolving some issues in Legacy Application (It’s 10+ years old!).

Developed using the very new Visual Studio 2005 and NetBeans 5.0 (Learning curve!).

XML to XML, XML to HTML using XSLT is good but, a bit time consuming for implementing.

Page 33: Murthy

Problems Faced (contd.) Implementing Goods Loading 3D graphics as a

Service was (still is !) a Big challenge. Sending Binary data as a 2-dimensional byte

array results in incompatible data types between .Net and Java.

The legacy Database is NOT very well designed. Had to overcome few problems posed by .Net XSD.

Page 34: Murthy

Acknowledgements I can’t emphasize enough the help and guidance I

obtained from Dr. Bina. I never felt as a distant student, as I could reach to her through phone/e-mail whenever I had a question.

I Thank You Very Much for all that. CCE India, my company, gave me all the support and

opportunity to use their product for my research. I thank Mr. Ashis Dutta, Director and Syed Javed Akthar, HR Manager for all their support.

Last, but not the least, my wife Pratima and daughter Neha for their enduring support and understanding.