Chapter 3: Client-Server Paradigm and Middleware

Size: px
Start display at page:

Download "Chapter 3: Client-Server Paradigm and Middleware"

Transcription

1 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 is transparent to the application programmers. This layer is commonly called the middleware. See Figures 2.1, 4.1, and 5.1 in the Textbook. The lower part of this layer (see Figure 4.1) commonly starts with the interface to the Internet transport protocols, TCP (for streams) and UDP (for datagrams), and deals with standard data representations on transport connections. The upper part of middleware is concerned with facilitating intercommunication among applications on different platforms, and provides remote method invocation (RMI), remote procedure call (RPC), and other services such as naming, transaction management, security, etc. In this chapter we will discuss several important issues related to middleware, such as how to construct servers, how to request service, and how to locate servers. In particular, we will consider in some detail RPC, Java RMI, failures and service guarantees, stateless server, naming and name lookup service, Internet DNS (Domain Name System), etc. 3.1 Server Structures If a single server thread performs the service requested by many clients sequentially, then responses may be slow: For example, while it is blocked on reading a file for a client, all other clients must wait. To improve the response time, we may want to implement a multithreaded server. We can construct a server from a listener thread and a set of worker threads. The listener may act as a scheduler as well. (See Figure 1.) Incoming requests Listener/ scheduler Worker Message buffers Worker Worker Monitor Shared memory Figure 1: A server structure. Design choices: (a) A single server thread. If the service requires little time (e.g., a time server), or if there is no parallelism

2 CMPT401 Chapter 3, Summer 04 2 possible (i.e., no I/O operation is involved and there aren t multiple processors) in the server, then this may be the most appropriate choice. (b) A listener and a fixed number of workers. Received requests are stored in a request list. Each worker checks the list, removes one request from it, processes it, and returns a reply to the client s port specified in the request message. If the list is empty, the worker idles, waiting for a new request to arrive. When a request arrives, the listener stores it in the list and wakes up one of the waiting workers, if any. There is no overhead for creating/destroying threads, but if there are more requests than threads, some requests must wait. Also, resources (allocated to workers) are tied up even if fewer requests are being processed than the available workers. (c) A listener and a dynamically created set of workers (multiple threads). On receiving a request message, the listener forks a worker thread and hands the request to it. On completion, the worker dies. There is no need for the shared list, since each request is handed immediately to a new thread. Thus, there is no need to implement mutual exclusion (for accessing a shared list). May be preferable to (b) if the cost (delay) of creating/destroying a worker is small. Example 1: Disk server (low-level). It is desirable to have one listener/scheduler and one worker. Each request contains the cylinder number, surface number and the block numbers within the track. The listener puts a new request into a list or queue, based on the disk scheduling algorithm adopted. After servicing the current request, the worker checks the list for the next client request to be serviced. This is a special case of case (b) above with only one worker. In this example, there is no point having more than one worker thread, since the disk operation is sequential. However, a separate listener/scheduler can schedule the pending requests, say, according to their tack numbers. Example 2: Unix inetd daemon: The Internet super-server, inetd, is invoked at boot time. It consults the file /etc/inetd.conf (which is a subset of /etc/services), and creates one socket for each service and binds the appropriate port number to it. 1 inetd then invokes select on all these socket descriptors for read availability. select(int nfds, *readfds, *writefds, *timeout), where nfds is the number of file descriptors being selected, and readfds is a pointer to a file descriptor set (a bit pattern). The bit corresponding file descriptor (of a socket, e.g.) of interest is set to 1. On return from a call, it is replaced (overwritten) by a bit pattern indicating those file descriptors that are ready for input operation. 2 timeout points to a value specifying how long waiting should last; if it s 0, the call is non-blocking (returns immediately). When select indicates activity on a descriptor, inetd invokes accept on it and forks a new server process on the new descriptor returned by accept, 3 upon which it 1 Before BSD 4.2, there was a separate daemon for each service. 2 writefds is relevant for output operations that are ready, e.g., the window server in the next example. See the man page for select. 3 It dup s the new socket to file descriptors 0 and 1 (stdin and stdout) and exec s the appropriate server.

