External Data Representation (XDR)

Size: px
Start display at page:

Download "External Data Representation (XDR)"

Transcription

1 External Data Representation (XDR) Prof. Chuan-Ming Liu Computer Science and Information Engineering National Taipei University of Technology Taipei, TAIWAN NTUT, TAIWAN 1

2 Introduction This chapter examines a de facto standard for external data representation and presentation as well as a set of library procedures used to perform data conversion This chapter describes the general motivations for using an external data representation and the details of one particular implementation NTUT, TAIWAN 2

3 Introduction (cont.) The next chapter shows how an external data representation standard helps simplify client and server communication It illustrates how a standard makes it possible to use a single, uniform remote access mechanism for client-server communication NTUT, TAIWAN 3

4 Representation of Data Fig shows little endian (if it stores the LSB of an integer at the lowest memory address) and big endian representation for 32-bit integers Programmers who create client and server software must contend with data representation because both endpoints must agree on the exact representation for all data sent across the communication channel between them; otherwise, conversion is required NTUT, TAIWAN 4

5 Figure 20.1 NTUT, TAIWAN 5

6 Asynchronous Conversion and the N-Squared Problem Designs that follow the paradigm of converting directly from one representation to the server s representation are said to use asymmetric data conversion because only one side needs to perform conversion NTUT, TAIWAN 6

7 Asynchronous Conversion and the N-Squared Problem If client-server software is designed to convert between the client s native data representation and the server s native data representation asymmetrically, the number of versions of the software grows as the square of the number of architectures (N- Squared Conversion Problem) NTUT, TAIWAN 7

8 Network Standard Byte Order The TCP/IP protocols use the same representation for all the data sent across a network in a protocol header (headers represent integer data in a standard, machine-independent form) Such designs employ symmetric data conversion NTUT, TAIWAN 8

9 Network Standard Byte Order (cont.) Symmetric data representation has an important consequence: only one version of protocol software is needed The standard representation used for data traversing the network is known as the external data representation NTUT, TAIWAN 9

10 Network Standard Byte Order (cont.) The chief advantage lies in flexibility: neither the client and the server needs to understand the architecture of the other The total programming effort required will be proportional to the number of machine architectures The chief disadvantage of symmetric conversion is computation overhead even if the client and the server both operate at the same architecture NTUT, TAIWAN 10

11 Network Standard Byte Order (cont.) Because the external representation may add information to the data or align it with word boundaries, the conversion may result in a larger stream of bytes than necessary Most programmers agree that using symmetric conversion is worthwhile NTUT, TAIWAN 11

12 Network Standard Byte Order (cont.) It simplifies programming, reduces errors, and increases interoperability among programs It also makes network management and debugging easier because the network manager can interpret the contents of packets without knowing the architectures of the sending and receiving machines NTUT, TAIWAN 12

13 A De Facto Standard External Data Representation XDR, Sun s external Data Representation has become a de facto standard for most client-server applications XDR specifies data formats for most of the data types that clients and servers exchange. For example, XDR specifies that 32-bit binary integers should be represented in big endian order NTUT, TAIWAN 13

14 XDR Data Types Fig lists the data types for which XDR defines a standard representation XDR allows the programmer to compose aggregate types from other types For example, XDR allows an array of structure, each of which can have multiple fields that can be an array, structure, or union Thus, XDR provides representation for most of the structure that a C programmer can specify NTUT, TAIWAN 14

15 Figure 20.2 NTUT, TAIWAN 15

16 Implicit Types The XDR standard specifies how a data object should be encoded for each of the data types listed in Fig However, the encodings contain only the data items and do not contain additional bits to identify their types. Thus, clients and servers using XDR must agree on the exact format of messages they will exchange. NTUT, TAIWAN 16

17 Software Support for Using XDR Programmers perform the conversions: Sending: insert a function call in the code to convert each data item in a message to external form Receiving: and insert a function call to convert each data item to internal form when a message arrives To eliminate potential conversion errors, an implementation of XDR includes library routines that perform the necessary conversions NTUT, TAIWAN 17

18 XDR Library Routines XDR library routines for a given machine can convert data items from the computer s native representation to the XDR standard representation and vice versa. Most implementations of XDR use a buffer paradigm that allows a programmer to create a complete message in XDR form. NTUT, TAIWAN 18

19 Building a Message One Piece at a Time Buffer paradigm allocate a buffer large enough to hold the external representation of a message and to add item (i.e., fields) one at a time In Linux, xdrmem_create allocates a buffer in a memory and inform XDR that it intends to compose an external representation in it initializes the memory so it represents an XDR stream that can be used to encode or decode NTUT, TAIWAN 19

20 Building a Message One Piece at a Time (cont.) The declarations and calls needed to create an XDR stream using C are shown in Fig. 20.2a Once a program has created an XDR stream, it can call individual XDR conversion routines to convert native data objects into external form For example, a program invokes xdr_int by passing it a pointer to an XDR stream and a pointer to an integer, as shown in Fig. 20.2b Fig illustrates how the call to xdr_int shown in the sample code adds 4 bytes of data to the XDR stream NTUT, TAIWAN 20

21 Figure 20.2a #include <rpc/xdr.h> //size of memory for encoding #define BUFSIZE 4000 XDR *xdrs; //pointer to an XDR stream char buf[bufsize];//memory area to hold XDR data xdrmem_create(xdrs, buf, BUFSIZE, XDR_ENCODE); NTUT, TAIWAN 21

