Layered Protocol - PowerPoint PPT Presentation

1 / 43
About This Presentation
Title:

Layered Protocol

Description:

Layered Protocol. Simple idea. Agreements. 0-bit/1-bit volts. Last bit of the message ... To reduce complexity and ease to modify ... – PowerPoint PPT presentation

Number of Views:112
Avg rating:3.0/5.0
Slides: 44
Provided by: wind70
Category:

less

Transcript and Presenter's Notes

Title: Layered Protocol


1
Layered Protocol
  • Simple idea
  • Agreements
  • 0-bit/1-bit volts
  • Last bit of the message
  • Message has been damaged or lost
  • Numbers, strings, data length

2
Layered Protocol
  • OSI Reference Model

3
Layered Protocol
  • Why layered structure?
  • To reduce complexity and ease to modify
  • Once the service is defined, the higher layer is
    shielded from implementation details of its lower
    layer
  • Each protocol is independent of the others
  • Number of layers, the name, the contents, and
    functions of each layer differs for each network

4
Layered Protocol
  • Protocol
  • A set of rules exchanged between peer entities
    within a layer tells what a layer works
  • Connection-Oriented
  • Messages are delivered in order
  • Connection establishment, Information transfer,
    Connection release
  • Connectionless
  • Each message is delivered independent of the
    others, and may be out of order

5
Layered Protocol
  • Typical message as it appears on the network

6
Physical Layer
  • Concerned with transmitting raw bits over a
    channel
  • Mechanical interface connector type, meaning of
    each pin, etc.
  • Electrical interface voltage level of 0 and 1,
    bit interval, etc.
  • Procedural interface
  • Physical transmission medium

7
Data Link Layer
  • Deals with error-free transmission between sender
    and receiver
  • Framing special bit patters at the beginning of
    a frame
  • Error control for damaged, lost, and duplicate
    frames
  • Flow control

8
Data Link Layer
  • Discussion between a receiver and a sender

9
Network Layer
  • Concerned with the operation of subnet
  • Routing determines an outgoing link on the best
    path to destination
  • Congestion control to avoid a congestion within
    the subnet
  • IP packet Connectionless protocol
  • Virtual channel Connection-oriented protocol
  • Virtual path group of virtual channel

10
Transport Layer
  • Concerned with end-to-end reliable communication
  • Multiple network connection to improve throughput
  • Multiplexing several transport connection onto
    same net connection
  • type of service (at the time of connection
    set-up)
  • in-order delivery, delivery without guarantee
    about the order, broadcasting etc.
  • Flow control between hosts

11
Transport Layer
  • TCP (Transmission Control Protocol)
  • Connection-oriented protocol
  • Provides a reliable end-to-end byte stream
  • Dynamically adapting to the unreliable
    internetwork and to be robust in the face of many
    kinds of failures
  • UDP (Universal Datagram Protocol)
  • Connectionless protocol
  • Used for client-server applications

12
Client-Server TCP
  • Normal operation of TCP Transactional TCP

13
Session and Presentation Protocol
  • Session Layer concerned with controlling a
    session (or a dialogue)
  • A session service can be an ordinary transport
    service, or some enhanced one.
  • Dialogue control, token management, etc.
  • Presentation Layer concerned with
    representation of information
  • Compression
  • Encryption
  • Encoding the representation used inside a
    computer needs to be converted to abstract data
    structure (or net standard representation)

14
Application Protocols
  • Concerned with particular protocols commonly
    needed
  • Virtual terminal
  • FTP (File Transfer Protocol)
  • HTTP (HyperText Transfer Protocol)
  • Electronic mail
  • Remote job entry
  • Directory look up etc.

15
Middleware Protocols
  • Support high-level communication services
  • Transfer real-time data
  • Reliable multicasting services

16
Remote Procedure Call
  • Exist Problems
  • Procedures run on different machines
  • Execute in different address spaces
  • Parameters and results have to be passed
  • ? Both machines can crash

17
Conventional Procedure Call
  • Count read(fd, buf, nbytes)

18
Conventional Procedure Call
  • Call by value
  • Copy to the stack
  • Not affect the original value
  • Call by reference
  • Pointer to variable
  • Modify the calling procedure
  • Call by copy/restore
  • Copy to the stack
  • Overwriting the original value

