48
Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

  • View
    215

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications:A First Course

Chapter 16

by

David G. Messerschmitt

Page 2: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course2

Network

Operating system

Middleware

Application components

Applications

Layering a computing infrastructure

Page 3: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course3

Distributed object management

Spanning layers

Network 1 Network 2

TCP UDP

Windows NT

TCP UDP

UNIX

Application

TCP UDP

Mac OS

Internet protocol

Spanning layer

Page 4: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course4

The new infrastructure: middleware

• Layer of software between OS and application– Hides heterogeneity– Provides generic common services– Increases level of abstraction

• By its nature, not single platform, nor bundled with equipment– Microsoft attempts to be an exception

Page 5: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course5

The new infrastructure

• Middleware is– where new capabilities are added by layering– where much of the experimentation and

innovation happens in the infrastructure– where the successful approaches have a chance

to become a spanning layer and/or integrated into a distributed OS

• Boundary to a distributed OS is fuzzy

Page 6: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course6

Middleware objectives

• Hide heterogeneity• Location independence• Common functionality needed by many

applications• Software portability and mobile code• Help integrate legacy facilities• Aid application interoperability• Aid scalability

Page 7: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course7

Some middleware categories

• Transaction processing– Simplify the coordination of complementary

resource managers

• Message-oriented middleware– Support message and queuing capabilities

where resource mangers are not available simultaneously (like workflow)

Page 8: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course8

Some middleware categories

• Distributed object management– Support applications that are distributed across

heterogeneous platforms and organizations

• Mobile code– Allow application code to be moved and

executed on heterogeneous platforms– Without prior software installation

Page 9: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course9

Infrastructure software today

• With networks, new emphasis on:– Portability: applications run across multiple

platforms (avoid lock-in)– Interoperability: pieces of application must

work together (benefit from network effects)

What are some examples of each?

Page 10: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications:A First Course

Transaction processing

by

David G. Messerschmitt

Page 11: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course11

Durablestartingstate

Durable,consistent,ending state

Collection of resource actions

Rollback

SuccessfulcompletionAbort

The transaction

Page 12: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course12

Resource managers

Application logic

Transactionmanager

Join

Prepare,commit,abort

Transaction architecture

Page 13: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course13

Transactionmanager

Phase 1

prepare() yes_or_no

Transactionmanager

commit()

Transactionmanager

Phase 2

abort()

One ormore “no’s”

All “yes”

Rollback

Commit or abort

Page 14: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course14

ServerClient_2Client_1

Starting state

Final state

Inconsistentstate

Group of RMI’s

Atomic series of resource actions

Page 15: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course15

ServerClient_2Client_1

Starting state

Final state

Refused

Lock

Unlock

Group of RMI’s

Locking to prevent conflicts

Page 16: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course16

ServerClient_2Client_1

Starting state

Final state

Group of RMI’sSomething goes awry Inconsistent

state

Abort

Page 17: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course17

ServerClient_2Client_1

Starting state

Group of RMI’sSomething goes awry

Rollback

Rollback

Page 18: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course18

Application server Resource manager Transaction manager

request(tp_ID,….)join(tp_ID)

More requests….

commit?(tp_ID)

commit_or_abort(tp_ID)

Lock

Commit or rollback

Transaction protocol

Page 19: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications:A First Course

Mobile code and Java

by

David G. Messerschmitt

Page 20: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course20

Reminder: two key requirements

• With networks, new emphasis on:– Portability: applications run across multiple

platforms (avoid lock-in)– Interoperability: pieces of application must

work together (benefit from network effects)

Page 21: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course21

Send code (as a message) to a host

Execute the programrepresented by that code

MC

Mobile code:Code representinga software program that can be moved toheterogeneous platforms and executed there

Dynamic portability: mobile code

Page 22: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course22

Mobile code originating from a common source can enhance interoperability

MC

Portability can aid interoperability

Page 23: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course23

Java

• Portability– “Write once, run anywhere”

• Programming productivity– Garbage collection (no memory leaks)

– Multi-threaded

• Scalability– Move execution cycles

• Interoperability– Software components come from common repository

Page 24: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course24

Send as a message to a host

Execute the program

MC

Mobile code:Code representinga software program

MA

Mobile agent:Code and datarepresenting an objector component

Idea of mobile code

Page 25: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course25

Shifting location of computation can enhance scalability

Executing program closer to user can enhance interactivity

Mobile code originating from a common source can enhance interoperability and bypass network effects