22 Figure 20.2b int i; //integer in native representation //assume stream initialized for ENCODE i = 260; //assign integer value to be converted xdr_int(xdrs, &i); //convert integer and append to stream NTUT, TAIWAN 22

23 Figure 20.3 NTUT, TAIWAN 23

24 Conversion Routines in the XDR Library The table in Fig lists the XDR conversion routines The receiving application must calls xdrmem_create to create a memory buffer that will hold an XDR stream, and places the incoming message in a buffer area For example, if the receiver has established an XDR stream used for input (i.e., the call specified XDR_DECODE), it can extract a 32-bit integer and convert it to the native representation by calling xdr_int, as shown in Fig NTUT, TAIWAN 24

25 Figure 20.4 NTUT, TAIWAN 25

26 Conversion Routines in the XDR Library (cont.) Unlike the conversion, htons and ntohs that Linux provides, individual XDR conversion routines do not specify the direction of conversion. Instead, the direction is specified when creating the XDR stream. NTUT, TAIWAN 26

27 XDR Stream, I/O, and TCP The code fragments above create an XDR stream associated with a buffer in memory After items have been converted to external form and placed in the buffer, the application must call an I/O function like write to send it across a TCP connection It is possible to arrange to have XDR conversion routines send data across a TCP connection automatically each time they convert a data item to external form NTUT, TAIWAN 27

28 XDR Stream, I/O, and TCP (cont.) An application program first creates a TCP socket, and then calls fdopen to attach a standard I/O stream to the socket The application calls xdrstdio_create to create an XDR stream and connect it to the existing I/O descriptor Each time the application calls an XDR conversion routine, the conversion automatically performs a buffered read or write operation using the underlying descriptor NTUT, TAIWAN 28

29 Records, Record Boundaries, and Datagram I/O The XDR mechanism works well when connected to a TCP socket because both XDR and TCP implementations use the stream abstraction To make XDR work with UDP, the alterative design provides an application with a record-oriented interface To use the record-oriented interface, a program calls function xdrrec_create when creating a record-oriented XDR stream NTUT, TAIWAN 29

30 Records, Record Boundaries, and Datagram I/O (cont.) The call includes two arguments, inproc and outproc, that specify an input procedure and an output procedure When converting to external form, each conversion routine check the buffer If the buffer becomes full, the conversion routine calls outproc to send the existing buffer contents and make space for the new data NTUT, TAIWAN 30

31 Records, Record Boundaries, and Datagram I/O (cont.) Each time the application calls a conversion routine to convert from external form to the native representation, the routine checks the buffer to see if it contains data If the buffer is empty, the conversion routine calls inproc to obtain more data NTUT, TAIWAN 31

32 Records, Record Boundaries, and Datagram I/O (cont.) To use XDR with UDP, an application creates a record-oriented XDR stream It arranges for the input and output procedures associated with the stream to call read and write (or recv and send) Record-oriented streams allow an application to mark record boundaries NTUT, TAIWAN 32

33 Summary Client-server interaction can be asymmetric or symmetric Asymmetric conversion requires either the client or the server to convert between its own representation and the other machine s native representation Symmetric conversions uses a standard network representation and requires both the client and server to convert between the network standard and the local representation NTUT, TAIWAN 33

34 Summary (cont.) Client and server programs can use XDR routines to convert data to external form before sending it and to internal form after receiving it The conversion routine can be associated with input and output using TCP or UDP Although some protocols in the TCP/IP suite use ASN.1 (Abstract Syntax Notation One, by ISO) representation, most application programmers use XDR NTUT, TAIWAN 34

XDR External Data Representation. XDR as a case study XDR

XDR External Data Representation. XDR as a case study XDR XDR External Data Representation Process A XDR Encode/Decode Transport Process A XDR Encode/Decode Transport Netprog: XDR 1 XDR as a case study Sun RPC uses XDR. A good example of a layer. Interesting

More information

The Client Server Model and Software Design

The Client Server Model and Software Design The Client Server Model and Software Design Prof. Chuan-Ming Liu Computer Science and Information Engineering National Taipei University of Technology Taipei, TAIWAN MCSE Lab, NTUT, TAIWAN 1 Introduction

More information

Distributed Systems 8. Remote Procedure Calls

Distributed Systems 8. Remote Procedure Calls Distributed Systems 8. Remote Procedure Calls Paul Krzyzanowski pxk@cs.rutgers.edu 10/1/2012 1 Problems with the sockets API The sockets interface forces a read/write mechanism Programming is often easier

More information

Presentation Services. Presentation Services: Motivation

Presentation Services. Presentation Services: Motivation Presentation Services need for a presentation services ASN.1 declaring data type encoding data types implementation issues reading: Tannenbaum 7.3.2 Presentation Services: Motivation Question: suppose

More information

Tutorial on Socket Programming

Tutorial on Socket Programming Tutorial on Socket Programming Computer Networks - CSC 458 Department of Computer Science Hao Wang (Slides are mainly from Seyed Hossein Mortazavi, Monia Ghobadi, and Amin Tootoonchian, ) 1 Outline Client-server

More information

Networked Applications: Sockets. End System: Computer on the Net

Networked Applications: Sockets. End System: Computer on the Net Networked Applications: Sockets Topics Programmer s view of the Internet Sockets interface End System: Computer on the Net Internet Also known as a host 2 Page 1 Clients and Servers Client program Running