3 CMPT401 Chapter 3, Summer 04 3 proceeds to do select again. The new server process is the server daemon specified in the last field of each line in /etc/inetd.conf. port service type protocol userid daemon 21 ftp stream tcp nowait root /usr/etc/in.ftpd 23 telnet stream tcp nowait root /usr/etc/in.telnetd 37 time dgram udp wait root internal (inetd itself) 80 http stream tcp nowait root /usr/etc/in.httpd 513 login stream tcp nowait root /usr/etc/in.rlogind 514 shell stream tcp nowait root /usr/etc/in.rshd 517 talk dgram udp nowait root /usr/etc/in.talkd wait in the above table means the next request must wait, because inetd itself serves the current request. So, this server structure is a combination of the design choices (a) and (c) above. The second last column specifies the uid that the server process is to be run as, so that it has the required privileges. login, shell, and talk in the above table are only for Unix systems. Example 3: Window servers: A window is an area of a screen that is connected with a local (or remote) application. A window server manages a window, providing operations such as graphical display, pointing, dragging, zooming, menu selection, etc. The X Window was developed at MIT around It uses the X Protocol, which is device- and networkindependent and is a de facto standard for Unix-based systems. The X Protocol has been implemented on TCP/IP, Ethernet, token ring, and many other data link protocols. The X Window system includes Xlib, a library of graphics and windowing routines, which must be linked with client applications. Other examples of window servers are Apple Macintosh interface and Microsoft Windows. A single X Window server may manage several windows for its clients, which are application processes. The server issues select (see the previous example) to constantly watch the events on the keyboard and the mouse. If the event detected is right mouse button down, for example, a thread is created which calls menu display, passing the menu structure, depending on the window to which the mouse is pointing. This procedure pops up the menu and highlights items as the user moves the cursor. The thread then executes the selected command. 3.2 RPC Suppose that a procedure a user wants to call is not locally available for some reason, such as lack of resources needed. It is convenient to make the semantics of communication between remote programs as similar as possible to a normal procedure call (something familiar to and well-understood by many programmers). See Fig. 2. Hence the name remote procedure call (RPC). The client program makes a normal procedure call, say, proc(a,b), with the intention of invoking the remote procedure proc( ) on some other machine. From the client s point of view, this looks just like calling a (local) procedure and then waiting for it to return. 4 This level of abstraction relieves the application programmer of the concern 4 In Mach, for example, msg rpc() invoked by a client blocks until a reply returns, reducing the number of operations that the client need to invoke from two (a send followed by a receive) to one.

4 CMPT401 Chapter 3, Summer 04 4 Program Procedure i = sum(3,8) sum(j,k) int j,k; { return j+k; } Local Procedure Call CLIENT PROCESS i = sum(3,8) SERVER PROCESS sum(j,k) int j,k; { return j+k; } sum 3 8 sum 3 8 Client Machine Server Machine Remote Procedure Call Figure 2: Local and remote procedure calls. for data transmission and communication protocols. We will now discuss how to implement RPCs. If an RPC is used in a client program, the linker links a library procedure called the client stub, which is executed as a part of the client process. See Fig. 3. The client stub 1. composes a message (containing the procedure id 5 and the parameters) to be sent to the server, 2. sends the message to the server and waits by a blocking receive (or a single combined call, e.g., msg rpc in Mach), and 3. delivers the returned result to the calling program. The server stub on the server machine 1. extracts the procedure id and the input parameters, 2. invokes the called procedure with these parameters, using the standard (local) procedure call, 3. composes a reply message, and 4. sends it back to the client process Implementation Issues 5 Each procedure in an interface (see 3.3.2) has a unique id, e.g., 0, 1, 2,....

5 CMPT401 Chapter 3, Summer 04 5 User level Client stub Return CLIENT PROCESS Program Call Call SERVER PROCESS Procedure Unpack Pack Invisible Unpack result para s para s to the user Pack result Return Server stub Kernel Client machine Server machine Figure 3: Client and server stubs. 1. Data format conversion: If the client and the server platforms are different, data format conversion is necessary. As mentioned in Chapter 1, Intel machines use the little endian representation, while Sun workstations use the big endian representation. At a higher, language level, an array, for example, may be stored differently (row-major or column-major form) in the client s program and the remote procedure. To facilitate data format conversion, Sun developed the external Data Representation (XDR) as the standard data representation used in Sun s Network File System, NFS. The sender represents the parameters in XDR, and the receiver converts them back to the local representation. CORBA (Common Object Request Broker Architecture) uses CDR (Common Data Representation, see Text 4.3.1). 2. Marshalling (also called serialization or flattening) and unmarshalling (deserialization): The procedure name and parameters are marshalled by the sender and unmarshalled or deserialized by the receiver. For serialization operations in CORBA and Java, see Text Name server: How do you find the server that can run the procedure in question? The SUN portmapper with a well-known address (port=111 on each machine) maintains a list of registered servers and their port numbers. More general name servers (e.g., DNS) will be discussed in a later section Interface Definition Informally, the boundary between two interacting objects is called an interface. The interface between a car and the driver consists of the steering wheel, directional signal lever, the gear lever, etc. The protocol corresponds to the rules on how to operate them. The interface between the terminal user and the computer system is the screen, the keyboard and mouse and the signals exchanged between them. The interface between the application programmer and the OS is the system calls, including the name of operation, the parameters, etc.

