420 likes | 594 Views
Middleware. Ting Piao, Ishtiaq Alam, Michael McDougall. Motivation. Client/Server systems are very popular Hardware and software has evolved Systems getting more complex Systems need to be maintained & managed Many systems depend on legacy code
E N D
Middleware Ting Piao, Ishtiaq Alam, Michael McDougall
Motivation • Client/Server systems are very popular • Hardware and software has evolved • Systems getting more complex • Systems need to be maintained & managed • Many systems depend on legacy code • How can we design C/S systems to make this easier?
Outline • Introduction • Client/Server Systems • Middleware • CORBA • Conclusion
Client/Server Systems • What is a client/server system? • Client - consumer • Server - producer • Referred to as a 2 tier system
Client /Server System Server Client Client Client Client
Characteristics of the Parts • Client • Have a GUI • Not very concurrent • Not necessarily robust or reliable • Server • little or no UI • Highly concurrent • Must be robust and reliable
Examples • Client/Server • World Wide Web (Web Server & Browser) • Databases, CVS • DNS, NNTP, Radio, TV, Cellphones • Not Client/Server • IP, UDP • Email (sort of) • CB-Radio, Walkie-Talkie
Long Term Problems • Maintenance • Changing Platforms • Different Languages • Fat Server vs. Fat Client
Maintenance • Client and Server evolve • Many systems rely on legacy code/machines • Old clients need to connect to new servers and vice-versa • Details of interaction should be isolated
Changing Platforms • Client and server are often on different platforms • The Client platforms often evolves faster than server platform • Example: Win98 client connecting to VAX server. • Client and server should not be bound by platform of the other.
Case Study: Nike Order Tracking Oracle DB2 Data via FTP Custom protocol SLOW Data via EZBridge terminal SunOS MVS
Case Study: Nike • Problem: SunOS machine too slow for Oracle database • Solution: Upgrade to Solaris • Catch: EZBridge software could not be ported to Solaris • Nike forced to keep old SunOS machine
Case Study: Nike Oracle DB2 Data via FTP Custom protocol EZBridge RPC Solaris terminal MVS SunOS
Case Study: Nike • Problems: • Client machines switching to Win95, but Win95 can’t run custom protocol • SunOS machine too expensive to maintain • Mainframe needed upgrade • Software and SunOS machine not Y2K compliant • Nike system was too dependent on platform
Different Languages • Good server language != good client language • Example • server needs reliable, simple language (C) • Client needs good GUI library (java, Visual C++) • Languages change, developers want to use the latest. • Client/Server interaction should not depend on a particular language
Example: Language Dependency 1985 2000 Server In C Server In C C Data Structures ???? Client In C Client In Java
Fat Server vs. Fat Client • “Fat” = does a lot of processing • Most servers are fat; they do the bulk of processing • In some cases moving processing to the client may be desirable • Examples: Java Applets, Shockwave, Compressed data
Fat vs. Thin Client Server Fat Pictures, Text Thin Compressed data, Simple programs Thin Fat Large complex data, Complex programs
Fat and Thin Examples • Thin Clients • Network Computers, TV Boxes • Web Browsers, X Terms • Fat Clients • Lotus Notes, Outlook • Web Browser + Plugins + Java
Fat vs. Thin 2 • Fat Server / Thin Client • Clients are simple and cheap • Administration is centralized • Fat Client / Thin Server • More load balancing • May save bandwidth • More computational power (e.g. RSA contests) • Administration is scattered
Fat vs. Thin Example: Stock Quotes from Yahoo .gif Image Yahoo
Fat vs. Thin Example: Stock Quotes from Yahoo Table + Program to draw graph Yahoo Jan 1:100 Jan 2:103 Jan 3:99 Jan 4:110 ... void drawGraph() { ... }
Fat vs. Thin Example: Stock Quotes from Yahoo A link to the DB + a program to retrieve table + a program to draw graph Yahoo void connect() { ... } void drawGraph() { ...} DB Jan 1:100 Jan 2:103 Jan 3:99 Jan 4:110 ... query
Moving the Fat • Ideal world: move processing between client and server arbitrarily • Example: • if bandwidth small send compressed data • if bandwidth big send uncompressed data • Moving the fat from server to client should be as automatic as possible
Good design • A well-designed client/server system will • hide communication details • be language and platform independent • enable processing on client or server • Middleware has emerged as a solution to these problems
Middleware Logical View Physical View Server Server Middle ware Middleware Middle ware Client Client
Middleware • Distributed Software • Communication • Transparent Access Features : - Forwards client request to the network - Includes API’s (Client to Server) - Sends requested information back to client - Runs on both Client/Server - Competition in C/S
Middleware(Cont’d) A General Purpose Service - Application - Platform specific services Examples : - ODBC, SQL, Oracle Glue - Microsoft Exchange, Lotus Notes - HTTP, SSL - CORBA, DCOM
CORBA Supported by HP, IBM, Novell, Netscape, Oracle, Sun Object Request Broker (ORB) - Defines Object Model - Component Client or Server? - Location Transparency - Intercepts methods Client Server
Interface Definition Language (IDL) • Platform, Language independent • Specifies services by object • Error Handling • Superset of C++
IDL Format module <identifier> { /* define a naming context */ <type declarations>; <constant declarations>; <exception declarations>; interface <identifier> [:<inheritance>]{ /* class definition */ <type declarations>; <constant declarations>; <attribute declarations>; <exception declarations>; [<op_type>]<identifier>(<parameters>)/* method declaration */ [raises <exception>] [<context>]; ... [<op_type>]<identifier>(<parameters>)/* method declaration */ [raises <exception>] [<context>]; } /* more interfaces here */ }
IDL(continued) • Client IDL - communicate static interfaces - routes client invoked local methods
ORB Routing Method invocations Server Server Client Client Client Client
Client /Server System Client /Server System Server Server Client Client Client Client
Client IDL(cont’d) • Dynamic Invocation Interfaces • Server IDL - denote static interfaces - similar to Client IDL stubs
How CORBA works • How objects locate another - Naming Service(Unique signature) - Trader Service Of interest • CORBAservices(system level) • CORBAfacilities(V/H frameworks)
Case Study: Nike Oracle DB2 Data via FTP Custom protocol CORBA CORBA Solaris terminal MVS
DCOM • Created by Microsoft • Similarity - uses IDL - separates interface from functionality - interfaces allow transparency • Differences - “Objects” as collection of interfaces - Runtime naming/trading devices - Multiple inheritance of interfaces
Advantages of CORBA - Portable - Faster - ORB integrates with C++ objects, JAVA - Dominant Model - Open Standard in Distributed Computing
Conclusion • Client /Server systems need to be flexible and maintainable • Middleware makes Client/Server systems flexible • CORBA is a tool for implementing Middleware
References • Scott M. Lewandowski, Frameworks for Component-Base Client/Server Computing, ACM Computng Survey, March 1998, pp. 1-27. • Philip A. Bernstein, Middleware: A Model for Distributed System Services, CACM, Feb 1996, pp. 86-98. • www.corba.org - Corba Info • http://www.iona.com/info/aboutus/customers/nike.html - Nike case study