More information

Distributed Systems. How do regular procedure calls work in programming languages? Problems with sockets RPC. Regular procedure calls

Distributed Systems. How do regular procedure calls work in programming languages? Problems with sockets RPC. Regular procedure calls Problems with sockets Distributed Systems Sockets interface is straightforward [connect] read/write [disconnect] Remote Procedure Calls BUT it forces read/write mechanism We usually use a procedure call

More information

Oral. Total. Dated Sign (2) (5) (3) (2)

Oral. Total. Dated Sign (2) (5) (3) (2) R N Oral Total Dated Sign (2) (5) (3) (2) Assignment Group- A_07 Problem Definition Write a program using TCP socket for wired network for following Say Hello to Each other ( For all students) File transfer

More information

Transport protocols Introduction

Transport protocols Introduction Transport protocols 12.1 Introduction All protocol suites have one or more transport protocols to mask the corresponding application protocols from the service provided by the different types of network

More information

Concurrent Processing in Client-Server Software

Concurrent Processing in Client-Server Software Concurrent Processing in Client-Server Software Prof. Chuan-Ming Liu Computer Science and Information Engineering National Taipei University of Technology Taipei, TAIWAN MCSE Lab, NTUT, TAIWAN 1 Introduction

More information

Lecture 12 RPC RPC RPC. Writing an RPC Program. Sun RPC RPC. February 9+11, 2005

Lecture 12 RPC RPC RPC. Writing an RPC Program. Sun RPC RPC. February 9+11, 2005 RPC Lecture 12 RPC February 9+11, 2005 Remote Procedure Call Follows application-oriented approach (emphasizes problem over communication) Design program and then divide it. RPC RPC There exists a way

More information

RPC Paradigm. Lenuta Alboaie Andrei Panu

RPC Paradigm. Lenuta Alboaie Andrei Panu RPC Paradigm Lenuta Alboaie (adria@info.uaic.ro) Andrei Panu (andrei.panu@info.uaic.ro) 1 Content Remote Procedure Call (RPC) Preliminaries Characteristics XDR (External Data Representation) Functioning

More information

Data Storage. August 9, Indiana University. Geoffrey Brown, Bryce Himebaugh 2015 August 9, / 19

Data Storage. August 9, Indiana University. Geoffrey Brown, Bryce Himebaugh 2015 August 9, / 19 Data Storage Geoffrey Brown Bryce Himebaugh Indiana University August 9, 2016 Geoffrey Brown, Bryce Himebaugh 2015 August 9, 2016 1 / 19 Outline Bits, Bytes, Words Word Size Byte Addressable Memory Byte

More information

This appendix lists the XDR library calls in UNIX-style manual page format.

This appendix lists the XDR library calls in UNIX-style manual page format. A P P E N D I X B XDR Manual Pages This appendix lists the XDR library calls in UNIX-style manual page format. XDR Library Calls The XDR library calls are listed in alphabetical order. Following a brief

More information

Transport Layer. The transport layer is responsible for the delivery of a message from one process to another. RSManiaol

Transport Layer. The transport layer is responsible for the delivery of a message from one process to another. RSManiaol Transport Layer Transport Layer The transport layer is responsible for the delivery of a message from one process to another Types of Data Deliveries Client/Server Paradigm An application program on the

More information

Operating Systems. 18. Remote Procedure Calls. Paul Krzyzanowski. Rutgers University. Spring /20/ Paul Krzyzanowski

Operating Systems. 18. Remote Procedure Calls. Paul Krzyzanowski. Rutgers University. Spring /20/ Paul Krzyzanowski Operating Systems 18. Remote Procedure Calls Paul Krzyzanowski Rutgers University Spring 2015 4/20/2015 2014-2015 Paul Krzyzanowski 1 Remote Procedure Calls 2 Problems with the sockets API The sockets

More information

Networked Applications: Sockets. Goals of Todayʼs Lecture. End System: Computer on the ʻNet. Client-server paradigm End systems Clients and servers

Networked Applications: Sockets. Goals of Todayʼs Lecture. End System: Computer on the ʻNet. Client-server paradigm End systems Clients and servers Networked Applications: Sockets CS 375: Computer Networks Spring 2009 Thomas Bressoud 1 Goals of Todayʼs Lecture Client-server paradigm End systems Clients and servers Sockets and Network Programming Socket

More information

Overview. Exercise 0: Implementing a Client. Setup and Preparation

Overview. Exercise 0: Implementing a Client. Setup and Preparation Overview This Lab assignment is similar to the previous one, in that you will be implementing a simple clientserver protocol. There are several differences, however. This time you will use the SOCK_DGRAM

More information

Socket Programming for TCP and UDP

Socket Programming for TCP and UDP CSCI4430 Data Communication and Computer Networks Socket Programming for TCP and UDP ZHANG, Mi Jan. 19, 2017 Outline Socket Programming for TCP Introduction What is TCP What is socket TCP socket programming

More information

Last Class: RPCs. Today:

Last Class: RPCs. Today: Last Class: RPCs RPCs make distributed computations look like local computations Issues: Parameter passing Binding Failure handling Lecture 4, page 1 Today: Case Study: Sun RPC Lightweight RPCs Remote

More information

Distributed Systems Theory 4. Remote Procedure Call. October 17, 2008