MCMC

Some mobile code advantages

Page 26: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course26

Agent launched

Agent executes in eachhost, modifying its state

Agent returns

MA

Idea of mobile agents

Page 27: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course27

VMinterpreter

Java program

Compilation

JITcompiler

Bytecode:low level butmachine independent

Native machineinstructions

Mobile code

Java virtual machine

Page 28: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course28

Java virtual machine

Operating system

Applications

JavaBeanscomponent framework

Java VM spanning layer

VM as spanning layer

Page 29: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course29

SUN/Java strategy

• License Java freely, even to rival Microsoft– Why?

• License terms give Sun a modicum of control over the “standard”– Why?

• How does Sun expect to make money?

Page 30: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications:A First Course

Distributed object management

by

David G. Messerschmitt

Page 31: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course31

Distributed object management

• Emphasis is on interoperability– Allows objects on one host to invoke methods of

objects on another host

– Platform, language independent

• CORBA vs DCOM• Portability is not the emphasis

Page 32: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course32

Interoperability

Client Server

Client object can invoke methods of server object, even if they are running on different platforms, written in different languages

What else is needed?

Page 33: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course33

Interoperability

Interoperability also requires:

• Common structure of data

• Common interpretation of data

• Agreement on protocols

Client Server

Page 34: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course34

IP

OS 1 OS 2 OS 3

Distributed application

IP

OS 1 OS 2 OS 3

Distributed object management middleware

Distributed application

Spanninglayer

Potentialspanninglayer

Before and after

Page 35: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course35

What is the acronym?

• Common Object Request Broker Architectureor

• Concerned Off-Road Bicyclist Association?

Page 36: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course36

Object request broker core

Interfacerepository

CORBA services

Objectadapter

Server objects

Clientobjects

CORBA architecture

Page 37: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course37

Internet protocol (IP)

Subnetworks

User datagram protocol (UDP)

Transmission control protocol (TCP)

Internet Inter-ORB Protocol (IIOP)

Application

Protocol layer

Object request brokerObject Management Group CORBA standard

Location-independentapplication

Page 38: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course38

Internet Inter-ORB Protocol (IIOP)

Application 2

Portability not promised

ORB 2

Location-dependent application

Application 1

ORB 1

Interoperability

CORBA standard does not insure ORB-to-ORB portability

Page 39: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course39

OMG process

• Identify need

• Request for proposals

• Process to– choose best– or ask proposal advocates to work together

Page 40: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course40

Which is most effective?

• Industry de facto standard effort (CORBA)or

• Single vendor integrated solution (DCOM)?

Page 41: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course41

CORBA vs DCOM

CORBA

• Integrate best ideas

• Multi-vendor support

• Cross-platform and language

DCOM

• Fast, no consensus required

• No vendor interoperability issues

Page 42: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course42

Two methods for application interaction

• CORBA and DCOM

• Exchange documents (XML)

What are their relative merits?

Page 43: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course43

CORBA vs XML

CORBA

• Natural OOP extension

• No document interpretation

• Good for back-and-forth protocols

XML

• Flexible data-sharing

• Good for document-like objects

• Natural cross-platform capability

• No protocol standardizationBoth have need for standardization of data or document interpretation

Page 44: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course44

What CORBA provides

• Java– Language bindings

– Transportable objects

• “Inter-galactic” software bus– Cross-platform and language

– Interoperability (but not portability)

• High levels of abstraction– Remote method invocation on objects

Page 45: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course45

What CORBA provides (con’t)

• Run-time flexibility– Everything self-describing

– Interface discovery

– Dynamic data structures and binding

• Useful services– Naming

– Security

– Many others

Page 46: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course46

Importance of CORBA

• Inter-enterprise computing– Platform and language independence– Electronic commerce, network management,

etc

• Reduction of network effects– Another spanning layer– Significance of platform reduced

Page 47: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course47

Are Java and CORBA competitive or complementary?

• Both offer interoperability across different platforms

• Java offers portability and transportability• CORBA offers heterogeneous language bindings• CORBA offers many services, metadata, etc.• Bottom line: they are complementary!

– (but some Java proponents may not agree)

Page 48: Understanding Networked Applications: A First Course Chapter 16 by David G. Messerschmitt

Understanding Networked Applications A First Course48

Who favors what?

Would these vendors be in favor of:

• Interoperability?

• Portability?

Microsoft

Intel

SUN

Novell

Iona