From mainframe applications Terminal Access Mainframe Data and

  • Slides: 36
Download presentation
From mainframe applications. . . Terminal Access Mainframe Data and Applications

From mainframe applications. . . Terminal Access Mainframe Data and Applications

. . . to client/server applications. . . Windows Client Mac Client Unix Client

. . . to client/server applications. . . Windows Client Mac Client Unix Client Fat Client Corporate Data Oracle, DB 2, MS SQL, Informix, Sybase, etc. Back-end Data

…to multi-tier distributed applications Windows Client Browser Client Application Server: Middle-Tier Services Business Processes

…to multi-tier distributed applications Windows Client Browser Client Application Server: Middle-Tier Services Business Processes Java Client Mobile Client Thin Client Corporate Data Oracle, DB 2, MS SQL, Informix, Sybase Middle Tier (NT/Unix/AS 400) Back-end Data

Enterprise computing s Enterprises have a variety of computing platforms n Unix, 95/98/NT, MVS,

Enterprise computing s Enterprises have a variety of computing platforms n Unix, 95/98/NT, MVS, AS/400, VMS, Macintosh, NC’s, Vx. Works, etc. s Enterprises write applications in a variety of programming languages n C, C++, Java, COBOL, Basic, Perl, Smalltalk, etc. s Enterprises need an open architecture to support the heterogeneous environment

Object-oriented computing for the enterprise s Enterprise applications are being written in terms of

Object-oriented computing for the enterprise s Enterprise applications are being written in terms of objects - reusable components that can be accessed over the enterprise network s CORBA supplies the architecture for distributed applications based on open standards

Distributed application advantages s Scalability n Server replication n Thin, heterogeneous clients s Re-usability

Distributed application advantages s Scalability n Server replication n Thin, heterogeneous clients s Re-usability s Partitioned functionality = easy updating of either clients or servers

Competing technologies for distributed objects s Open standards based solutions n Java, CORBA, EJB,

Competing technologies for distributed objects s Open standards based solutions n Java, CORBA, EJB, RMI, IIOP, JTS/OTS, JNDI, JDBC, , Servlets, JSP, Java Security s The All-Microsoft solution n COM, COM+, Active. X, Visual C++, MTS, ASP, IIS, etc. s Other proprietary solutions n Message oriented middleware (MOMs MQSeries, etc. )

The Object Management Group (OMG) s Industry Consortium with over 855 member companies formed

The Object Management Group (OMG) s Industry Consortium with over 855 member companies formed to develop a distributed object standard s Accepted proposals for the various specifications put forth to define: n Communications infrastructure n Standard interface between objects n Object services s Developed the spec for the Common Object Request Broker Architecture (CORBA)

CORBA design goals/characteristics: s No need to pre-determine: s n The programming language n

CORBA design goals/characteristics: s No need to pre-determine: s n The programming language n The hardware platform n The operating system n The specific object request broker n The degree of object distribution Open Architecture: n Language-neutral Interface Definition Language (IDL) n Language, platform and location transparent s Objects could act as clients, servers or both s The Object Request Broker (ORB) mediates the interaction between client and object

IIOP - Internet Inter-ORB Protocol s Specified by the OMG as the standard communication

IIOP - Internet Inter-ORB Protocol s Specified by the OMG as the standard communication protocol between ORBs s Resides on top of TCP/IP s Developers don’t need to “learn” IIOP; the ORB handles this for them s Specifies common format for: n object references, known as the Interoperable Object Reference (IOR) n Messages exchanged between a client and the object

Key definitions: ORB and BOA s s s Object Request Broker (ORB) n Transports

Key definitions: ORB and BOA s s s Object Request Broker (ORB) n Transports a client request to a remote object an returns the result. Implemented as: l a set of client and server side libraries l zero or more daemons in between, depending on ORB implementation, invocation method, etc. Object Adapter (OA), an abstract specification n Part of the server-side library - the interface between the ORB and the server process n listens for client connections and requests n maps the inbound requests to the desired target object instance Basic Object Adapter (BOA), a concrete specification n The first defined OA for use in CORBA-compliant ORBs n leaves many features unsupported, requiring proprietary extensions n superceded by the Portable Object Adapter (POA), facilitating serverside ORB-neutral code

What is an object reference? s An object reference is the distributed computing equivalent

What is an object reference? s An object reference is the distributed computing equivalent of a pointer n CORBA defines the Interoperable Object Reference (IOR) l IORs can be converted from raw reference to string form, and back l Stringified IORs can be stored and retrieved by clients and servers using other ORBs n an IOR contains a fixed object key, containing: l the object’s fully qualified interface name (repository ID) l user-defined data for the instance identifier n An IOR can also contain transient information, such as: l The host and port of its server l metadata about the server’s ORB, for potential optimizations

CORBA object characteristics s CORBA objects have identity n A CORBA server can contain