Distributed Systems Theory 4. Remote Procedure Call. October 17, 2008 Distributed Systems Theory 4. Remote Procedure Call October 17, 2008 Client-server model vs. RPC Client-server: building everything around I/O all communication built in send/receive distributed computing

More information

Interprocess Communication Mechanisms

Interprocess Communication Mechanisms Interprocess Communication 1 Interprocess Communication Mechanisms shared storage These mechanisms have already been covered. examples: shared virtual memory shared files processes must agree on a name

More information

shared storage These mechanisms have already been covered. examples: shared virtual memory message based signals

shared storage These mechanisms have already been covered. examples: shared virtual memory message based signals Interprocess Communication 1 Interprocess Communication Mechanisms shared storage These mechanisms have already been covered. examples: shared virtual memory shared files processes must agree on a name

More information

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition ELEC / COMP 177 Fall 2014 Some slides from Kurose and Ross, Computer Networking, 5 th Edition Project #1 Starts in one week Is your Linux environment all ready? Bring your laptop Work time after quick

More information

Remote Procedure Calls (RPC)

Remote Procedure Calls (RPC) Distributed Computing Remote Procedure Calls (RPC) Dr. Yingwu Zhu Problems with Sockets Sockets interface is straightforward [connect] read/write [disconnect] BUT it forces read/write mechanism We usually

More information

Remote Procedure Call

Remote Procedure Call Remote Procedure Call Timeline Blocked Outline Protocol Stack Presentation Formatting Blocked Computing Blocked Spring 25 CS 461 1 Spring 25 CS 461 2 RCP Components Protocol Stack BLAST: fragments and

More information

Chapter 3: Client-Server Paradigm and Middleware

Chapter 3: Client-Server Paradigm and Middleware 1 Chapter 3: Client-Server Paradigm and Middleware In order to overcome the heterogeneity of hardware and software in distributed systems, we need a software layer on top of them, so that heterogeneity

More information

Remote Procedure Call (RPC) and Transparency

Remote Procedure Call (RPC) and Transparency Remote Procedure Call (RPC) and Transparency Brad Karp UCL Computer Science CS GZ03 / M030 10 th October 2014 Transparency in Distributed Systems Programmers accustomed to writing code for a single box

More information

CSMC 412. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala Set 2. September 15 CMSC417 Set 2 1

CSMC 412. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala Set 2. September 15 CMSC417 Set 2 1 CSMC 412 Computer Networks Prof. Ashok K Agrawala 2015 Ashok Agrawala Set 2 September 15 CMSC417 Set 2 1 Contents Client-server paradigm End systems Clients and servers Sockets Socket abstraction Socket

More information

Socket Programming. #In the name of Allah. Computer Engineering Department Sharif University of Technology CE443- Computer Networks

Socket Programming. #In the name of Allah. Computer Engineering Department Sharif University of Technology CE443- Computer Networks #In the name of Allah Computer Engineering Department Sharif University of Technology CE443- Computer Networks Socket Programming Acknowledgments: Lecture slides are from Computer networks course thought

More information

Inspirel. YAMI4 Requirements. For YAMI4Industry, v page 1

Inspirel. YAMI4 Requirements. For YAMI4Industry, v page 1 YAMI4 Requirements For YAMI4Industry, v.1.3.1 www.inspirel.com info@inspirel.com page 1 Table of Contents Document scope...3 Architectural elements...3 Serializer...3 Socket...3 Input buffer...4 Output

More information

CS 417 9/18/17. Paul Krzyzanowski 1. Socket-based communication. Distributed Systems 03. Remote Procedure Calls. Sample SMTP Interaction

CS 417 9/18/17. Paul Krzyzanowski 1. Socket-based communication. Distributed Systems 03. Remote Procedure Calls. Sample SMTP Interaction Socket-based communication Distributed Systems 03. Remote Procedure Calls Socket API: all we get from the to access the network Socket = distinct end-to-end communication channels Read/write model Line-oriented,

More information

Distributed Systems. 03. Remote Procedure Calls. Paul Krzyzanowski. Rutgers University. Fall 2017

Distributed Systems. 03. Remote Procedure Calls. Paul Krzyzanowski. Rutgers University. Fall 2017 Distributed Systems 03. Remote Procedure Calls Paul Krzyzanowski Rutgers University Fall 2017 1 Socket-based communication Socket API: all we get from the OS to access the network Socket = distinct end-to-end

More information

APPENDIX F THE TCP/IP PROTOCOL ARCHITECTURE

APPENDIX F THE TCP/IP PROTOCOL ARCHITECTURE APPENDIX F THE TCP/IP PROTOCOL ARCHITECTURE William Stallings F.1 TCP/IP LAYERS... 2 F.2 TCP AND UDP... 4 F.3 OPERATION OF TCP/IP... 6 F.4 TCP/IP APPLICATIONS... 10 Copyright 2014 Supplement to Computer

More information

Memory-Mapped Files. generic interface: vaddr mmap(file descriptor,fileoffset,length) munmap(vaddr,length)

Memory-Mapped Files. generic interface: vaddr mmap(file descriptor,fileoffset,length) munmap(vaddr,length) File Systems 38 Memory-Mapped Files generic interface: vaddr mmap(file descriptor,fileoffset,length) munmap(vaddr,length) mmap call returns the virtual address to which the file is mapped munmap call unmaps

More information

Overview. Exercise 0: Implementing a Client. Setup and Preparation

