37
Common Application Components Some frequently needed elements in applications that involve communication between separate systems

Common Application Components

  • Upload
    riona

  • View
    57

  • Download
    0

Embed Size (px)

DESCRIPTION

Common Application Components. Some frequently needed elements in applications that involve communication between separate systems. Common Elements of the Application Layer. Some things have to be done in all applications Others are very common - PowerPoint PPT Presentation

Citation preview

Page 1: Common Application Components

Common Application Components

Some frequently needed elements in applications that involve communication

between separate systems

Page 2: Common Application Components

Common Elements of the Application Layer Some things have to be done in all

applications

Others are very common

Having a bag of tools handy can save recreating a solution every time the problem arises

Page 3: Common Application Components

Base set of common services

Establish contact Remote execution Reliable transfer of data Coordination of distributed processing

elements

Page 4: Common Application Components

Establishing contact

Locate the processing partner Associate semantics with messages

exchanged Understand network service level Match processing elements Identify initiator of the contact

Page 5: Common Application Components

ACSE

Association Control Service Element Two types of services offered:

– Association establishment– Association termination

• release

• abort by the user

• abort by the lower layer network services

Page 6: Common Application Components

A-ASSOCIATE Association establishment

– parameters describe the set of desired characteristics (the context) of the association

• what application service elements will be active in the cooperating systems

• identification of the destination process location for communication

– OSI PSAP (Presentation Service Access Point)– TCP/IP port number

• Presentation context– how should the receiver interpret data that arrives– {1{PersonnelData, Encrypted}, 2{Annual Report, Compressed},

3{AnnualReport,Basic}}

Page 7: Common Application Components

A-RELEASE, A-ABORT

A-RELEASE: Orderly termination of an association between cooperating processes

A-ABORT: Abrupt termination, with possible loss of data

Page 8: Common Application Components

Closing an Association

Confirmed service Unconfirmed service

Page 9: Common Application Components

Communication between layers

Peer to Peer

Service Requestor / Service Provider

Service Requestor / Service Provider

Peer to Peer

Service Requestor / Service Provider

Service Requestor / Service Provider

Page 10: Common Application Components

Within layers

Peer to Peer

Service Requestor / Service Provider

Service Requestor / Service Provider

Peer to Peer

Service Requestor / Service Provider

Service Requestor / Service Provider

Page 11: Common Application Components

Parameters Information shared between peers and between

service requestors and providers Each invocation of a service, or response to a

service request, involves information passed both within the local stack and with peers in a cooperating stack.

The single list of parameters must be split into those that inform the service provider and those that inform the peer process.

Page 12: Common Application Components

ASSOCIATION ESTABLISHMENT

Page 13: Common Application Components

System state regarding protocols A system is in one of a number of states at any

given time. – The state depends on what conditions are in effect,

what has happened so far.– The state determines what are possible responses to

future events Initial state (Idle)

– limited set of events are acceptable– others are considered error conditions– For example, the arrival of data before an association

is established would be an error condition

Page 14: Common Application Components

Protocol machine

Key:EventResponse

The event occurs, theprotocol machine changesstate and performs the indicated response.Here the response is something sent or issued.

Two views: top shows the state transition in graphical form;bottom shows the layer interaction.

Page 15: Common Application Components

Association Establishment Protocol Machine

Idle

Outgoing association

pending

AssociationEstablished

Incomingassociation

pending

A-ASSOCIATE.reqAARQ

AAREA-ASSOCIATE.conf

A-ASSOCIATE.resp AARE

AARQA-ASSOCIATE.ind

Page 16: Common Application Components

Association Established Once Association is Established

– the context of the interaction is established– data can be exchanged– an orderly termination of the association can be done

ACSE is the OSI protocol for establishing an association.

Other stacks, like TCP/IP, do not have a named entity for this purpose, but must establish this sort of connection

Page 17: Common Application Components

Remote Operation

Call for the execution of an operation on a remote system

Basic questions related to remote operation– What do we know about the data to be used?– How will the initiator know when the remote

operation is complete?– Is it safe to repeat a request if the remote system

crashes before completing?– Stop and wait or continue working?

Page 18: Common Application Components

ROSE; remote procedure calls What do we know about the data to be used?

– ASN.1 and BER or alternatives such as XDR How will the initiator know when the remote

operation is complete? – Requesting some result from every operation allows

the initiator to know when the operation is done Is it safe to repeat a request if the remote system