CORBA object characteristics s CORBA objects have identity n A CORBA server can contain multiple instances of multiple interfaces n An IOR uniquely identifies one object instance CORBA object references can be persistent n Some CORBA objects are transient, short-lived and used by only one client n But CORBA objects can be shared and long-lived l business rules and policies decide when to “destroy” an object l IORs can outlive client and even server process life spans CORBA objects can be relocated n The fixed object key of an object reference does not include the object’s location n CORBA objects may be relocated at admin time or runtime n ORB implementations may support the relocation transparently

CORBA server characteristics s When we say “server” we usually mean server process, not

CORBA server characteristics s When we say “server” we usually mean server process, not server machine s One or more CORBA server processes may be running on a machine s Each CORBA server process may contain one or more CORBA object instances, of one or more CORBA interfaces s A CORBA server process does not have to be “heavyweight” n e. g. , a Java applet can be a CORBA server

Interfaces vs. Implementations IDL Interface Object CORBA Objects are fully encapsulated Accessed through well-defined

Interfaces vs. Implementations IDL Interface Object CORBA Objects are fully encapsulated Accessed through well-defined interface Internals not available - users of object have no knowledge of implementation Interfaces & Implementations totally separate For one interface, multiple implementations possible One implementation may be supporting multiple interfaces

Location Transparency Process A Process B Machine X Process C Machine Y A CORBA

Location Transparency Process A Process B Machine X Process C Machine Y A CORBA Object can be local to your process, in another process on the same machine, or in another process on another machine

Stubs & Skeletons object implementation client program call language mapping operation signatures method language

Stubs & Skeletons object implementation client program call language mapping operation signatures method language mapping entry points Stub Skeleton ORB Operations Location Service Transport Layer ORB Basic Object Adapter Multithreading Stubs and Skeletons are automatically generated from IDL interfaces

Dynamic Invocation Interface client program object implementation DII* calls dynamic interface query method Skeleton

Dynamic Invocation Interface client program object implementation DII* calls dynamic interface query method Skeleton Interface Repository DII* ORB Operations ORB * Dynamic Invocation Interface Basic Object Adapter

Why IDL? s IDL reconciles diverse object models and programming languages s Imposes the

Why IDL? s IDL reconciles diverse object models and programming languages s Imposes the same object model on all supported languages s Programming language independent means of describing data types and object interfaces n purely descriptive - no procedural components n provides abstraction from implementation n allows multiple language bindings to be defined s A means for integrating and sharing objects from different object models and languages

IDL simple data types s Basic data types similar to C, C++ or Java

IDL simple data types s Basic data types similar to C, C++ or Java n long, unsigned long n short, unsigned short n float, double, long double n char, wchar (ISO Unicode) n boolean n octet (raw data without conversion) n any (self-describing variable)

IDL complex data types s string - sequence of characters - bounded or unbounded

IDL complex data types s string - sequence of characters - bounded or unbounded n string<256> msg // bounded n string msg // unbounded s wstring - sequence of Unicode characters bounded or unbounded s sequence - one dimensional array whose members are all of the same type - bounded or unbounded n sequence<float, 100> my. Seq // bounded

IDL user defined data types s Facilities for creating your own types: n typedef

IDL user defined data types s Facilities for creating your own types: n typedef n enum n const n struct n union n arrays n exception s preprocessor directives - #include #define

Operations and parameters s Return type of operations can be any IDL type s

Operations and parameters s Return type of operations can be any IDL type s each parameter has a direction (in, out, inout) and a name s similar to C/C++ function declarations

CORBA Development Process Using IDL Definition Client Implementation Object Implementation IDL Compiler Client Program

CORBA Development Process Using IDL Definition Client Implementation Object Implementation IDL Compiler Client Program Source Stub Source Skeleton Source Java or C++ Compiler Client Program Object Implementation Source

A simple example: IDL // module Money { interface Accounting { float get_outstanding_balance(); };

A simple example: IDL // module Money { interface Accounting { float get_outstanding_balance(); }; };