Overview. Exercise 0: Implementing a Client. Setup and Preparation Overview This Lab assignment is similar to the previous one, in that you will be implementing a simple client server protocol. There are several differences, however. This time you will use the SOCK_DGRAM

More information

Short Notes of CS201

Short Notes of CS201 #includes: Short Notes of CS201 The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with < and > if the file is a system

More information

TILE PROCESSOR APPLICATION BINARY INTERFACE

TILE PROCESSOR APPLICATION BINARY INTERFACE MULTICORE DEVELOPMENT ENVIRONMENT TILE PROCESSOR APPLICATION BINARY INTERFACE RELEASE 4.2.-MAIN.1534 DOC. NO. UG513 MARCH 3, 213 TILERA CORPORATION Copyright 212 Tilera Corporation. All rights reserved.

More information

CS201 - Introduction to Programming Glossary By

CS201 - Introduction to Programming Glossary By CS201 - Introduction to Programming Glossary By #include : The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with

More information

Chapter Motivation For Internetworking

Chapter Motivation For Internetworking Chapter 17-20 Internetworking Part 1 (Concept, IP Addressing, IP Routing, IP Datagrams, Address Resolution 1 Motivation For Internetworking LANs Low cost Limited distance WANs High cost Unlimited distance

More information

UNIX Sockets. COS 461 Precept 1

UNIX Sockets. COS 461 Precept 1 UNIX Sockets COS 461 Precept 1 Socket and Process Communica;on application layer User Process Socket transport layer (TCP/UDP) OS network stack network layer (IP) link layer (e.g. ethernet) Internet Internet

More information

CCNA R&S: Introduction to Networks. Chapter 7: The Transport Layer

CCNA R&S: Introduction to Networks. Chapter 7: The Transport Layer CCNA R&S: Introduction to Networks Chapter 7: The Transport Layer Frank Schneemann 7.0.1.1 Introduction 7.0.1.2 Class Activity - We Need to Talk Game 7.1.1.1 Role of the Transport Layer The primary responsibilities

More information

Chapter 4. Internet Applications

Chapter 4. Internet Applications Chapter 4 Internet Application Protocols 1 Internet Applications! Domain Name System! Electronic mail! Remote login! File transfer! World Wide Web! All use client-server model 2 Names! Internet communication

More information

End-to-End Data. Presentation Formatting. Difficulties. Outline Formatting Compression

End-to-End Data. Presentation Formatting. Difficulties. Outline Formatting Compression End-to-End Data Outline Formatting Compression Spring 2009 CSE30264 1 Presentation Formatting Marshalling (encoding) application data into messages Unmarshalling (decoding) messages into application data

More information

UNIT IV- SOCKETS Part A

UNIT IV- SOCKETS Part A 1. Define sockets - SOCKETS Part A A socket is a construct to provide a communication between computers. It hides the underlying networking concepts and provides us with an interface to communicate between

More information

Remote Invocation. Today. Next time. l Overlay networks and P2P. l Request-reply, RPC, RMI

Remote Invocation. Today. Next time. l Overlay networks and P2P. l Request-reply, RPC, RMI Remote Invocation Today l Request-reply, RPC, RMI Next time l Overlay networks and P2P Types of communication " Persistent or transient Persistent A submitted message is stored until delivered Transient

More information

CMSC 417 Project Implementation of ATM Network Layer and Reliable ATM Adaptation Layer

CMSC 417 Project Implementation of ATM Network Layer and Reliable ATM Adaptation Layer CMSC 417 Project Implementation of ATM Network Layer and Reliable ATM Adaptation Layer 1. Introduction In this project you are required to implement an Asynchronous Transfer Mode (ATM) network layer and

More information

Lecture 8: February 19

Lecture 8: February 19 CMPSCI 677 Operating Systems Spring 2013 Lecture 8: February 19 Lecturer: Prashant Shenoy Scribe: Siddharth Gupta 8.1 Server Architecture Design of the server architecture is important for efficient and

More information

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

Transport Layer. Gursharan Singh Tatla.   Upendra Sharma. 1 Transport Layer Gursharan Singh Tatla mailme@gursharansingh.in Upendra Sharma 1 Introduction The transport layer is the fourth layer from the bottom in the OSI reference model. It is responsible for message

More information

ECE4110 Internetwork Programming. Introduction and Overview

ECE4110 Internetwork Programming. Introduction and Overview ECE4110 Internetwork Programming Introduction and Overview 1 EXAMPLE GENERAL NETWORK ALGORITHM Listen to wire Are signals detected Detect a preamble Yes Read Destination Address No data carrying or noise?

More information

Don Libes. National Institute of Standards and Technology Gaithersburg, MD ABSTRACT

Don Libes. National Institute of Standards and Technology Gaithersburg, MD ABSTRACT Packet-oriented Communication Using a Stream Protocol or Making TCP/IP on Berkeley UNIX a little more pleasant to use Don Libes National Institute of Standards and Technology Gaithersburg, MD 20899 ABSTRACT

More information

Chapter 11: Implementing File-Systems

Chapter 11: Implementing File-Systems Chapter 11: Implementing File-Systems Chapter 11 File-System Implementation 11.1 File-System Structure 11.2 File-System Implementation 11.3 Directory Implementation 11.4 Allocation Methods 11.5 Free-Space

More information

Socket Programming. CSIS0234A Computer and Communication Networks. Socket Programming in C

Socket Programming. CSIS0234A Computer and Communication Networks. Socket Programming in C 1 CSIS0234A Computer and Communication Networks Socket Programming in C References Beej's Guide to Network Programming Official homepage: http://beej.us/guide/bgnet/ Local mirror http://www.cs.hku.hk/~c0234a/bgnet/

More information

CS 465 Networks. Disassembling Datagram Headers

CS 465 Networks. Disassembling Datagram Headers CS 465 Networks Disassembling Datagram Headers School of Computer Science Howard Hughes College of Engineering University of Nevada, Las Vegas (c) Matt Pedersen, 2006 Recall the first 5x4 octets of the

More information

NFS Design Goals. Network File System - NFS

NFS Design Goals. Network File System - NFS Network File System - NFS NFS Design Goals NFS is a distributed file system (DFS) originally implemented by Sun Microsystems. NFS is intended for file sharing in a local network with a rather small number

More information

UNIX Sockets. Developed for the Azera Group By: Joseph D. Fournier B.Sc.E.E., M.Sc.E.E.

UNIX Sockets. Developed for the Azera Group By: Joseph D. Fournier B.Sc.E.E., M.Sc.E.E. UNIX Sockets Developed for the Azera Group By: Joseph D. Fournier B.Sc.E.E., M.Sc.E.E. Socket and Process Communication application layer User Process Socket transport layer (TCP/UDP) network layer (IP)

More information

Overview. Setup and Preparation. Exercise 0: Four-way handshake

Overview. Setup and Preparation. Exercise 0: Four-way handshake Overview In this Lab assignment you will develop a simple client program written in Python(use a socket library) to interact with a CSE 3300 Server running on a remote machine. The server, running on the

More information

CIS 1.5 Course Objectives. a. Understand the concept of a program (i.e., a computer following a series of instructions)

CIS 1.5 Course Objectives. a. Understand the concept of a program (i.e., a computer following a series of instructions) By the end of this course, students should CIS 1.5 Course Objectives a. Understand the concept of a program (i.e., a computer following a series of instructions) b. Understand the concept of a variable

More information

Business Data Networks and Security 10th Edition by Panko Test Bank

Business Data Networks and Security 10th Edition by Panko Test Bank Business Data Networks and Security 10th Edition by Panko Test Bank Chapter 2 Network Standards 1) Internet standards are published as. A) RFCs B) IETFs C) TCP/IPs D) Internet Protocols Question: 1a Objective:

More information

Data and Computer Communications. Protocols and Architecture

Data and Computer Communications. Protocols and Architecture Data and Computer Communications Protocols and Architecture Characteristics Direct or indirect Monolithic or structured Symmetric or asymmetric Standard or nonstandard Means of Communication Direct or

More information

MARSHALLING IN DISTRIBUTED SYSTEMS: TWO APPROACHES

MARSHALLING IN DISTRIBUTED SYSTEMS: TWO APPROACHES 1 of 15 MARSHALLING IN DISTRIBUTED SYSTEMS: TWO APPROACHES K.V. Dyshlevoi, V.E. Kamensky, L.B. Solovskaya In distributed system different modules can use different representations for the same data. To

More information

CS11 C++ DGC. Spring Lecture 6

CS11 C++ DGC. Spring Lecture 6 CS11 C++ DGC Spring 2006-2007 Lecture 6 The Spread Toolkit A high performance, open source messaging service Provides message-based communication Point-to-point messaging Group communication (aka broadcast

More information

Computer Networks Prof. Ashok K. Agrawala

Computer Networks Prof. Ashok K. Agrawala CMSC417 Computer Networks Prof. Ashok K. Agrawala 2018Ashok Agrawala September 6, 2018 Fall 2018 Sept 6, 2018 1 Overview Client-server paradigm End systems Clients and servers Sockets Socket abstraction

More information

Distributed Program Design Typical Sockets Approach. Remote Procedure Call. Remote Subroutine

Distributed Program Design Typical Sockets Approach. Remote Procedure Call. Remote Subroutine Distributed Program Design Typical Sockets Approach Communication-Oriented Design Design protocol first. Build programs that adhere to the protocol. Application-Oriented Design Build application(s). Divide

More information

Examination 2D1392 Protocols and Principles of the Internet 2G1305 Internetworking 2G1507 Kommunikationssystem, fk SOLUTIONS

Examination 2D1392 Protocols and Principles of the Internet 2G1305 Internetworking 2G1507 Kommunikationssystem, fk SOLUTIONS Examination 2D1392 Protocols and Principles of the Internet 2G1305 Internetworking 2G1507 Kommunikationssystem, fk Date: January 17 th 2006 at 14:00 18:00 SOLUTIONS 1. General (5p) a) Draw the layered

More information

NETWORK AND SYSTEM PROGRAMMING

NETWORK AND SYSTEM PROGRAMMING NETWORK AND SYSTEM PROGRAMMING LAB 09 Network Byte Ordering, inet_aton, inet_addr, inet_ntoa Functions Objectives: To learn byte order conversion To understand inet-aton, inet_addr, inet_ntoa Functions

More information

Chapter 2 Applications and

Chapter 2 Applications and Chapter 2 Applications and Layered Architectures Sockets Socket API API (Application Programming Interface) Provides a standard set of functions that can be called by applications Berkeley UNIX Sockets

More information

Design and Evaluation of a Socket Emulator for Publish/Subscribe Networks