crashes before completing? – CCR or its equivalent

Stop and wait or continue working?– Synchronous or asynchronous invocation

Page 19: Common Application Components

Remote operation services

In the OSI protocols, – ROSE - The Remote Operation Service

Element

Other,– RPC - Remote Procedure Call– RMI - Java’s Remote Method Invocation

Page 20: Common Application Components

ROSE service RO-INVOKE

– call a method located in another system– have it run in the other system

RO-RETURN-RESULT– send a result to the invoking method

RO-RETURN-ERROR– send an error notification to the invoking method

RO-REJECT-U/RO-REJECT-P– reject the invocation request

Page 21: Common Application Components

ROSE characteristics

Minimal state information

All services unconfirmed

All responsibility for correctness is on the designer of the application

Page 22: Common Application Components

Synchronous or Asynchronous

Synchronous– blocking

Asynchronous– non-blocking– report results and errors– report errors only– report results only– report nothing

Page 23: Common Application Components

ASN.1 definition of a remote operation

Page 24: Common Application Components

Using the definition

RO-INVOKE (…,0, “PS”…)– other required parameters identify remote system to

be contacted, etc.– 0 is the identifier of getcount; PS is the name of the

queue to examine.

RO-RETURN-RESULT (“PS”,250)• Queue PS has 250 entries

RO-RETURN-ERROR (1, “PS”)• Queue PS is not available

Page 25: Common Application Components

Remote Operation Summary

Protocols cover only the communication between the caller and the called method– how method is identified– what information is provided– what is understood between them

Separate issue– write the method to carry out the desired action

Page 26: Common Application Components

Reliable transfer of information

What is needed beyond a dependable transport layer?– Protect against errors that occur after the data is

delivered to the machine– example: Jammed printer or a disk failure

prevents completion of the desired action, but the transport layer is satisfied

Page 27: Common Application Components

RTSE: Reliable Transport Service Element Invokes services of the session layer, uses

ACSE Services provided by RTSE:

– RT-OPEN– RT-TRANSFER– RT-TURN-PLEASE– RT-TURN-GIVE– RT-CLOSE– RT-U-ABORT/RT-P-ABORT

Page 28: Common Application Components

RT-TRANSFER, RT-TURN

confirmed service parameters specify data to be sent,

maximum time allowed for completion If two-way data transfer, RT-TURN-

PLEASE, an unconfirmed service, requests the opportunity to send data; RT-TURN-GIVE, unconfirmed service to yield turn

Page 29: Common Application Components

RTSE protocol

Use A-ASSOCIATE to establish connection with peer

Invoke turn-taking facilities of the Session layer

Invoke activity management facilities of the Session layer to establish checkpoints between data segments

used by X.400 mail system and available to ROSE when a lot of data must be moved

Page 30: Common Application Components

Commitment, Concurrency, and Recovery Commitment:

– assurance that the server process will carry out a request regardless of difficulties that might arise

Concurrency: – protection from the intrusion of interleaved

operations that interfere with correct completion of a requested task

Recovery: – establishment of procedures to overcome failures by

one or more participating process during execution of a distributed application

Page 31: Common Application Components

The Lost Transaction Problem

TimeTime

Process 1 Process 2Credit Limit

5,000Read credit

5000Read credit

5000Subtract new purchase(850) update credit

4,150Subtract new purchase(54.50) update credit

4,945.50

Page 32: Common Application Components

CCR Services Bracket atomic action

– C-BEGIN, C-PREPARE SERVER --> CLIENT ready

– C-READY SERVER --> CLIENT no

– C-REFUSE CLIENT, SERVER agree to go on

– C-COMMIT CLIENT --> SERVER no

– C-ROLLBACK CLIENT/SERVER go back

– C-RESTART

Page 33: Common Application Components
Page 34: Common Application Components

Multiple servers participate

Page 35: Common Application Components

Server refuses request

Page 36: Common Application Components

Some TCP/IP handy tools Not exactly the same kind of thing, but useful

nonetheless ping

– sends a message and looks for a response to determine that the other machine is alive and active

traceroute– displays the path taken by messages between two

cooperating systems on sun cluster: /usr/sbin/ping or traceroute NOTE-- overuse of these is considered very

unfriendly behavior. Be gentle, considerate.

Page 37: Common Application Components

Overall summary

Net-centered computing has more elements than computing on a single machine.

Many characteristics are the same from one application to another

Understand what is the same and what varies between applications