MASON CS 475 - Application Level Protocol Design

Unformatted text preview:

Application Level Protocol DesignApplication Layer Protocol DesignTrivial FTP (TFTP)Services & PDU designPDU structure and encodingTFTP ProtcolSorcerer’s apprentice syndromeCorrectionImplementation IssuesImplementation cont’dHTTP 1.0HTTP 1.0 cont’dHTTP 1.1Application-level ProtocolsPresentation LayerCORBA CDR for constructed typesCORBA CDR messageIndication of Java serialized formMIME1CS 475 1Application Level Protocol DesignConcurrent & Distributed Software SystemsCS 475 2Application Layer Protocol DesignSteps in design ServicesProtocol Data Unit (PDU) structure and encodingProtocolClient, Server, interaction with environment (DNS, NFS, etc.)2CS 475 3Trivial FTP (TFTP)RFC 1350a simple file transfer protocol, often used for booting from a remote file systemno access control, directory manipulation, etc.UDP transportfiles are netascii or binaryCS 475 4Services & PDU designServicesRead, write a filePDUsRRQ, read request: read a fileWRQ, write request: write a fileDATAACKERROR3CS 475 50(1)Errcode (2)Block # (2)Block # (2)PDU structure and encodingRRQWRQDATAACKERROROpcode String EOS01 (2) Filename (n) 0(1) Mode (n) 0(1)0(1)Mode (n)0(1)Filename (n)02 (2)03 (2)04 (2)05 (2)String EOSData (0-512)Errstring (n)String EOSCS 475 6TFTP ProtcolClient ServerWRQACK, block # 0Data, block #1ACK, block #1Data, block #2Writing a fileClient ServerRRQData, block #1ACK, block #1Data, block #2ACK, block #2Reading a file4CS 475 7Sorcerer’s apprentice syndromeSend DATA (n)Recv DATA (n)Send ACK (n)(time out)Retransmit Data (n)Recv DATA(n) DuplicateSend ACK (n) DuplicateRecv ACK(n)Send DATA(n+1)Recv DATA(n+1)Send ACK(n+1)Recv DATA(n+1) DuplicateSend ACK (n+1) DuplicateRecv ACK(n+1)Send DATA(n+2)Recv ACK (n)Send DATA(n+1)DuplicateDuplicateRecv ACK (n+1)Send DATA(n+2)DuplicateDuplicateRecv DATA(n+2)Send ACK(n+2)CS 475 8CorrectionSend DATA (n)Recv DATA (n)Send ACK (n)(time out)Retransmit Data (n)Recv DATA(n) DuplicateSend ACK (n) DuplicateRecv ACK(n)Send DATA(n+1)Recv DATA(n+1)Send ACK(n+1)Recv ACK(n+1)Send DATA(n+2)Recv ACK (n)don’t send anythingDuplicateRecv DATA(n+2)Send ACK(n+2)5CS 475 9Implementation IssuesHow does server keep track of client address?New socket created by child process on server sideChild process binds socket to a local addressAll subsequent messages from client sent to new address CS 475 10Implementation cont’dData formatsnetascii -responsibility of the client & server to convert from netascii to local representation (and vice versa)Protocol processingFinite state machineSecurity6CS 475 11HTTP 1.0Servicesread web pages, append to web pages, write pages, etc.GET, HEAD, POST, PUT, DELETE, etc.PDU design and encodingASCII request followed by MIME-like responseformat specified in BNFCS 475 12HTTP 1.0 cont’dProtocolTCP used as transportnew connection for every file retrieved⌧poor performanceOther issuesactive content, caching, proxy servers, security7CS 475 13CS 475 14HTTP 1.1Several changes Persistent connections - default behaviorHost header field in requestConnection headerSee also link on class web page for a more detailed discussionAssignment GETLIST method (not part of HTTP 1.1) ⌧server can supply a list of embedded files as an optional header in the response to a GET request⌧you have to design the request/response formats8CS 475 15CS 475 16Application-level ProtocolsSession-layercommunication between processes (as opposed to hosts)Example:⌧ error-recovery and check-pointing for long-lived connections⌧ creation and management of synchronized streams for audio and video9CS 475 17Presentation LayerHandle issues related to different data representations on communicating hostsbig endian vs little endian, 32 bit vs 64 bit, different formats for characters, etc. Usually handled in one of two ways⌧Canonical representation of data• XDR, ASN.1, netascii (TFTP), CORBA CDR• ASCII (HTTP)• Java object serialization⌧“receiver makes right”Also handles encryption and decryptionCS 475 18CORBA CDR for constructed typesType Representationsequence length (unsigned long) followed by elements in orderstring length (unsigned long) followed by characters in order (can alsocan have wide characters)array array elements in order (no length specified because it is fixed)struct in the order of declaration of the componentsenumerated unsigned long (the values are specified by the order declared)union type tag followed by the selected member10CS 475 19CORBA CDR messageThe flattened form represents a Person struct with value: {‘Smith’, ‘London’, 1934}0–34–78–1112–1516–1920-2324–275" S mit""h___"6"Lond""on__"1934index in sequence of bytes 4 bytesnotes on representationlength of string‘Smith’length of string‘London’unsigned longCS 475 20Indication of Java serialized formThe true serialized form contains additional type markers; h0 and h1 are handlesSerialized valuesPerson319348-byte version numberint year5 Smithjava.lang.Stringname:6 Londonh0java.lang.Stringplace:h1Explanationclass name, version numbernumber, type and name of instance variables values of instance variables11CS 475 21MIMEInternet email standard (RFC 822) specifies ASCII message formatMultipurpose Internet Mail Extensionscontinue to use the RFC 822 format but allow non-ASCII messagesNew message headers binary messages encoded using base64 encoding or quoted-printable


View Full Document

MASON CS 475 - Application Level Protocol Design

Download Application Level Protocol Design
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Application Level Protocol Design and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Application Level Protocol Design 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?