A Java client import org. omg. CORBA. *; public class Client { public static

A Java client import org. omg. CORBA. *; public class Client { public static void main(String args[]) { try { // Initialize the ORB. System. out. println("Initializing the ORB. . . "); ORB orb = ORB. init(args, null); // bind to an Accounting Object named "Account" System. out. println("Binding. . . "); Money. Accounting acc =Money. Accounting. Helper. bind(orb, "Account"); // Get the balance of the account. System. out. println("Making Remote Invocation. . . "); float balance = acc. get_outstanding_balance(); // Print out the balance. System. out. println("The balance is $" + balance); } catch(System. Exception e) { System. err. println("Oops! Caught: " + e); } } }

A Java server object import Money. *; import org. omg. CORBA. *; class Accounting.

A Java server object import Money. *; import org. omg. CORBA. *; class Accounting. Impl extends _Accounting. Impl. Base { public float get_outstanding_balance() { float bal = (float)14100. 00; // Implement real outstanding balance function here return bal; } public static void main(String[] args) { try { ORB orb = ORB. init(args, null); // Initialize the ORB. BOA boa = orb. BOA_init(); // Initialize the BOA. System. out. println("Instantiating an Accounting. Impl. "); Accounting. Impl impl = new Accounting. Impl("Account"); boa. obj_is_ready(impl); System. out. println("Entering event loop. "); // Wait for incoming requests boa. impl_is_ready(); } catch(System. Exception e) { System. err. println("Oops! Caught: " + e); } }

A C++ client #include <Money_c. hh> int main (int argc, char* const* argv) {

A C++ client #include <Money_c. hh> int main (int argc, char* const* argv) { try { cout << "Initializing ORB. . . " << endl; CORBA: : ORB_var orb = CORBA: : ORB_init(argc, argv); cout << "Binding. . . " << endl; Money: : Accounting_var acc = Money: : Accounting: : _bind(); cout << "Making Remote Invocation. . . " << endl; cout << "The outstanding balance is " << acc->get_outstanding_balance() << endl; } catch (CORBA: : Exception& e) { cerr << "Caught CORBA Exception: " << endl; } return 0; }

A C++ server object #include <Money_s. hh> class Accounting. Impl : public _sk_Money: :

A C++ server object #include <Money_s. hh> class Accounting. Impl : public _sk_Money: : _sk_Accounting { public: Accounting. Impl(const char* name) : _sk_Accounting(name) {} CORBA: : Float get_outstanding_balance() { // implement real outstanding balance function here return 3829. 29; } }; int main (int argc, char* const* argv) { // Initialize ORB. CORBA: : ORB_var orb = CORBA: : ORB_init(argc, argv); CORBA: : BOA_var boa = orb->BOA_init(argc, argv); cout << "Instantiating an Accounting. Impl" << endl; Accounting. Impl impl("Accounting"); boa->obj_is_ready(&impl); cout << "Entering event loop" << endl; boa->impl_is_ready(); return 0; }

CORBA services s The OMG has defined a set of Common Object Services s

CORBA services s The OMG has defined a set of Common Object Services s Frequently used components needed for building robust applications s Typically supplied by vendors s OMG defines interfaces to services to ensure interoperability

Popular CORBA services s Naming n maps logical names to to server objects n

Popular CORBA services s Naming n maps logical names to to server objects n references may be hierarchical, chained n returns object reference to requesting client s Events n asynchronous messaging n decouples suppliers and consumers of information

Popular CORBA services s Notification n More robust enhancement of event service n Quality

Popular CORBA services s Notification n More robust enhancement of event service n Quality of Service properties n Event filtering n Structured events s Transaction n Ensures correct state of transactional objects l Manages distributed commit/rollback l Implements the protocols required to guarantee the ACID (Atomicity, Consistency, Isolation, and Durability) properties of transactions

CORBA vendors s Inprise/Borland Visi. Broker: n http: //www. borland. com/visibroker/ s Iona Orbix:

CORBA vendors s Inprise/Borland Visi. Broker: n http: //www. borland. com/visibroker/ s Iona Orbix: n http: //www. iona. com s Rogue Wave Nouveau: n http: //www. roguewave. com/products/nouvea u/ s Object. Space Voyager: n http: //www. objectspace. com/products/vgr. Ove

Real-world implementations s Commercial products n Oracle 8 i n Silver. Stream Application Server

Real-world implementations s Commercial products n Oracle 8 i n Silver. Stream Application Server n BEA Web. Logic Server n Vitria Business. Ware enterprise integration server n Evergreen Ecential ecommerce engine n en. Commerce get. Access security server s End-user applications: n http: //www. borland. com/visibroker/cases/ n http: //www. iona. com/info/aboutus/customers/

Resources: Web sites: n OMG: http: //www. omg. org/ n Washington University: http: //www.

Resources: Web sites: n OMG: http: //www. omg. org/ n Washington University: http: //www. cs. wustl. edu/~schmidt n Free CORBA page l http: //adams. patriot. net/~tvalesky/freecorba. html n Cetus links (links to CORBA vendors, benchmarks, etc. ): l http: //www. cetus- links. org/oo_object_request_brokers. htm s Newsgroups:

Resources: books s Client/Server Programming With Java and CORBA (2 nd edition) n by

Resources: books s Client/Server Programming With Java and CORBA (2 nd edition) n by Robert Orfali and Dan Harkey s Programming with Visi. Broker, A Developer's Guide to Visi. Broker for Java n by Doug Pedrick, Jonathan Weedon, Jon Goldberg, and Erik Bleifield s Advanced CORBA Programming with C++ n by Michi Henning and Steve Vinoski