6 CMPT401 Chapter 3, Summer 04 6 In the present context, we are interested in the RPC interface between clients and the server that executes procedures on their behalf. It is important to note that the interface can be defined independently of the implementation of the objects involved. An RPC interface consists of: 1. the service (or interface) identifier 2. list of procedure names and the order and types of their parameters, and 3. type definitions and constant declarations. Here is a simplified example. program FILESERVER{ version VERSION { Data READ(readargs) =1; //proc. 1 void WRITE(writeargs) =2; //proc. 2 }=2; //version no. }=1234; //program no. An (RPC) interface definition language (IDL) is often an addition to a conventional programming language, providing a formal way of defining interfaces. The interface definition is preprocessed by an (RPC) interface compiler (also called a stub generator), to generate client and server stubs, as well as the header file. The client stub may be generated in one language, while the server stub may be generated in another language. This enables the server and client programs to be compiled separately and to communicate via RPC. See Fig. 4. No existing programming language is usable as a standard IDL, since it must contain all possible types in any other existing languages. For example, if the C were to be used as an IDL, and a variable in an interface, say X, were defined to be of type char*, then it could mean a null-terminated character string, a pointer to a character, or a pointer to an array of characters. 6 Suppose another language, such as Java, which has two distinct types for character string and a pointer to a character, were used to code the server. Then, in the header file it generates, the IDL compiler wouldn t be able to correctly declare the type for X, since it doesn t know the intention of the programmer who wrote the interface definition. Also, in and out types are useful, in general, in order to indicate if a variable is used to represent an input to or an output from the called procedure, respectively. Note that only the procedure names and the types of its parameters are specified in an interface definition file, since what these procedures actually do (i.e., their semantics) is irrelevant to generating the stubs. The following are some well-known IDLs and/or stub generators: 6 This ambiguity is eliminated in MiG (Mach Interface Generator), for example, by introducing a separate string type, MSG TYPE STRING. MiG also has 3 types for I/O specification: in, out, inout. The default is in.

7 CMPT401 Chapter 3, Summer 04 7 Interface Definition File IDL Compiler header.h #Include #Include Client Stub Client Program Server Program Server Stub Compiler Compiler Compiler Compiler Client Stub Object File Client Object File Server Object File Server Stub Object File Linker Runtime Library Runtime Library Linker Client Binary Server Binary Figure 4: Programming a server and a client. CORBA: becoming very popular. (See the Communications of the ACM, Oct. 1998) rpcgen: used in Sun RPC. MiG (Mach Interface Generator): uses a subset of MatchMaker, which has also been added to C, Pascal, Ada, Common Lisp. rmic (RMI compiler): used in Java RMI (Remote Method Invocation). RMI and CORBA are for remote method invocation, which is more general than RPC. (See the next section.) Sun Portmapper Sun RPC employs a portmapper as its simple name server. Since the portmapper itself is a server, its interface is specified as follows (not all procedures are shown): program PMAP_PROG { version PMAP_VERS { void PMAPPROC_NULL(void) = 0; bool PMAPPROC_SET(mapping) = 1; int PMAPPROC_GETPORT(mapping) = 3; } = 2; } = ; When a new server starts up, it would invoke PMAPPROC SET, to register its name, version number and port with the portmapper. A client would invoke PMAPPROC GETPORT on the

8 CMPT401 Chapter 3, Summer 04 8 well-known port number (111) of the portmapper, in order to find the port number for the service it seeks, providing the server name and its version number.

RPC flow. 4.3 Remote procedure calls IDL. RPC components. Procedure. Program. sum (j,k) int j,k; {return j+k;} i = sum (3,7); Local procedure call

RPC flow. 4.3 Remote procedure calls IDL. RPC components. Procedure. Program. sum (j,k) int j,k; {return j+k;} i = sum (3,7); Local procedure call 4.3 Remote procedure calls RPC flow Client process Server process Program i = sum (3,7); Procedure sum (j,k) int j,k; {return j+k; Client stub Program Return Call Unpack Pack result para s Invisible to

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

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

Distributed Systems Lecture 2 1. External Data Representation and Marshalling (Sec. 4.3) Request reply protocol (failure modes) (Sec. 4.

Distributed Systems Lecture 2 1. External Data Representation and Marshalling (Sec. 4.3) Request reply protocol (failure modes) (Sec. 4. Distributed Systems Lecture 2 1 Today s Topics External Data Representation and Marshalling (Sec. 4.3) Request reply protocol (failure modes) (Sec. 4.4) Distributed Objects and Remote Invocations (5.1)

More information

C 1. Recap: Finger Table. CSE 486/586 Distributed Systems Remote Procedure Call. Chord: Node Joins and Leaves. Recall? Socket API

C 1. Recap: Finger Table. CSE 486/586 Distributed Systems Remote Procedure Call. Chord: Node Joins and Leaves. Recall? Socket API Recap: Finger Table Finding a using fingers CSE 486/586 Distributed Systems Remote Procedure Call Steve Ko Computer Sciences and Engineering University at Buffalo N102" 86 + 2 4! N86" 20 +

More information

Communication. Distributed Systems Santa Clara University 2016

Communication. Distributed Systems Santa Clara University 2016 Communication Distributed Systems Santa Clara University 2016 Protocol Stack Each layer has its own protocol Can make changes at one layer without changing layers above or below Use well defined interfaces

More information

COMMUNICATION PROTOCOLS: REMOTE PROCEDURE CALL (RPC)

COMMUNICATION PROTOCOLS: REMOTE PROCEDURE CALL (RPC) COMMUNICATION PROTOCOLS: REMOTE PROCEDURE CALL (RPC) 1 2 CONVENTIONAL PROCEDURE CALL (a) (b) Parameter passing in a local procedure call: the stack before the call to read. The stack while the called procedure

More information

Today CSCI Communication. Communication in Distributed Systems. Communication in Distributed Systems. Remote Procedure Calls (RPC)

Today CSCI Communication. Communication in Distributed Systems. Communication in Distributed Systems. Remote Procedure Calls (RPC) Today CSCI 5105 Communication in Distributed Systems Overview Types Remote Procedure Calls (RPC) Instructor: Abhishek Chandra 2 Communication How do program modules/processes communicate on a single machine?

More information

Desarrollo de Aplicaciones en Red. El modelo de comunicación. General concepts. Models of communication. Message Passing

Desarrollo de Aplicaciones en Red. El modelo de comunicación. General concepts. Models of communication. Message Passing Desarrollo de Aplicaciones en Red El modelo de comunicación José Rafael Rojano Cáceres http://www.uv.mx/rrojano 1 2 General concepts As we saw in a Distributed System the logical and physical component

More information

CHAPTER - 4 REMOTE COMMUNICATION

CHAPTER - 4 REMOTE COMMUNICATION CHAPTER - 4 REMOTE COMMUNICATION Topics Introduction to Remote Communication Remote Procedural Call Basics RPC Implementation RPC Communication Other RPC Issues Case Study: Sun RPC Remote invocation Basics

More information

Lecture 15: Network File Systems

Lecture 15: Network File Systems Lab 3 due 12/1 Lecture 15: Network File Systems CSE 120: Principles of Operating Systems Alex C. Snoeren Network File System Simple idea: access disks attached to other computers Share the disk with many

More information

Overview. Communication types and role of Middleware Remote Procedure Call (RPC) Message Oriented Communication Multicasting 2/36

Overview. Communication types and role of Middleware Remote Procedure Call (RPC) Message Oriented Communication Multicasting 2/36 Communication address calls class client communication declarations implementations interface java language littleendian machine message method multicast network object operations parameters passing procedure

More information

Communication. Overview

Communication. Overview Communication Chapter 2 1 Overview Layered protocols Remote procedure call Remote object invocation Message-oriented communication Stream-oriented communication 2 Layered protocols Low-level layers Transport

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

Distributed Systems Principles and Paradigms

Distributed Systems Principles and Paradigms Distributed Systems Principles and Paradigms Chapter 03 (version February 11, 2008) Maarten van Steen Vrije Universiteit Amsterdam, Faculty of Science Dept. Mathematics and Computer Science Room R4.20.

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

Two Phase Commit Protocol. Distributed Systems. Remote Procedure Calls (RPC) Network & Distributed Operating Systems. Network OS.

Two Phase Commit Protocol. Distributed Systems. Remote Procedure Calls (RPC) Network & Distributed Operating Systems. Network OS. A distributed system is... Distributed Systems "one on which I cannot get any work done because some machine I have never heard of has crashed". Loosely-coupled network connection could be different OSs,

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

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

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

Distributed Objects and Remote Invocation. Programming Models for Distributed Applications

Distributed Objects and Remote Invocation. Programming Models for Distributed Applications Distributed Objects and Remote Invocation Programming Models for Distributed Applications Extending Conventional Techniques The remote procedure call model is an extension of the conventional procedure

More information

Remote Procedure Call

Remote Procedure Call Remote Procedure Call Remote Procedure Call Integrate network communication with programming language Procedure call is well understood implementation use Control transfer Data transfer Goals Easy make

More information

RMI: Design & Implementation

RMI: Design & Implementation RMI: Design & Implementation Operating Systems RMI 1 Middleware layers Applications, services RMI and RPC request-reply protocol marshalling and external data representation Middleware layers UDP and TCP

More information

Chapter 15: Distributed Communication. Sockets Remote Procedure Calls (RPCs) Remote Method Invocation (RMI) CORBA Object Registration

Chapter 15: Distributed Communication. Sockets Remote Procedure Calls (RPCs) Remote Method Invocation (RMI) CORBA Object Registration Chapter 15: Distributed Communication Sockets Remote Procedure Calls (RPCs) Remote Method Invocation (RMI) CORBA Object Registration Sockets Defined as an endpoint for communcation Concatenation of IP

More information

CSci Introduction to Distributed Systems. Communication: RPC

CSci Introduction to Distributed Systems. Communication: RPC CSci 5105 Introduction to Distributed Systems Communication: RPC Today Remote Procedure Call Chapter 4 TVS Last Time Architectural styles RPC generally mandates client-server but not always Interprocess

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

Chapter 4 Communication

Chapter 4 Communication DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S. TANENBAUM MAARTEN VAN STEEN Chapter 4 Communication Layered Protocols (1) Figure 4-1. Layers, interfaces, and protocols in the OSI

More information

Process. Program Vs. process. During execution, the process may be in one of the following states

Process. Program Vs. process. During execution, the process may be in one of the following states What is a process? What is process scheduling? What are the common operations on processes? How to conduct process-level communication? How to conduct client-server communication? Process is a program

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

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 22: Remote Procedure Call (RPC)

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 22: Remote Procedure Call (RPC) CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2002 Lecture 22: Remote Procedure Call (RPC) 22.0 Main Point Send/receive One vs. two-way communication Remote Procedure

More information

EI 338: Computer Systems Engineering (Operating Systems & Computer Architecture)

EI 338: Computer Systems Engineering (Operating Systems & Computer Architecture) EI 338: Computer Systems Engineering (Operating Systems & Computer Architecture) Dept. of Computer Science & Engineering Chentao Wu wuct@cs.sjtu.edu.cn Download lectures ftp://public.sjtu.edu.cn User:

More information

Communication. Communication. Distributed Systems. Networks and protocols Sockets Remote Invocation Messages Streams. Fall /10/2001 DoCS

Communication. Communication. Distributed Systems. Networks and protocols Sockets Remote Invocation Messages Streams. Fall /10/2001 DoCS Communication Distributed Systems Fall 2002 Communication Process Process Networks and protocols Sockets Remote Invocation Messages Streams 9/10/2001 DoCS 2002 2 Layered Protocols (1) Layers, interfaces,

More information

A Report on RMI and RPC Submitted by Sudharshan Reddy B

A Report on RMI and RPC Submitted by Sudharshan Reddy B A Report on RMI and RPC Submitted by Sudharshan Reddy B Abstract: This report mainly explains the RMI and RPC technologies. In the first part of the paper the RMI technology is briefly explained and in

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

Chapter 4: Processes

Chapter 4: Processes Chapter 4: Processes Process Concept Process Scheduling Operations on Processes Cooperating Processes Interprocess Communication Communication in Client-Server Systems 4.1 Process Concept An operating

More information

MTAT Enterprise System Integration. Lecture 2: Middleware & Web Services

MTAT Enterprise System Integration. Lecture 2: Middleware & Web Services MTAT.03.229 Enterprise System Integration Lecture 2: Middleware & Web Services Luciano García-Bañuelos Slides by Prof. M. Dumas Overall view 2 Enterprise Java 2 Entity classes (Data layer) 3 Enterprise

More information

Advanced Topics in Distributed Systems. Dr. Ayman A. Abdel-Hamid. Computer Science Department Virginia Tech

Advanced Topics in Distributed Systems. Dr. Ayman A. Abdel-Hamid. Computer Science Department Virginia Tech Advanced Topics in Distributed Systems Dr. Ayman A. Abdel-Hamid Computer Science Department Virginia Tech Communication (Based on Ch2 in Distributed Systems: Principles and Paradigms, 1/E or Ch4 in 2/E)

More information

Middleware. Adapted from Alonso, Casati, Kuno, Machiraju Web Services Springer 2004

Middleware. Adapted from Alonso, Casati, Kuno, Machiraju Web Services Springer 2004 Middleware Adapted from Alonso, Casati, Kuno, Machiraju Web Services Springer 2004 Outline Web Services Goals Where do they come from? Understanding middleware Middleware as infrastructure Communication

More information

7 Distributed File Systems

7 Distributed File Systems Single tree /etc Global File system /progs Drives mounted over the network to create a single tree /user /sys Network Forest of drives 7 Distributed File Systems C: D: E: F: Drives mounted over the network

More information

External Data Representation (XDR)

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

More information

TELE 301 Lecture 8: Post

TELE 301 Lecture 8: Post Last Lecture System installation This Lecture Post installation Next Lecture Wireless networking Overview TELE 301 Lecture 8: Post 1 Post-configuration Create user accounts and environments Sort out the

More information

Outline. Interprocess Communication. Interprocess Communication. Communication Models: Message Passing and shared Memory.

Outline. Interprocess Communication. Interprocess Communication. Communication Models: Message Passing and shared Memory. Eike Ritter 1 Modified: October 29, 2012 Lecture 14: Operating Systems with C/C++ School of Computer Science, University of Birmingham, UK Outline 1 2 3 Shared Memory in POSIX systems 1 Based on material

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

Introduction and Overview Socket Programming Lower-level stuff Higher-level interfaces Security. Network Programming. Samuli Sorvakko/Nixu Oy

Introduction and Overview Socket Programming Lower-level stuff Higher-level interfaces Security. Network Programming. Samuli Sorvakko/Nixu Oy Network Programming Samuli Sorvakko/Nixu Oy Telecommunications software and Multimedia Laboratory T-110.4100 Computer Networks October 5, 2009 Agenda 1 Introduction and Overview 2 Socket Programming 3

More information

SAI/ST course Distributed Systems

SAI/ST course Distributed Systems SAI/ST course Distributed Systems 2013, Sep. 26 Oct 01 Lecture 3: Communication Agenda Overview Concepts Organization in layers IPC primitives Direct communication Indirect communication R.H. Mak 27-9-2013

More information

Chapter 5: Remote Invocation. Copyright 2015 Prof. Amr El-Kadi

Chapter 5: Remote Invocation. Copyright 2015 Prof. Amr El-Kadi Chapter 5: Remote Invocation Outline Introduction Request-Reply Protocol Remote Procedure Call Remote Method Invocation This chapter (and Chapter 6) Applications Remote invocation, indirect communication

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

The UNIVERSITY of EDINBURGH. SCHOOL of INFORMATICS. CS4/MSc. Distributed Systems. Björn Franke. Room 2414

The UNIVERSITY of EDINBURGH. SCHOOL of INFORMATICS. CS4/MSc. Distributed Systems. Björn Franke. Room 2414 The UNIVERSITY of EDINBURGH SCHOOL of INFORMATICS CS4/MSc Distributed Systems Björn Franke bfranke@inf.ed.ac.uk Room 2414 (Lecture 3: Remote Invocation and Distributed Objects, 28th September 2006) 1 Programming

More information

Verteilte Systeme (Distributed Systems)

Verteilte Systeme (Distributed Systems) Verteilte Systeme (Distributed Systems) Karl M. Göschka Karl.Goeschka@tuwien.ac.at http://www.infosys.tuwien.ac.at/teaching/courses/ VerteilteSysteme/ Lecture 3: Communication (Part 2) Remote Procedure

More information

CORBA (Common Object Request Broker Architecture)

CORBA (Common Object Request Broker Architecture) CORBA (Common Object Request Broker Architecture) René de Vries (rgv@cs.ru.nl) Based on slides by M.L. Liu 1 Overview Introduction / context Genealogical of CORBA CORBA architecture Implementations Corba

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

CS 716: Introduction to communication networks th class; 11 th Nov Instructor: Sridhar Iyer IIT Bombay

CS 716: Introduction to communication networks th class; 11 th Nov Instructor: Sridhar Iyer IIT Bombay CS 716: Introduction to communication networks - 24 th class; 11 th Nov 2011 Instructor: Sridhar Iyer IIT Bombay Layering: physical communication data application transport network link physical application

More information

ECE454 Tutorial. June 16, (Material prepared by Evan Jones)

ECE454 Tutorial. June 16, (Material prepared by Evan Jones) ECE454 Tutorial June 16, 2009 (Material prepared by Evan Jones) 2. Consider the following function: void strcpy(char* out, char* in) { while(*out++ = *in++); } which is invoked by the following code: void

More information

CS153: Communication. Chengyu Song. Slides modified from Harsha Madhyvasta, Nael Abu-Ghazaleh, and Zhiyun Qian

CS153: Communication. Chengyu Song. Slides modified from Harsha Madhyvasta, Nael Abu-Ghazaleh, and Zhiyun Qian 1 CS153: Communication Chengyu Song Slides modified from Harsha Madhyvasta, Nael Abu-Ghazaleh, and Zhiyun Qian 2 Administrivia Homework HW3 is due this Friday June 2nd 3 Recap: OS roles Abstraction Virtualization

More information

Distributed Systems. Definitions. Why Build Distributed Systems? Operating Systems - Overview. Operating Systems - Overview

Distributed Systems. Definitions. Why Build Distributed Systems? Operating Systems - Overview. Operating Systems - Overview Distributed Systems Joseph Spring School of Computer Science Distributed Systems and Security Areas for Discussion Definitions Operating Systems Overview Challenges Heterogeneity Limitations and 2 Definitions

More information

Operating System Support

Operating System Support Operating System Support Dr. Xiaobo Zhou Adopted from Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, Addison-Wesley 2005 1 Learning Objectives Know what a modern

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

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

Networks and Operating Systems Chapter 3: Remote Procedure Call (RPC)

Networks and Operating Systems Chapter 3: Remote Procedure Call (RPC) Systems Group Department of Computer Science ETH Zürich Networks and Operating Systems Chapter 3: Remote Procedure Call (RPC) Donald Kossmann & Torsten Höfler Frühjahrssemester 2013 DINFK, ETH Zürich.

More information

Diagram of Process State Process Control Block (PCB)

Diagram of Process State Process Control Block (PCB) The Big Picture So Far Chapter 4: Processes HW Abstraction Processor Memory IO devices File system Distributed systems Example OS Services Process management, protection, synchronization Memory Protection,

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

Introduction and Overview Socket Programming Higher-level interfaces Final thoughts. Network Programming. Samuli Sorvakko/Nixu Oy

Introduction and Overview Socket Programming Higher-level interfaces Final thoughts. Network Programming. Samuli Sorvakko/Nixu Oy Network Programming Samuli Sorvakko/Nixu Oy Telecommunications software and Multimedia Laboratory T-110.4100 Computer Networks October 16, 2008 Agenda 1 Introduction and Overview Introduction 2 Socket

More information

Communication. Outline

Communication. Outline COP 6611 Advanced Operating System Communication Chi Zhang czhang@cs.fiu.edu Outline Layered Protocols Remote Procedure Call (RPC) Remote Object Invocation Message-Oriented Communication 2 1 Layered Protocols

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

Processes COMPSCI 386

Processes COMPSCI 386 Processes COMPSCI 386 Elements of a Process A process is a program in execution. Distinct processes may be created from the same program, but they are separate execution sequences. call stack heap STACK

More information

Communication. Distributed Systems IT332

Communication. Distributed Systems IT332 Communication Distributed Systems IT332 2 Outline Fundamentals Layered network communication protocols Types of communication Remote Procedure Call Message Oriented Communication Multicast Communication

More information

Lecture 8: February 17

Lecture 8: February 17 CMPSCI 677 Operating Systems Spring 2016 Lecture 8: February 17 Lecturer: Prashant Shenoy Scribe: Ravi Choudhary 8.1 Communications in Distributed Systems This lecture will deal with communication between

More information

Message Passing vs. Distributed Objects. 5/15/2009 Distributed Computing, M. L. Liu 1

Message Passing vs. Distributed Objects. 5/15/2009 Distributed Computing, M. L. Liu 1 Message Passing vs. Distributed Objects 5/15/2009 Distributed Computing, M. L. Liu 1 Distributed Objects M. L. Liu 5/15/2009 Distributed Computing, M. L. Liu 2 Message Passing versus Distributed Objects

More information

Remote Procedure Calls, TLI, STREAMS

Remote Procedure Calls, TLI, STREAMS Remote Procedure Calls, TLI, STREAMS 13 RPC, TLI, STREAMS Hannes Lubich, 2003 2005 Page 1 Goals of this Lecture Understand the design of remote procedure calls in general and the design and programming

More information

Linux Operating System

Linux Operating System Linux Operating System Dept. of Computer Science & Engineering 1 History Linux is a modern, free operating system based on UNIX standards. First developed as a small but self-contained kernel in 1991 by

More information

DISTRIBUTED COMPUTER SYSTEMS

DISTRIBUTED COMPUTER SYSTEMS DISTRIBUTED COMPUTER SYSTEMS Communication Fundamental REMOTE PROCEDURE CALL Dr. Jack Lange Computer Science Department University of Pittsburgh Fall 2015 Outline Communication Architecture Fundamentals

More information

The Big Picture So Far. Chapter 4: Processes

The Big Picture So Far. Chapter 4: Processes The Big Picture So Far HW Abstraction Processor Memory IO devices File system Distributed systems Example OS Services Process management, protection, synchronization Memory Protection, management, VM Interrupt

More information

Distributed Systems. The main method of distributed object communication is with remote method invocation

Distributed Systems. The main method of distributed object communication is with remote method invocation Distributed Systems Unit III Syllabus:Distributed Objects and Remote Invocation: Introduction, Communication between Distributed Objects- Object Model, Distributed Object Modal, Design Issues for RMI,

More information

Chapter 5 Distributed Objects and Remote Invocation

Chapter 5 Distributed Objects and Remote Invocation CSD511 Distributed Systems 分散式系統 Chapter 5 Distributed Objects and Remote Invocation 吳俊興 國立高雄大學資訊工程學系 Chapter 5 Distributed Objects and Remote Invocation 5.1 Introduction 5.2 Communication between distributed

More information

Assignment 2 Group 5 Simon Gerber Systems Group Dept. Computer Science ETH Zurich - Switzerland

Assignment 2 Group 5 Simon Gerber Systems Group Dept. Computer Science ETH Zurich - Switzerland Assignment 2 Group 5 Simon Gerber Systems Group Dept. Computer Science ETH Zurich - Switzerland t Your task Write a simple file server Client has to be implemented in Java Server has to be implemented

More information

RPC and RMI. 2501ICT Nathan

RPC and RMI. 2501ICT Nathan RPC and RMI 2501ICT Nathan Contents Client/Server revisited RPC Architecture XDR RMI Principles and Operation Case Studies Copyright 2002- René Hexel. 2 Client/Server Revisited Server Accepts commands

More information

Problem Set: Processes

Problem Set: Processes Lecture Notes on Operating Systems Problem Set: Processes 1. Answer yes/no, and provide a brief explanation. (a) Can two processes be concurrently executing the same program executable? (b) Can two running

More information

Interprocess Communication Tanenbaum, van Steen: Ch2 (Ch3) CoDoKi: Ch2, Ch3, Ch5

Interprocess Communication Tanenbaum, van Steen: Ch2 (Ch3) CoDoKi: Ch2, Ch3, Ch5 Interprocess Communication Tanenbaum, van Steen: Ch2 (Ch3) CoDoKi: Ch2, Ch3, Ch5 Fall 2008 Jussi Kangasharju Chapter Outline Overview of interprocess communication Remote invocations (RPC etc.) Message

More information

CHAPTER 3 - PROCESS CONCEPT

CHAPTER 3 - PROCESS CONCEPT CHAPTER 3 - PROCESS CONCEPT 1 OBJECTIVES Introduce a process a program in execution basis of all computation Describe features of processes: scheduling, creation, termination, communication Explore interprocess

More information

Chapter 4: Processes. Process Concept

Chapter 4: Processes. Process Concept Chapter 4: Processes Process Concept Process Scheduling Operations on Processes Cooperating Processes Interprocess Communication Communication in Client-Server Systems 4.1 Silberschatz, Galvin and Gagne

More information

IBD Intergiciels et Bases de Données

IBD Intergiciels et Bases de Données IBD Intergiciels et Bases de Données RMI-based distributed systems Fabien Gaud, Fabien.Gaud@inrialpes.fr Overview of lectures and practical work Lectures Introduction to distributed systems and middleware

More information

Networking Operating Systems (CO32010)

Networking Operating Systems (CO32010) Networking Operating Systems (CO32010) 1. Operating Systems 2. Processes and scheduling Objectives: To discuss the advantages of a distributed file system. To outline the different methods of mounting

More information

The Big Picture So Far. Chapter 4: Processes

The Big Picture So Far. Chapter 4: Processes The Big Picture So Far HW Abstraction Processor Memory IO devices File system Distributed systems Example OS Services Process management, protection, synchronization Memory Protection, management, VM Interrupt

More information

Dr Markus Hagenbuchner CSCI319 SIM. Distributed Systems Chapter 4 - Communication

Dr Markus Hagenbuchner CSCI319 SIM. Distributed Systems Chapter 4 - Communication Dr Markus Hagenbuchner markus@uow.edu.au CSCI319 SIM Distributed Systems Chapter 4 - Communication CSCI319 Chapter 4 Page: 1 Communication Lecture notes based on the textbook by Tannenbaum Study objectives:

More information

Chapter 4: Processes

Chapter 4: Processes Chapter 4: Processes Process Concept Process Scheduling Operations on Processes Cooperating Processes Interprocess Communication Communication in Client-Server Systems 4.1 Silberschatz, Galvin and Gagne

More information

IPC. Communication. Layered Protocols. Layered Protocols (1) Data Link Layer. Layered Protocols (2)

IPC. Communication. Layered Protocols. Layered Protocols (1) Data Link Layer. Layered Protocols (2) IPC Communication Chapter 2 Inter-Process Communication is the heart of all DSs. Processes on different machines. Always based on low-level message passing. In this chapter: RPC RMI MOM (Message Oriented

More information

CS551 Object Oriented Middleware (I) Outline. Computer Networks. Computer Networks. Types of Middleware TCP UDP

CS551 Object Oriented Middleware (I) Outline. Computer Networks. Computer Networks. Types of Middleware TCP UDP CS551 Object Oriented Middleware (I) (Chap. 3 of EDO) Yugi Lee STB #555 (816) 235-5932 yugi@cstp.umkc.edu www.cstp.umkc.edu/~yugi 1 Outline Computer Networks TCP UDP Types of Middleware Transaction-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

Outlook. Process Concept Process Scheduling Operations on Processes. IPC Examples

Outlook. Process Concept Process Scheduling Operations on Processes. IPC Examples Processes Outlook Process Concept Process Scheduling Operations on Processes Interprocess Communication o IPC Examples 2 Process Concept What is a Process? A process is a program in execution Process includes

More information

Process Concept: views of a process Process Scheduling CSCI 6730/ 4730 Operating Systems

Process Concept: views of a process Process Scheduling CSCI 6730/ 4730 Operating Systems Chapter 3: Processes: Outline Process Concept: views of a process Process Scheduling CSCI 6730/ 4730 Operating Systems Operations on Processes Cooperating Processes Inter Process Communication (IPC) RPC:

More information

Application Programming Interfaces

Application Programming Interfaces Application Programming Interfaces The TCP/IP protocol suite provides only the protocols that can be used by processes to communicate across a network. Though standarized, how these protocols are implemented

More information

We will cover in this order: 2.1, 2.7, 2.5, 2.4, 2.2

We will cover in this order: 2.1, 2.7, 2.5, 2.4, 2.2 CSE 422 Notes, Set 2 These slides contain materials provided with the text: Computer Networking: A Top Down Approach,5 th edition, by Jim Kurose and Keith Ross, Addison-Wesley, April 2009. Additional figures

More information

RPC. Remote Procedure Calls. Robert Grimm New York University

RPC. Remote Procedure Calls. Robert Grimm New York University RPC Remote Procedure Calls Robert Grimm New York University Assignments! You need (more) time for interoperability testing!! Your server should be running by midnight Sunday! Assignment 3 test case posted!

More information

Chapter 3: Processes. Operating System Concepts 9 th Edition

Chapter 3: Processes. Operating System Concepts 9 th Edition Chapter 3: Processes Silberschatz, Galvin and Gagne 2013 Chapter 3: Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication

More information

Chapter 3: Process Concept

Chapter 3: Process Concept Chapter 3: Process Concept By Worawut Srisukkham Updated By Dr. Varin Chouvatut, Silberschatz, Galvin and Gagne 2010 Chapter 3: Process-Concept Process Concept Process Scheduling Operations on Processes

More information

Collaboration of Tasks

Collaboration of Tasks Operating systems (vimia219) Collaboration of Tasks Tamás Kovácsházy, PhD 13 rd Topic Inter Process Communication with Message Passing Budapest University of Technology and Economics Department of Measurement

More information

Introduction and Overview Socket Programming Higher-level interfaces Final thoughts. Network Programming. Samuli Sorvakko/Nixu Oy

Introduction and Overview Socket Programming Higher-level interfaces Final thoughts. Network Programming. Samuli Sorvakko/Nixu Oy Network Programming Samuli Sorvakko/Nixu Oy Telecommunications software and Multimedia Laboratory T-110.4100 Computer Networks October 9, 2006 Agenda 1 Introduction and Overview Introduction 2 Socket Programming

More information

DISTRIBUTED PROCESSING SOFTWARE ENVIRONMENTS

DISTRIBUTED PROCESSING SOFTWARE ENVIRONMENTS DISTRIBUTED PROCESSING SOFTWARE ENVIRONMENTS The environment or framework for supporting distributed processing can usefully be divided into three main approaches: Distributed processing is supported via

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