9 september 2008cis 340 # 1 topics reviewto review the communication needs to support the...

22
9 September 2008 CIS 340 # 1 Topics • To review review the communication needs to support the architectures • To examine the variety variety of approaches of approaches to handle the middle-interaction To describe the variety of activities activities constituting the interaction

Upload: lawrence-bradley

Post on 02-Jan-2016

219 views

Category:

Documents


1 download

TRANSCRIPT

9 September 2008 CIS 340# 1

Topics

• To reviewreview the communication needs to support the architectures

• To examine the variety of variety of approachesapproaches to handle the middle-interaction

To describe the variety of activities activities

constituting the interaction

9 September 2008 CIS 340# 2

Communication Options:How does code at client and server thread interact??

Synchronous• Blocking engaged• Parties wait until

interaction concludes• Client waits for a

response

• EX:– Majority of

middleware– Request/response

Asynchronous• No blocking details• Parties need not wait• Implies message

storage for receiver to retrieve

• EX:– Information

dissemination– Event notification– Publish/subscribe

9 September 2008 CIS 340# 3

Downside of SynchronizationWaiting• time and resource consumption• swapped out

Shortage of connections (possible)• if too many outstanding calls to the “serving” system• each call makes a connection

Integration burden• tightly integrated, linked

Fault intolerant• Both calling & called systems must be online

Increased maintenance management• e.g. Upgrades would require both sides to be offline• must disable both in order to “touch” one side

4

Middleware emergence

• Distributed computing evolved from single-tier (terminal/mainframe) to 2-tier (client-server)to n-tier architecture

• To support heterogeneous environments open networking standards were introduced (i.e. OSI)

• How do we build/connect applications over a network?

• Answer: middleware

5

N-tier architecture

• More scalable architecture that separates processing to different servers

6

What is Middleware?• Middleware enables applications running across multiple

platforms to communicate with each other .– Hides complexity and heterogeneity of distributed system

• Middleware shields the developer from dependencies on Network Protocols, OS and hardware platforms.– Bridges gap between low-level OS communications and

programming language abstractions

• Middleware is a software layer that lies between the operating system and the applications on each site of the system. – Provides common programming abstraction and infrastructure for

distributed applications

Network

Operating system

Middleware

Application components

Applications

Layering a computing infrastructure

9 September 2008 CIS 340# 8

Programming abstractions (1)Programming languages and almost any

form of software system evolve always towards higher levels of abstraction• Hiding hardware and platform details• More powerful primitives and interfaces• Leaving difficult task to intermediarie

• compilers • optimizers • automatic load balancing • automatic data partitioning and allocation

• Reducing the number of programming errors• Reducing the development and maintenance

cost of the applications developed by facilitating their portability

Def:Def:

9 September 2008 CIS 340# 9

Programming abstractions (2)

Middleware (MW) is primarily a set of programming abstractions developed to

• facilitate the development of complex distributed systems

Def:Def:

9 September 2008 CIS 340# 10

Middleware (MW)Basic functioning expectations• Ease of use

Compared to DIY with programming low-level sockets

• Location transparency

Applications should be network widgets, ignorant of network addresses

• Message-delivery integrity

No loss or duplication of messages

• Message-format integrityNo damage to the message content

• Language transparencyApplications should not be bound to a language

– or by extension – to a vendor

Def:Def:

9 September 2008 CIS 340# 11

Notion of Transparency

Why is it important / relevant?Consider electricity and wall plugs....

9 September 2008 CIS 340# 12

Types of Middleware

1. RPC-based systems

2. TP monitors

3. Object brokers

4. Object monitors

5. Message-oriented middleware

6. Message brokers

Industry exemplar ?

How do these work?

9 September 2008 CIS 340# 13

The Generative Phases of Middleware

Remote Procedure Call

sockets

TCP, UDP

Internet Protocol (IP)

Remote Procedure Call: • hides communication details behind a

procedure call • helps bridge heterogeneous platforms

sockets: • operating system level interface to the

underlying communication protocols

TCP, UDP:• User Datagram Protocol (UDP) transports

data packets without guarantees• Transmission Control Protocol (TCP)

verifies correct delivery of data streams

Internet Protocol (IP):• moves a packet of data from one node to

another

TransactionalRPC

Object orientedRPC (RMI)

AsynchronousRPC

TP-MonitorsObject brokers

Messagebrokers

Applicationservers

Specialized forms of RPC • typically with additional functionality or

properties• almost always running on RPC platforms

Middleware as infrastructure

9 September 2008 CIS 340# 14

Infrastructure• As the programming abstractions reach higher and higher levels, the

underlying infrastructure implementing the abstractions must grow accordingly

– Additional functionality is almost always implemented through additional software layers

– The additional software layers increase the size and complexity of the infrastructure necessary to use the new abstractions

• The infrastructure is also intended to support additional functionality that makes development, maintenance, and monitoring easier and less costly

– RPC => transactional RPC => logging, recovery, advanced transaction models, language primitives for transactional demarcation, transactional file system, etc.

– The infrastructure is also there to take care of all the non-functional properties typically ignored by data models, programming models, and programming languages

• performance, availability, recovery, instrumentation, maintenance, resource management, etc.

9 September 2008 CIS 340# 15

9 September 2008 CIS 340# 16

9 September 2008 CIS 340# 17

Coming next....Coming next....

• Project 1

9 September 2008 CIS 340# 19

Remote Procedure Call (RPC): Functionality of Stubs

BINDING MARSHALING SERIALIZING SENDING

RECEIVING DESERIALIZING UNMARSHALING

•Client process

•Creates a local association – handle – to the server

•Thin k of “binding a variable”

• Client process

• Packages data into message format needed by the recipient server

• Client process

• Transforms data/message into bytes

• Server process

• Undoes the steps

9 September 2008 CIS 340# 20

Synchronous Call Behavior

• Simple design

• Calling thread state is known, unchanging

9 September 2008 CIS 340# 21

Asynchronous Call Behavior via Queues

“message memory” --holding area

9 September 2008 CIS 340# 22

For the Record: Industry exemplar ?• What vendor might you recommend for a company

within the industry?• Why would it be a good fit – what details do you

have about the vendor, the MW capability, the industry?

PERSON INDUSTRY MW-TYPE

Bob Retail MOM

Financial TransProc

Pat Manufacturing Object MW

Military RPC MW

Vitolo Health care