Design and Evaluation of a Socket Emulator for Publish/Subscribe Networks PUBLISHED IN: PROCEEDINGS OF THE FUTURE INTERNET SYMPOSIUM 2010 1 Design and Evaluation of a for Publish/Subscribe Networks George Xylomenos, Blerim Cici Mobile Multimedia Laboratory & Department of Informatics

More information

The Data Link Layer. 32 PART I Networking Basics

The Data Link Layer. 32 PART I Networking Basics 32 PART I Networking Basics weather station. More realistic devices use duplex mode, where all systems can send or receive with equal facility. This is often further distinguished as half-duplex (the system

More information

The OSI Model. Open Systems Interconnection (OSI). Developed by the International Organization for Standardization (ISO).

The OSI Model. Open Systems Interconnection (OSI). Developed by the International Organization for Standardization (ISO). Network Models The OSI Model Open Systems Interconnection (OSI). Developed by the International Organization for Standardization (ISO). Model for understanding and developing computer-to-computer communication

More information

CN1047 INTRODUCTION TO COMPUTER NETWORKING CHAPTER 6 OSI MODEL TRANSPORT LAYER

CN1047 INTRODUCTION TO COMPUTER NETWORKING CHAPTER 6 OSI MODEL TRANSPORT LAYER CN1047 INTRODUCTION TO COMPUTER NETWORKING CHAPTER 6 OSI MODEL TRANSPORT LAYER Transport Layer The Transport layer ensures the reliable arrival of messages and provides error checking mechanisms and data

More information

EECS 482 Introduction to Operating Systems

EECS 482 Introduction to Operating Systems EECS 482 Introduction to Operating Systems Fall 2017 Manos Kapritsos Slides by: Harsha V. Madhyastha Recap: Socket abstraction Machine 1 Machine 2 Process A Process B Process C socket 1 socket 2 socket

More information

University of California at Berkeley April 1984

University of California at Berkeley April 1984 Network Working Group Request for Comments: 893 Samuel J. Leffler Michael J. Karels University of California at Berkeley April 1984 Trailer Encapsulations Status of this Memo This RFC discusses the motivation

More information

PART X. Internetworking Part 1. (Concept, IP Addressing, IP Routing, IP Datagrams, Address Resolution)

PART X. Internetworking Part 1. (Concept, IP Addressing, IP Routing, IP Datagrams, Address Resolution) PART X Internetworking Part 1 (Concept, IP Addressing, IP Routing, IP Datagrams, Address Resolution) CS422 Part 10 1 Spring 1999 Motivation For Internetworking LANs Low cost Limited distance WANs High

More information

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files CSC209 Review CSC209: Software tools Unix files and directories permissions utilities/commands Shell programming quoting wild cards files ... and systems programming C basic syntax functions arrays structs

More information

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files. Compiler vs.

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files. Compiler vs. CSC209 Review CSC209: Software tools Unix files and directories permissions utilities/commands Shell programming quoting wild cards files... and systems programming C basic syntax functions arrays structs

More information

CS321: Computer Networks Introduction to Application Layer

CS321: Computer Networks Introduction to Application Layer CS321: Computer Networks Introduction to Application Layer Dr. Manas Khatua Assistant Professor Dept. of CSE IIT Jodhpur E-mail: manaskhatua@iitj.ac.in Basic Application layer provides services to the

More information

CSCI-1680 RPC and Data Representation John Jannotti

CSCI-1680 RPC and Data Representation John Jannotti CSCI-1680 RPC and Data Representation John Jannotti Original Slides from Rodrigo Fonseca Today Defining Protocols RPC IDL Problem Two programs want to communicate: must define the protocol We have seen

More information

CSCI-1680 RPC and Data Representation. Rodrigo Fonseca

CSCI-1680 RPC and Data Representation. Rodrigo Fonseca CSCI-1680 RPC and Data Representation Rodrigo Fonseca Administrivia TCP: talk to the TAs if you still have questions! ursday: HW3 out Final Project (out 4/21) Implement a WebSockets server an efficient

More information

Tufts COMP 150-IDS Test #1

Tufts COMP 150-IDS Test #1 October 3, 2012 Student name: Login: Tufts COMP 150-IDS Test #1 This test is closed book. In most cases, answers of no more than 2-3 sentences should be sufficient. If you need more space or need to cross

More information

EE 610 Part 2: Encapsulation and network utilities

EE 610 Part 2: Encapsulation and network utilities EE 610 Part 2: Encapsulation and network utilities Objective: After this experiment, the students should be able to: i. Understand the format of standard frames and packet headers. Overview: The Open Systems

More information

A Client-Server Exchange

A Client-Server Exchange Socket programming A Client-Server Exchange A server process and one or more client processes Server manages some resource. Server provides service by manipulating resource for clients. 1. Client sends

More information

Outline. EEC-681/781 Distributed Computing Systems. The OSI Network Architecture. Inter-Process Communications (IPC) Lecture 4

Outline. EEC-681/781 Distributed Computing Systems. The OSI Network Architecture. Inter-Process Communications (IPC) Lecture 4 EEC-681/781 Distributed Computing Systems Lecture 4 Department of Electrical and Computer Engineering Cleveland State University wenbing@ieee.org Outline Inter-process communications Computer networks

More information

Computer Networks and reference models. 1. List of Problems (so far)

Computer Networks and reference models. 1. List of Problems (so far) Computer s and reference models Chapter 2 1. List of Problems (so far) How to ensure connectivity between users? How to share a wire? How to pass a message through the network? How to build Scalable s?

More information

A Fast Review of C Essentials Part I

A Fast Review of C Essentials Part I A Fast Review of C Essentials Part I Structural Programming by Z. Cihan TAYSI Outline Program development C Essentials Functions Variables & constants Names Formatting Comments Preprocessor Data types

More information

Java Oriented Object Programming II Files II - Binary I/O Lesson 3

Java Oriented Object Programming II Files II - Binary I/O Lesson 3 Java Oriented Object Programming II Files II - Binary I/O Lesson 3 The objectives in this lesson are: Convert Binary to Hexadecimals (vice versa) Understand Binary Code Use Hex Editors Explain how Streams

More information

Chapter 9: UDP sockets & address conversion function

Chapter 9: UDP sockets & address conversion function Chapter 9: UDP sockets & address conversion function 9.1 Elementary UDP sockets:- Introduction to UDP sockets UDP is connectionless, unreliable, datagram protocol TCP is connection-oriented, reliable byte

More information

Simulation of TCP Layer

Simulation of TCP Layer 39 Simulation of TCP Layer Preeti Grover, M.Tech, Computer Science, Uttrakhand Technical University, Dehradun ABSTRACT The Transmission Control Protocol (TCP) represents the most deployed transport protocol

More information

CS321: Computer Networks Socket Programming

CS321: Computer Networks Socket Programming CS321: Computer Networks Socket Programming Dr. Manas Khatua Assistant Professor Dept. of CSE IIT Jodhpur E-mail: manaskhatua@iitj.ac.in Socket Programming It shows how the network application programs

More information

Computer Networks A Simple Network Analyzer Decoding Ethernet and IP headers

Computer Networks A Simple Network Analyzer Decoding Ethernet and IP headers Computer Networks A Simple Network Analyzer Decoding Ethernet and IP headers Objectives The main objective of this assignment is to gain an understanding of network activities and network packet formats

More information

Chapter 7 Transport Layer. 7.0 Introduction 7.1 Transport Layer Protocols 7.2 TCP and UDP 7.3 Summary

Chapter 7 Transport Layer. 7.0 Introduction 7.1 Transport Layer Protocols 7.2 TCP and UDP 7.3 Summary Chapter 7 Transport Layer 7.0 Introduction 7.1 Transport Layer Protocols 7.2 TCP and UDP 7.3 Summary Transport Layer Transportation of Data Role of the Transport Layer The transport layer is responsible

More information

Transport Layer. <protocol, local-addr,local-port,foreign-addr,foreign-port> ϒ Client uses ephemeral ports /10 Joseph Cordina 2005

Transport Layer. <protocol, local-addr,local-port,foreign-addr,foreign-port> ϒ Client uses ephemeral ports /10 Joseph Cordina 2005 Transport Layer For a connection on a host (single IP address), there exist many entry points through which there may be many-to-many connections. These are called ports. A port is a 16-bit number used

More information

CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF MCA QUESTION BANK UNIT 1

CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF MCA QUESTION BANK UNIT 1 CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF MCA QUESTION BANK SUBJECT: NETWORK PROGRAMMING/MC9241 YEAR/ SEM: II /I V 1 CCET UNIT 1 1. What are the steps involved in obtaining a shared

More information

CS-461 Internetworking. Dr. Mohamed Aboutabl

CS-461 Internetworking. Dr. Mohamed Aboutabl CS-461 Internetworking Dr. Mohamed Aboutabl http://www.cs.jmu.edu/users/aboutams The McGraw-Hill Companies, Inc., 2000 1 Chapter 1 Introduction The McGraw-Hill Companies, Inc., 2000 2 Internet today Network

More information

Concurrent Server Design Multiple- vs. Single-Thread

Concurrent Server Design Multiple- vs. Single-Thread Concurrent Server Design Multiple- vs. Single-Thread Chuan-Ming Liu Computer Science and Information Engineering National Taipei University of Technology Fall 2007, TAIWAN NTUT, TAIWAN 1 Examples Using

More information

Interprocess Communication

Interprocess Communication Interprocess Communication Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5 Introduction Applications, services

More information

Lecture 8. Network Layer (cont d) Network Layer 1-1

Lecture 8. Network Layer (cont d) Network Layer 1-1 Lecture 8 Network Layer (cont d) Network Layer 1-1 Agenda The Network Layer (cont d) What is inside a router Internet Protocol (IP) IPv4 fragmentation and addressing IP Address Classes and Subnets Network

More information

Key Points for the Review

Key Points for the Review Key Points for the Review Network Basics What is internet and Internet? Does WWW equal to Internet? How do machines communicate with one another on the Internet? What are the major components of Internet?

More information

Thrift specification - Remote Procedure Call

Thrift specification - Remote Procedure Call Erik van Oosten Revision History Revision 1.0 2016-09-27 EVO Initial version v1.1, 2016-10-05: Corrected integer type names. Small changes to section headers. Table of Contents 1.

More information

Group-A Assignment No. 6

Group-A Assignment No. 6 Group-A Assignment No. 6 R N Oral Total Dated Sign (2) (5) (3) (10) Title : File Transfer using TCP Socket Problem Definition: Use Python for Socket Programming to connect two or more PCs to share a text

More information