19
Client and Server Stubs
  • Principle of RPC between a client and server
    program

20
Client and Server Stubs
  • Client procedure calls client stub in normal way
  • Client stub builds message, calls local OS
  • Client's OS sends message to remote OS
  • Remote OS gives message to server stub
  • Server stub unpacks parameters, calls server
  • Server does work, returns result to the stub
  • Server stub packs it in message, calls local OS
  • Server's OS sends message to client's OS
  • Client's OS gives message to client stub
  • Stub unpacks result, returns to client

21
Passing Value Parameters
  • Parameter marshaling Packing parameter into a
    message

22
Passing Value Parameters
  • Little endian Big endian Invert
  • Original message on the Pentium
  • The message after receipt on the SPARC
  • The message after being inverted. The little
    numbers in boxes indicate the address of each byte

23
Passing Reference Parameters
  • How are Pointers, or in general, references
    passed?
  • Forbid pointers and reference parameters in
    general
  • Call-by-reference have been replace by
    copy/restore
  • Input Need not be copied back
  • Output Need not be sent over in the first place
  • We can now handle pointers

24
Parameter Specification and Stub Generation
  • A procedure
  • The corresponding message.

25
Parameter Specification and Stub Generation
  • Interface Definition Language(IDL)
  • An interface specified in such an IDL, is then
    subsequently compiled into a client stub and a
    server stub, along with the appropriate
    compile-time or run-time interfaces.

26
Doors
  • Doors in IPC machanism

27
Asynchronous RPC
  • The interconnection between client and server in
    a traditional RPC
  • The interaction using asynchronous RPC

28
Asynchronous RPC
  • A client and server interacting through two
    asynchronous RPCs

29
Introduction to DCE
  • Distributed File Service
  • Provides a transparent way of accessing any file
    in the system in the same way
  • Directory Service
  • Keep track of the location of all resources in
    the system
  • Security Service
  • Access can be restricted to authorized persons
  • Distributed Time Service
  • Keep clocks on the different machines globally
    synchronized

30
Goals of DCE RPC
  • The RPC system can automatically handle data type
    conversions between the client and the server
  • Ability to hide the details, clients and servers
    are highly independent of one another
  • Binding Automatically locate the correct
    server, Set up the communication

31
Writing a Client and a Server
32
Binding a Client to a Server
  • Performing an RPC
  • At-most-once operation

33
Distributed Objects
34
Compile-time versus Runtime Objects
  • Compile-time
  • Easier to build distributed application
  • ex) Java
  • RunTime
  • Use an object adapter
  • Dynamically bind

35
Persistent and Transient Objects
  • Persistent object
  • Continues to exist
  • Not dependent on its current server
  • Transient object
  • Server exits, the object ceases to exist

36
Binding a Client to an Object
Distr_object obj_ref //Declare a systemwide
object referenceobj_ref // Initialize the
reference to a distributed objectobj_ref-gt
do_something() // Implicitly bind and invoke a
method (a) Distr_object objPref //Declare a
systemwide object referenceLocal_object
obj_ptr //Declare a pointer to local
objectsobj_ref //Initialize the reference
to a distributed objectobj_ptr
bind(obj_ref) //Explicitly bind and obtain a
pointer to the local proxyobj_ptr -gt
do_something() //Invoke a method on the local
proxy (b)
  • Implicit binding using only global references
  • Explicit binding using global and local references

37
Implementation of Object References
  • Server crashes and assign a different endpoint
    after recovery
  • Location server
  • Server may simultaneously support several kind
    data coming
  • Implementation handle

38
Static versus Dynamic Remote Method Invocations
  • Remote Method Invocations (RMI)
  • Similar to RPC
  • Support systemwide object reference
  • Static Invocation
  • If interfaces change then client application must
    recompile
  • Dynamic Invocation
  • Invocation at runtime

39
Parameter Passing
40
The DCE Distributed-Object Model
  • Distributed dynamic object Distributed
    named object

41
DCE Remote Object Invocation
  • Binding handle

42
The Java Distributed-Object Model
43
Java Remote Object Invocation
Write a Comment
User Comments (0)
About PowerShow.com