Tonight. Communication. Middleware Protocols. Remote Procedure Call (RPC) Several common communication mechanisms RPC RMI Sockets Next week: HTTP,

Size: px
Start display at page:

Download "Tonight. Communication. Middleware Protocols. Remote Procedure Call (RPC) Several common communication mechanisms RPC RMI Sockets Next week: HTTP,"

Transcription

1 Tonight Communication Tanenbaum Ch. 4 Distributed Software Systems CS 707 Several common communication mechanisms RPC RMI Sockets Next week: HTTP, Middleware Protocols Remote Procedure Call (RPC) Figure 4-3. An adapted reference model for networked communication. 1

2 Conventional Procedure Call Client and Server Stubs Figure 4-5. (a) Parameter passing in a local procedure call: the stack before the call to read. (b) The stack while the called procedure is active. Figure 4-6. Principle of RPC between a client and server program. Remote Procedure Calls (1) A remote procedure call occurs in the following steps: 1. The client procedure calls the client stub in the normal way. 2. The client stub builds a message (marshalling the parameters) and calls the local operating system. 3. The client s OS sends the message across the network to the remote OS. 4. The remote OS gives the message to the server stub. 5. The server stub unpacks the parameters 6. Calls the server implementing the function. Continued RPC with value parameters Figure 4-7. The steps involved in a doing a remote computation through RPC. 2

3 Remote Procedure Calls (2) A remote procedure call occurs in the following steps (continued): 7. The server does the work and returns the result to the stub. 8. The server stub packs it in a message and calls its local OS. 9. The server s OS sends the message across the network to the client s OS. 10. The client s OS gives the message to the client stub. 11. The stub unpacks the result and returns to the client. Passing Value Parameters a) Original message on the Pentium b) The message after receipt on the SPARC c) The message after being inverted. The little numbers in boxes indicate the address of each byte Passing Reference Parameters A pointer is only meaningful in the address space of the process where it is used. One solution is to forbid pointers and reference parameters in RPC More typically, marshalling involves changing the mechanism to copy/restore Actual parameter is sent as a copy If the formal parameter is changed, the changed version is sent back to use as a replacement for the actual Optimizations include taking advantage of the direction of the changes (input only, output only) Straightforward for some parameter types (arrays for example) but not in general. Parameter Specification and Stub Generation Figure 4-9. (a) A procedure. (b) The corresponding message. array represented as a pointer is copied in the invocation 3

4 Writing a Client and a Server (1) User generates client, server and an interface definition file. The code file must #include the header file (to be generated). #include <stdio.h> #include <rpc/rpc.h> #include "RPCTest.h" Client Code main(int argc, char**argv) CLIENT *clienthandle; char *servername = "cs1.gmu.edu"; readargs a; Data *data; clienthandle= clnt_create(servername,filereadwrite,version,"udp"); /* creates a socket and a client handle */ if (clienthandle == NULL) clnt_pcreateerror(servername); /* unable to contact server */ exit(1); a.val1 = 10; a.val2 = 20; data = double_1(&a,clienthandle); /* call to remote procedure */ printf("%d**\n",*data); clnt_destroy(clienthandle); #include <stdio.h> #include <rpc/rpc.h> #include "RPCTest.h" Data *double_1(readargs *a) static Data result; /* must be static */ result = a->val1 + a->val2; return &result; Server Code Remote function double Writing a Client and a Server (2) Four files output by the Sun RPC IDL compiler from the interface definition file: typedef int Data; struct readargs int val1; int val2; ; /* pack multiple arguments into struct */ program FILEREADWRITE version VERSION Data DOUBLE(readargs)=1; =1; =9999; Interface Specification A header file (e.g., interface.h, in C terms). XDR file describes data details The client stub. The server stub. All must #include header file 4

5 Writing a Client and a Server (1) XDR code C compiler XDR obj file Figure The steps in writing a client and a server in Sun RPC. /* Please do not edit this file. It was generated using rpcgen. */ #ifndef _RPCTEST_H_RPCGEN #define _RPCTEST_H_RPCGEN #include <rpc/rpc.h> typedef int Data; struct readargs int val1; int val2; ; typedef struct readargs readargs; #define FILEREADWRITE 9999 #define VERSION 1 #define DOUBLE 1 extern Data * double_1(); extern int filereadwrite_1_freeresult(); /* the xdr functions */ extern bool_t xdr_data(); extern bool_t xdr_writeargs(); extern bool_t xdr_readargs(); #endif /*!_RPCTEST_H_RPCGEN */ Header File /* * Please do not edit this file. * It was generated using rpcgen. */ #include "RPCTest.h" #ifndef _KERNEL Client Stub #include <stdio.h> #include <stdlib.h> /* getenv, exit */ #endif /*!_KERNEL */ /* Default timeout can be changed using clnt_control() */ static struct timeval TIMEOUT = 25, 0 ; Data * double_1(argp, clnt) readargs *argp; CLIENT *clnt; static Data clnt_res; memset((char *)&clnt_res, 0, sizeof (clnt_res)); if (clnt_call(clnt, DOUBLE, (xdrproc_t) xdr_readargs, (caddr_t) argp, (xdrproc_t) xdr_data, (caddr_t) &clnt_res, TIMEOUT)!= RPC_SUCCESS) return (NULL); return (&clnt_res); /* * Please do not edit this file. * It was generated using rpcgen. */ #include "RPCTest.h" static void closedown(sig) int sig; static void filereadwrite_1(rqstp, transp) struct svc_req *rqstp; register SVCXPRT *transp; switch (rqstp->rq_proc) case DOUBLE: _xdr_argument = xdr_readargs; _xdr_result = xdr_data; local = (char *(*)()) double_1; break; main() Server Stub (lots of code omitted) 5

6 /* * Please do not edit this file. * It was generated using rpcgen. */ #include "RPCTest.h" bool_t xdr_data(xdrs, objp) register XDR *xdrs; Data *objp; #if defined(_lp64) defined(_kernel) register int *buf; #else register long *buf; #endif if (!xdr_int(xdrs, objp)) return (FALSE); return (TRUE); XDR file bool_t xdr_readargs(xdrs, objp) register XDR *xdrs; readargs *objp; #if defined(_lp64) defined(_kernel) register int *buf; #else register long *buf; #endif if (!xdr_int(xdrs, &objp->val1)) return (FALSE); if (!xdr_int(xdrs, &objp->val2)) return (FALSE); return (TRUE); Writing a Client and a Server (1) XDR code C compiler XDR obj file Figure The steps in writing a client and a server in Sun RPC. Binding a Client to a Server (1) Registration of a server makes it possible for a client to locate the server and bind to it. Binding a Client to a Server (2) Figure Client-to-server binding in DCE. SunRPC does not use directory server. Server location is done in two steps: 1. Connect to the server s machine on known port. 2. Locate the server s port on that machine. 6

7 Asynchronous RPC (1) Asynchronous RPC (2) Figure (a) The interaction between client and server in a traditional RPC. Figure (b) The interaction using asynchronous RPC. Asynchronous RPC (3) Remote Method Invocation (RMI) Figure A client and server interacting through two asynchronous RPCs. 7

8 RMI RMI = RPC + Object-orientation Java RMI CORBA Middleware that is language-independent Microsoft DCOM/COM+ SOAP RMI on top of HTTP Remote and local method invocations A remote invocation local C invocation local E invocation B local invocation D remote invocation F Distributed Objects Binding a Client to an Object 2-16 Distr_object* obj_ref; obj_ref = ; obj_ref-> do_something(); Distr_object obj_ref; Local_object* obj_ptr; obj_ref = ; obj_ptr = bind(obj_ref); obj_ptr -> do_something(); (a) (b) //Declare a systemwide object reference // Initialize the reference to a distributed object // Implicitly bind and invoke a method //Declare a systemwide object reference //Declare a pointer to local objects //Initialize the reference to a distributed object //Explicitly bind and obtain a pointer to the local proxy //Invoke a method on the local proxy Common organization of a remote object with client-side proxy (loaded when the client binds to a remote object). a) (a) Example with implicit binding using only global references b) (b) Example with explicit binding using global and local references 8

9 Distributed Objects Remote object references An identifier that can be used throughout a distributed system to refer to a particular remote object Remote interfaces CORBA provides an interface definition language (IDL) for specifying a remote interface JAVA RMI: Java interface that extends Remote interface Actions: remote invocations Remote Exceptions may arise for reasons such as partial failure or message loss Distributed Garbage Collection: cooperation between local garbage collectors needed RMI Programming RMI software Generated by IDL compiler Proxy (client side) Behaves like remote object to clients (invoker) Marshals arguments, forwards message to remote object, unmarshals results, returns results to client Skeleton (server side) Server side stub; Unmarshals arguments, invokes method, marshals results and sends to sending proxy s method Dispatcher (server side) Receives the request message from communication module, passes on the message to the appropriate method in the skeleton RMI Programming Binder Client programs need a means of obtaining a remote object reference Binder is a service that maintains a mapping from textual names to remote object references Servers need to register the services they are exporting with the binder Java RMIregistry, CORBA Naming service Server threads Several choices: thread per object, thread per invocation Remote method invocations must allow for concurrent execution Java RMI Features Integrated with Java language + libraries Security, write once run anywhere, multithreaded Object orientation Can pass behavior Mobile code Not possible in CORBA, traditional RPC systems Distributed Garbage Collection Remoteness of objects intentionally not transparent 9

10 Remote Interfaces, Objects, and Methods Objects become remote by implementing a remote interface A remote interface extends the interface java.rmi.remote Each method of the interface declares java.rmi.remoteexception in its throws clause in addition to any application-specific clauses Creating distributed applications using RMI 1. Define the remote interfaces 2. Implement the remote objects 3. Implement the client (can be done anytime after remote interfaces have been defined) 4. Register the remote object in the name server registry 5. Generate the stub and client using rmic 6. Start the registry 7. Start the server 8. Run the client import java.rmi.*; import java.rmi.registry.*; import java.net.*; public class RmiClient Java Client static public void main(string args[]) ReceiveMessageInterface rmiserver; Registry registry; String serveraddress=args[0]; String serverport=args[1]; String text=args[2]; System.out.println("sending "+text+" to "+serveraddress+":"+serverport); try // get the registry registry=locateregistry.getregistry(serveraddress,(new Integer(serverPort)).intValue() ); // look up the remote object rmiserver= (ReceiveMessageInterface)(registry.lookup("rmiServer")); // call the remote method int i = rmiserver.receivemessage(text); System.out.println("received "+i); catch(remoteexception e) e.printstacktrace(); catch(notboundexception e) e.printstacktrace(); import java.rmi.*; import java.rmi.registry.*; import java.rmi.server.*; import java.net.*; Java Server (1) public class RmiServer extends java.rmi.server.unicastremoteobject implements ReceiveMessageInterface int thisport; String thisaddress; Registry registry; // rmi registry for lookup the remote objects. // This method is called from the remote client by the RMI. // This is the implementation of the ReceiveMessageInterface. public int receivemessage(string x) throws RemoteException System.out.println(x); return 42; 10

11 public RmiServer() throws RemoteException try // get the address of this host. thisaddress= (InetAddress.getLocalHost()).toString(); catch(exception e) throw new RemoteException("can't get inet address."); thisport=3232; // this port(registry s port) System.out.println("this address="+thisaddress+",port="+thisport); try // create the registry and bind the name and object. registry = LocateRegistry.createRegistry( thisport ); registry.rebind("rmiserver", this); catch(remoteexception e) throw e; Java Remote interface import java.rmi.*; public interface ReceiveMessageInterface extends Remote int receivemessage(string x) throws RemoteException; static public void main(string args[]) try RmiServer s=new RmiServer(); catch (Exception e) e.printstacktrace(); System.exit(1); Java Server (2) The Naming class of Java RMIregistry void rebind (String name, Remote obj) This method is used by a server to register the identifier of a remote object by name. void bind (String name, Remote obj) This method can alternatively be used by a server to register a remote object by name, but if the name is already bound to a remote object reference an exception is thrown. void unbind (String name, Remote obj) This method removes a binding. Remote lookup(string name) This method is used by clients to look up a remote object by name. A remote object reference is returned. String [] list() This method returns an array of Strings containing the names bound in the registry. Object References as Parameters 2-18 The situation when passing an object by reference or by value. There is no analogous activity in RPC. 11

12 Classes supporting Java RMI RemoteObject RemoteServer Readings Tannenbaum Chapters xxx WWW (see links on class web page) Java RMI tutorial on web Activatable UnicastRemoteObject <servant class> The programmer's conceptual view of a TCP/IP Internet Network Programming using Socket API Application TCP Application UDP IP 12

13 Socket programming Goal: learn how to build client/server application that communicate using sockets Socket API introduced in BSD4.1 UNIX explicitly created, used, released by apps client/server paradigm two types of transport service via socket API: unreliable datagram (UDP) reliable, byte streamoriented (TCP) socket a host-local, applicationcreated/owned, OS-controlled interface (a door ) into which application process can both send and receive messages to/from another (remote or local) application process Sockets and ports agreed port socket any port socket message client server other ports Internet address = Internet address = Socket programming with TCP Client must contact server server process must first be running server must have created socket (door) that welcomes client s contact Client contacts server by: creating client-local TCP socket specifying IP address, port number of server process When client creates socket: client TCP establishes connection to server TCP When contacted by client, server TCP creates new socket for server process to communicate with client allows server to talk with multiple clients application viewpoint TCP provides reliable, in-order transfer of bytes ( pipe ) between client and server Client/server socket interaction: TCP Server (running on hostid) sockfd = socket(af_inet, SOCK_STREAM, 0); bind(sockfd, (struct sockaddr *) &serv_addr,sizeof(serv_addr)) listen(sockfd,5); newsockfd = accept(sockfd, (struct sockaddr *) &cli_addr, &clilen); n = read(newsockfd, ); n = write(newsockfd, ); close(newsockfd); Client sockfd = socket(af_inet, SOCK_STREAM, 0); TCP connect(sockfd,&serv_addr,sizeof(serv_addr)) Connection setup n = write(sockfd,buffer,strlen(buffer)); n = read(sockfd,buffer,255); close(sockfd); 13

14 Berkeley Sockets API (1) Socket primitives for TCP/IP. Primitive Socket Bind Listen Accept Connect Send Receive Close Meaning Create a new communication endpoint Attach a local address to a socket Announce willingness to accept connections Block caller until a connection request arrives Actively attempt to establish a connection Send some data over the connection Receive some data over the connection Release the connection /* A simple server in the internet domain using TCP The port number is passed as an argument */ #include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> void error(char *msg) perror(msg); exit(1); int main(int argc, char *argv[]) int sockfd, newsockfd, portno, clilen, n; char buffer[256]; struct sockaddr_in serv_addr, cli_addr; if (argc < 2) fprintf(stderr,"error, no port provided\n"); exit(1); sockfd = socket(af_inet, SOCK_STREAM, 0); if (sockfd < 0) error("error opening socket"); bzero((char *) &serv_addr, sizeof(serv_addr)); portno = atoi(argv[1]); serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = INADDR_ANY; serv_addr.sin_port = htons(portno); if (bind(sockfd, (struct sockaddr *) &serv_addr,sizeof(serv_addr)) < 0) error("error on binding"); listen(sockfd,5); clilen = sizeof(cli_addr); newsockfd = accept(sockfd, (struct sockaddr *) &cli_addr, &clilen); if (newsockfd < 0) error("error on accept"); bzero(buffer,256); n = read(newsockfd,buffer,255); if (n < 0) error("error reading from socket"); printf("here is the message: %s\n",buffer); n = write(newsockfd,"i got your message",18); if (n < 0) error("error writing to socket"); return 0; C Server #include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> void error(char *msg) perror(msg); exit(0); int main(int argc, char *argv[]) int sockfd, portno, n; struct sockaddr_in serv_addr; struct hostent *server; char buffer[256]; if (argc < 3) fprintf(stderr,"usage %s hostname port\n", argv[0]); exit(0); portno = atoi(argv[2]); sockfd = socket(af_inet, SOCK_STREAM, 0); if (sockfd < 0) error("error opening socket"); server = gethostbyname(argv[1]); if (server == NULL) fprintf(stderr,"error, no such host\n"); exit(0); bzero((char *) &serv_addr, sizeof(serv_addr)); serv_addr.sin_family = AF_INET; bcopy((char *)server->h_addr, (char *)&serv_addr.sin_addr.s_addr,server->h_length); serv_addr.sin_port = htons(portno); if (connect(sockfd,&serv_addr,sizeof(serv_addr)) < 0) error("error connecting"); printf("please enter the message: "); bzero(buffer,256); fgets(buffer,255,stdin); n = write(sockfd,buffer,strlen(buffer)); if (n < 0) error("error writing to socket"); bzero(buffer,256); n = read(sockfd,buffer,255); if (n < 0) error("error reading from socket"); printf("%s\n",buffer); return 0; C Client Berkeley Sockets (2) Connection-oriented communication pattern using sockets. 14

15 Create welcoming socket at port 6789 Wait, on welcoming socket for contact by client Create input stream, attached to socket Example: Java server (TCP) import java.io.*; import java.net.*; class TCPServer public static void main(string argv[]) throws Exception String clientsentence; String capitalizedsentence; ServerSocket welcomesocket = new ServerSocket(6789); while(true) Socket connectionsocket = welcomesocket.accept(); BufferedReader infromclient = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream())); Example: Java server (TCP), cont Create output stream, attached to socket Read in line from socket DataOutputStream outtoclient = new DataOutputStream(connectionSocket.getOutputStream()); clientsentence = infromclient.readline(); capitalizedsentence = clientsentence.touppercase() + '\n'; Write out line outtoclient.writebytes(capitalizedsentence); to socket End of while loop, loop back and wait for another client connection Example: Java client (TCP) Example: Java client (TCP), cont. Create input stream Create client socket, connect to server Create output stream attached to socket import java.io.*; import java.net.*; class TCPClient public static void main(string argv[]) throws Exception String sentence; String modifiedsentence; BufferedReader infromuser = new BufferedReader(new InputStreamReader(System.in)); Socket clientsocket = new Socket("hostname", 6789); DataOutputStream outtoserver = new DataOutputStream(clientSocket.getOutputStream()); Create input stream attached to socket Send line to server Read line from server BufferedReader infromserver = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); sentence = infromuser.readline(); outtoserver.writebytes(sentence + '\n'); modifiedsentence = infromserver.readline(); System.out.println("FROM SERVER: " + modifiedsentence); clientsocket.close(); 15

16 Socket programming with UDP Client/server socket interaction: UDP UDP: no connection between client and server no handshaking sender explicitly attaches IP address and port of destination server must extract IP address, port of sender from received datagram UDP: transmitted data may be received out of order, or lost application viewpoint UDP provides unreliable transfer of groups of bytes ( datagrams ) between client and server Server (running on hostid) create socket, port=x, for incoming request: serversocket = DatagramSocket() read request from serversocket write reply to serversocket specifying client host address, port umber Client create socket, clientsocket = DatagramSocket() Create, address (hostid, port=x, send datagram request using clientsocket read reply from clientsocket close clientsocket Sockets used for datagrams Example: Java server (UDP) Sending a message s = socket(af_inet, SOCK_DGRAM, 0) bind(s, ClientAddress) sendto(s, "message", ServerAddress) Receiving a message s = socket(af_inet, SOCK_DGRAM, 0) bind(s, ServerAddress) amount = recvfrom(s, buffer, from) Create datagram socket at port 9876 import java.io.*; import java.net.*; class UDPServer public static void main(string args[]) throws Exception DatagramSocket serversocket = new DatagramSocket(9876); byte[] receivedata = new byte[1024]; byte[] senddata = new byte[1024]; ServerAddress and ClientAddress are socket addresses Create space for received datagram Receive datagram while(true) DatagramPacket receivepacket = new DatagramPacket(receiveData, receivedata.length); serversocket.receive(receivepacket); 16

17 Example: Java server (UDP), cont Example: Java client (UDP) Get IP addr port #, of sender Create datagram to send to client Write out datagram to socket String sentence = new String(receivePacket.getData()); InetAddress IPAddress = receivepacket.getaddress(); int port = receivepacket.getport(); String capitalizedsentence = sentence.touppercase(); senddata = capitalizedsentence.getbytes(); DatagramPacket sendpacket = new DatagramPacket(sendData, senddata.length, IPAddress, port); serversocket.send(sendpacket); End of while loop, loop back and wait for another datagram Create input stream Create client socket Translate hostname to IP address using DNS import java.io.*; import java.net.*; class UDPClient public static void main(string args[]) throws Exception BufferedReader infromuser = new BufferedReader(new InputStreamReader(System.in)); DatagramSocket clientsocket = new DatagramSocket(); InetAddress IPAddress = InetAddress.getByName("hostname"); byte[] senddata = new byte[1024]; byte[] receivedata = new byte[1024]; String sentence = infromuser.readline(); senddata = sentence.getbytes(); Example: Java client (UDP), cont. Create datagram with data-to-send, length, IP addr, port Send datagram to server Read datagram from server DatagramPacket sendpacket = new DatagramPacket(sendData, senddata.length, IPAddress, 9876); clientsocket.send(sendpacket); DatagramPacket receivepacket = new DatagramPacket(receiveData, receivedata.length); clientsocket.receive(receivepacket); String modifiedsentence = new String(receivePacket.getData()); System.out.println("FROM SERVER:" + modifiedsentence); clientsocket.close(); 17

Communication in Distributed Systems: Sockets Programming. Operating Systems

Communication in Distributed Systems: Sockets Programming. Operating Systems Communication in Distributed Systems: Sockets Programming Operating Systems TCP/IP layers Layers Message Application Transport Internet Network interface Messages (UDP) or Streams (TCP) UDP or TCP packets

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

Chapter 2 Application Layer

Chapter 2 Application Layer Chapter 2 Application Layer A note on the use of these ppt slides: We re making these slides freely available to all (faculty, students, readers). They re in PowerPoint form so you can add, modify, and

More information

Introduction to Sockets 9/25/14

Introduction to Sockets 9/25/14 Introduction to Sockets 9/25/14 81 Remote communication Inter-process communication is at the heart of all distributed systems Using the network protocol stack on a node is the only way to communicate

More information

Chapter 2: outline. 2.1 principles of network applications. 2.6 P2P applications 2.7 socket programming with UDP and TCP

Chapter 2: outline. 2.1 principles of network applications. 2.6 P2P applications 2.7 socket programming with UDP and TCP Chapter 2: outline 2.1 principles of network applications app architectures app requirements 2.2 Web and HTTP 2.3 FTP 2.4 electronic mail SMTP, POP3, IMAP 2.5 DNS 2.6 P2P applications 2.7 socket programming

More information

Chapter 2 outline. 2.1 Principles of app layer protocols

Chapter 2 outline. 2.1 Principles of app layer protocols Chapter 2 outline 2.1 Principles of app layer protocols clients and servers app requirements 2.2 Web and HTTP 2.3 FTP 2.4 Electronic Mail SMTP, POP3, IMAP 2.5 DNS 2.6 Socket programming with TCP 2.7 Socket

More information

Chapter 2 Application Layer

Chapter 2 Application Layer Internet and Intranet Protocols and Applications Lecture 4: Application Layer 3: Socket Programming Spring 2006 Arthur Goldberg Computer Science Department New York University artg@cs.nyu.edu Chapter 2

More information

CPSC 441 UDP Socket Programming. Department of Computer Science University of Calgary

CPSC 441 UDP Socket Programming. Department of Computer Science University of Calgary CPSC 441 UDP Socket Programming Department of Computer Science University of Calgary Socket programming using UDP (vs TCP) UDP: no connection between client and server vno handshaking vsender explicitly

More information

Process Communication COMPUTER NETWORKING Part 2

Process Communication COMPUTER NETWORKING Part 2 Process Communication COMPUTER NETWORKING Part 2 Client-server paradigm and Socket Programming ch 18 Thanks to the authors of the textbook [USP] and [KR] for providing the base slides. I made several changes/additions.

More information

CSCD 330 Network Programming Spring 2018

CSCD 330 Network Programming Spring 2018 CSCD 330 Network Programming Spring 2018 Lecture 7 Application Layer Socket Programming in Java Reading: Chapter 2, Java links Relevant Links page Some Material in these slides from J.F Kurose and K.W.

More information

CPSC 441 Tutorial - 11 UDP Socket Programming Department of Computer Science University of Calgary

CPSC 441 Tutorial - 11 UDP Socket Programming Department of Computer Science University of Calgary CPSC 441 Tutorial - 11 UDP Programming Department of Computer Science University of Calgary TCP Vs UDP Input: receives packet (TCP receives byte stream ) Output: sends packet (TCP sends byte stream ) What

More information

CSCD 330 Network Programming Winter 2019

CSCD 330 Network Programming Winter 2019 CSCD 330 Network Programming Winter 2019 Lecture 7 Application Layer Socket Programming in Java Reading: Chapter 2, Java links Relevant Links page Some Material in these slides from J.F Kurose and K.W.

More information

Computer Networking Introduction

Computer Networking Introduction Computer Networking Introduction Halgurd S. Maghdid Software Engineering Department Koya University-Koya, Kurdistan-Iraq Lecture No.6 Chapter 2: outline 2.1 principles of network applications app architectures

More information

CSCD 330 Network Programming Spring 2018

CSCD 330 Network Programming Spring 2018 CSCD 330 Network Programming Spring 2018 Lecture 6 Application Layer Socket Programming in Java Reading for Java Client/Server see Relevant Links Some Material in these slides from J.F Kurose and K.W.

More information

Lecture 3. Java Socket Programming. TCP, UDP and URL

Lecture 3. Java Socket Programming. TCP, UDP and URL Lecture 3 TCP, UDP and URL 1 Java Sockets Programming The package java.net provides support for sockets programming (and more). Typically you import everything defined in this package with: import java.net.*;

More information

Lecture 05: Application Layer (Part 02) FTP, Peer-to-Peer, . Dr. Anis Koubaa

Lecture 05: Application Layer (Part 02) FTP, Peer-to-Peer,  . Dr. Anis Koubaa NET 331 Computer Networks Lecture 05: Application Layer (Part 02) FTP, Peer-to-Peer, Email Dr. Anis Koubaa Reformatted slides from textbook Computer Networking a top-down appraoch, Fifth Edition by Kurose

More information

Layer 4 - Transport Layer. What do we need a Transport Layer for? Transport Protocols in the TCP/IP Reference Model. The Transport Layer TCP and UDP

Layer 4 - Transport Layer. What do we need a Transport Layer for? Transport Protocols in the TCP/IP Reference Model. The Transport Layer TCP and UDP Layer 4 - Transport Layer Core of the protocol hierarchy: Network-independent, reliable and economical data transfer Tasks of the transport layer: Connection-oriented or connectionless data transfer Addressing

More information

Layer 4 - Transport Layer

Layer 4 - Transport Layer Layer 4 - Transport Layer Core of the protocol hierarchy: Network-independent, reliable and economical data transfer Tasks of the transport layer: Connection-oriented or connectionless data transfer Addressing

More information

CS 355. Computer Networking. Wei Lu, Ph.D., P.Eng.

CS 355. Computer Networking. Wei Lu, Ph.D., P.Eng. CS 355 Computer Networking Wei Lu, Ph.D., P.Eng. Chapter 2: Application Layer Overview: Principles of network applications? Introduction to Wireshark Web and HTTP FTP Electronic Mail: SMTP, POP3, IMAP

More information

Computer Networks. 2.Application Layer. László Böszörményi Computer Networks Application Layer - 1

Computer Networks. 2.Application Layer. László Böszörményi Computer Networks Application Layer - 1 Computer Networks 2.Application Layer László Böszörményi Computer Networks Application Layer - 1 Applications + App Layer Protocols Applications, app. processes E.g., E-mail, WWW, DNS, P2P file sharing,

More information

Computer Networks Unit II Transport layer (2012 pattern)

Computer Networks Unit II Transport layer (2012 pattern) Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg. SNJB s KBJ COE, Chandwad Introduction 1-1 Chapter 2: ROAD MAP Transport Layer

More information

TCP and UDP Socket Programming in JAVA TCP Socket Programming 1. Write code for Client and save in GreetingClient.java

TCP and UDP Socket Programming in JAVA TCP Socket Programming 1. Write code for Client and save in GreetingClient.java TCP Socket Programming 1. Write code for Client and save in GreetingClient.java // File Name GreetingClient.java public class GreetingClient public static void main(string [] args) String servername =

More information

JAVA SOCKET PROGRAMMING

JAVA SOCKET PROGRAMMING JAVA SOCKET PROGRAMMING WHAT IS A SOCKET? Socket The combination of an IP address and a port number. (RFC 793 original TCP specification) The name of the Berkeley-derived application programming interfaces

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

Part 2: Application Layer

Part 2: Application Layer Part 2: Application Layer Our goals: conceptual, implementation aspects of network application protocols client-server paradigm service models learn about protocols by examining popular application-level

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

Data and Computer Communications. Tenth Edition by William Stallings

Data and Computer Communications. Tenth Edition by William Stallings Data and Computer Communications Tenth Edition by William Stallings Data and Computer Communications, Tenth Edition by William Stallings, (c) Pearson Education - Prentice Hall, 2013 CHAPTER 2 Protocol

More information

Chapter 2a SOCKET PROGRAMMING

Chapter 2a SOCKET PROGRAMMING Overview Basic concepts Java programming Chapter 2a SOCKET PROGRAMMING Client & server TCP & UDP Threads C programming API details Computer Networks Timothy Roscoe Summer 2007 TCP client and server Asynchronous

More information

SE322 Software Design and Architecture

SE322 Software Design and Architecture SE322 Software Design and Architecture Middleware Lecture 1 June 30 th, 2011 Pree Thiengburanathum pree.t@cmu.ac.th SE322, Middleware, Pree T. 1 Middleware References Middleware Architecture with Patterns

More information

Java Basics 5 - Sockets. Manuel Oriol - May 4th, 2006

Java Basics 5 - Sockets. Manuel Oriol - May 4th, 2006 Java Basics 5 - Sockets Manuel Oriol - May 4th, 2006 Connected / Disconnected Modes Connected mode: path chosen and packets arrive all, in correct order (e.g. Phone) Disconnected mode: path not chosen

More information

Chapter 2: Application Layer last updated 22/09/03

Chapter 2: Application Layer last updated 22/09/03 Chapter 2: Application Layer last updated 22/09/03 Chapter goals: conceptual + implementation aspects of network application protocols client server paradigm service models learn about protocols by examining

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

Communication Basics, RPC & RMI. CS403/534 Distributed Systems Erkay Savas Sabanci University

Communication Basics, RPC & RMI. CS403/534 Distributed Systems Erkay Savas Sabanci University Communication Basics, RPC & RMI CS403/534 Distributed Systems Erkay Savas Sabanci University 1 Communication Models 1. Remote Procedure Call (RPC) Client/Server application 2. Remote Method Invocation

More information

Computer Communication Networks Socket Programming

Computer Communication Networks Socket Programming Computer Communication Networks Socket Programming ICEN/ICSI 416 Fall 2018 Prof. Aveek Dutta 1 Application Programming Interface Interface exported by the network Since most network protocols are implemented

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

Unit 1 Java Networking

Unit 1 Java Networking Q1. What is Server Socket? Discuss the difference between the Socket and ServerSocket class. The ServerSocket class (java.net) can be used to create a server socket. This object is used to establish communication

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 8, page 1 Today: Lightweight RPCs Remote Method Invocation (RMI)

More information

Πρωτόκολλα Διαδικτύου (ΨΣ-326 DS151)

Πρωτόκολλα Διαδικτύου (ΨΣ-326 DS151) ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΕΙΡΑΙΩΣ ΤΜΗΜΑ ΨΗΦΙΑΚΩΝ ΣΥΣΤΗΜΑΤΩΝ Πρωτόκολλα Διαδικτύου (ΨΣ-326 DS151) 3 Η ΕΡΓΑΣΤΗΡΙΑΚΗ ΔΙΑΛΕΞΗ (SOCKET PROGRAMMING) Υπεύθυνος καθηγητής: Άγγελος Ρούσκας Βοηθός: Υ.Δ. Ευθύμης Οικονόμου Πέμπτη

More information

Client/Server Computing & Socket Programming

Client/Server Computing & Socket Programming CPSC 852 Intering Client/Server Computing & Socket Programming Michele Weigle Department of Computer Science Clemson University mweigle@cs.clemson.edu http://www.cs.clemson.edu/~mweigle/courses/cpsc852

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

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

JAVA RMI. Remote Method Invocation

JAVA RMI. Remote Method Invocation 1 JAVA RMI Remote Method Invocation 2 Overview Java RMI is a mechanism that allows one to invoke a method on an object that exists in another address space. The other address space could be: On the same

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

Distributed Software Systems

Distributed Software Systems RMI Programming Distributed Software Systems RMI Programming RMI software Generated by IDL compiler Proxy Behaves like remote object to clients (invoker) Marshals arguments, forwards message to remote

More information

Tommy Färnqvist, IDA, Linköping University

Tommy Färnqvist, IDA, Linköping University Lecture 4 Threads and Networking in Java TDDC32 Lecture notes in Design and Implementation of a Software Module in Java 23 January 2013 Tommy Färnqvist, IDA, Linköping University 4.1 Lecture Topics Contents

More information

Chapter 2 APPLICATIONS

Chapter 2 APPLICATIONS Chapter 2 APPLICATIONS Distributed Computing Group Computer Networks Summer 2006 Overview Learn specific application layer protocols http, ftp, smtp, pop, dns, etc. How to program network applications?

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

Chapter 2 Application Layer

Chapter 2 Application Layer CSB051 Computer Networks 電腦網路 Chapter 2 Application Layer 吳俊興國立高雄大學資訊工程學系 Chapter 2: Outline 2.1 Principles of network applications 2.2 Web and HTTP 2.3 FTP 2.4 Electronic Mail SMTP, POP3, IMAP 2.5 DNS

More information

Sockets. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Sockets. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Sockets Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Internet Connections (1) Connection Clients and servers communicate by sending streams of

More information

Hyo-bong Son Computer Systems Laboratory Sungkyunkwan University

Hyo-bong Son Computer Systems Laboratory Sungkyunkwan University Sockets Hyo-bong Son (proshb@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Client-Server Model Most network application is based on the client-server model: A server

More information

5.4. Events and notifications

5.4. Events and notifications 5.4. Events and notifications Distributed event-based systems extend local event model Allowing multiple objects at diff. locations to be notified of events taking place at an object Two characteristics:

More information

Sockets. Dong-kun Shin Embedded Software Laboratory Sungkyunkwan University Embedded Software Lab.

Sockets. Dong-kun Shin Embedded Software Laboratory Sungkyunkwan University  Embedded Software Lab. 1 Sockets Dong-kun Shin Embedded Software Laboratory Sungkyunkwan University http://nyx.skku.ac.kr Internet Connections (1) 2 Connection Clients and servers communicate by sending streams of bytes over

More information

Embedded System Design

Embedded System Design Embedded System Design Lecture 9 Jaeyong Chung Robust Systems Laboratory Incheon National University Inter-process Commnucation (IPC) Chung EPC6071 2 Inter-process Commnucation (IPC) A set of methods for

More information

The BSD UNIX Socket Interface (CS 640 Lecture) Assignment 1. Interprocess Communication (IPC) Work Individually (no groups)

The BSD UNIX Socket Interface (CS 640 Lecture) Assignment 1. Interprocess Communication (IPC) Work Individually (no groups) The BSD UNIX Socket Interface (CS 640 Lecture) Assignment 1 Work Individually (no groups) Due Date: in class, Monday, September 19 Robert T Olsen olsen@cswiscedu 7390CS Office Hours: 3-5T, 11-12F - exception

More information

Chapter 2 Application Layer

Chapter 2 Application Layer Chapter 2 Application Layer A note on the use of these ppt slides: We re making these slides freely available to all (faculty, students, readers). They re in PowerPoint form so you can add, modify, and

More information

RPC Programming. Some knowledge of C & Unix A network with at least two connected machines.

RPC Programming. Some knowledge of C & Unix A network with at least two connected machines. RPC Programming 1.0 Prerequisites Some knowledge of C & Unix A network with at least two connected machines. 2.0 Objectives: 1. To understand the basic principles of RPC 2. To develop a program which returns

More information

Piotr Mielecki Ph. D.

Piotr Mielecki Ph. D. Piotr Mielecki Ph. D. http://mielecki.ristel.pl/ piotr.mielecki@pwr.edu.pl pmielecki@gmail.com Building blocks of client-server applications: Client, Server, Middleware. Simple client-server application:

More information

Chapter 2 Application Layer. 2: Application Layer 1

Chapter 2 Application Layer. 2: Application Layer 1 Chapter 2 Application Layer 2: Application Layer 1 Chapter 2: Application layer 2.1 Principles of network applications 2.2 Web and HTTP 2.3 FTP 2.4 Electronic Mail SMTP, POP3, IMAP 2.5 DNS 2.6 P2P applications

More information

Chapter 2 Application Layer

Chapter 2 Application Layer Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007. All material copyright 1996-2007 J.F Kurose and K.W. Ross, All Rights

More information

Chapter 2 Application Layer

Chapter 2 Application Layer Chapter 2 Application Layer Prof. Yuh-Shyan Chen Department of Computer Science and Information Engineering National Taipei University March 2007 Computer Networking: A Top Down Approach Featuring the

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

Distributed Systems. 5. Remote Method Invocation

Distributed Systems. 5. Remote Method Invocation Distributed Systems 5. Remote Method Invocation Werner Nutt 1 Remote Method Invocation 5.1 Communication between Distributed Objects 1. Communication between Distributed Objects 2. RMI 2 Middleware Middleware

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

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.

More information

DISTRIBUTED OBJECTS AND REMOTE INVOCATION

DISTRIBUTED OBJECTS AND REMOTE INVOCATION DISTRIBUTED OBJECTS AND REMOTE INVOCATION Introduction This chapter is concerned with programming models for distributed applications... Familiar programming models have been extended to apply to distributed

More information

Chapter 2 Application Layer

Chapter 2 Application Layer Chapter 2 Application Layer A note on the use of these ppt slides: We re making these slides freely available to all (faculty, students, readers). They re in PowerPoint form so you can add, modify, and

More information

Chapter 2 Application Layer

Chapter 2 Application Layer Chapter 2 Application Layer A note on the use of these ppt slides: We re making these slides freely available to all (faculty, students, readers). They re in PowerPoint form so you can add, modify, and

More information

COMP 3331/9331: Computer Networks and Applications

COMP 3331/9331: Computer Networks and Applications COMP 3331/9331: Computer Networks and Applications http://www.cse.unsw.edu.au/~cs3331 Week 3 Application Layer: DNS, P2P and Socket Programming Reading Guide: Chapter 2 - Sections 2.5 2.7 Announcements

More information

Chapter 2 Application Layer

Chapter 2 Application Layer Chapter 2 Application Layer A note on the use of these ppt slides: We re making these slides freely available to all (faculty, students, readers). They re in PowerPoint form so you can add, modify, and

More information

Chapter 2 Application Layer

Chapter 2 Application Layer Chapter 2 Application Layer A note on the use of these ppt slides: We re making these slides freely available to all (faculty, students, readers). They re in PowerPoint form so you can add, modify, and

More information

Chapter 2 Application Layer

Chapter 2 Application Layer Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009. All material copyright 1996-2009 J.F Kurose and K.W. Ross, All Rights

More information

Chapter 2 Application Layer

Chapter 2 Application Layer Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009. All material copyright 1996-2009 J.F Kurose and K.W. Ross, All Rights

More information

Applications. RMI, RPC and events. Request reply protocol External data representation. Operating System

Applications. RMI, RPC and events. Request reply protocol External data representation. Operating System Figure 5.1 Middleware layer Applications RMI, RPC and events Request reply protocol External data representation Middleware layers Operating System Instructor s Guide for Coulouris, Dollimore and Kindberg

More information

PA #2 Reviews. set_name, get_name, del_name. Questions? Will be modified after PA #4 ~

PA #2 Reviews. set_name, get_name, del_name. Questions? Will be modified after PA #4 ~ Sockets Prof. Jin-Soo Kim( jinsookim@skku.edu) TA Dong-Yun Lee(dylee@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu PA #2 Reviews set_name, get_name, del_name Will

More information

COMP 211 Chapter 2 Application Layer

COMP 211 Chapter 2 Application Layer COMP 211 Chapter 2 Application Layer All material copyright 1996-2012 J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top Down Approach 7 th edition Jim Kurose, Keith Ross Pearson/Addison

More information

CS307 Operating Systems Processes

CS307 Operating Systems Processes CS307 Processes Fan Wu Department of Computer Science and Engineering Shanghai Jiao Tong University Spring 2018 Process Concept Process a program in execution An operating system executes a variety of

More information

Processes. Process Concept. The Process. The Process (Cont.) Process Control Block (PCB) Process State

Processes. Process Concept. The Process. The Process (Cont.) Process Control Block (PCB) Process State CS307 Process Concept Process a program in execution Processes An operating system executes a variety of programs: Batch system jobs Time-shared systems user programs or tasks All these activities are

More information

Chapter 2 Application Layer

Chapter 2 Application Layer Chapter 2 Application Layer A note on the use of these ppt slides: We re making these slides freely available to all (faculty, students, readers). They re in PowerPoint form so you can add, modify, and

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

A note on the use of these ppt slides:

A note on the use of these ppt slides: Chapter 2 Application Layer A note on the use of these ppt slides: We re making these slides freely available to all (faculty, students, readers). They re in PowerPoint form so you can add, modify, and

More information

Chapter 2: Application layer. Chapter 2 Application Layer. Chapter 2: Application Layer. Some network apps

Chapter 2: Application layer. Chapter 2 Application Layer. Chapter 2: Application Layer. Some network apps Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009. Chapter 2: Application layer 2.1 Principles of network applications

More information

Modulo II Socket, RMI e Corba

Modulo II Socket, RMI e Corba Modulo II Socket, RMI e Corba Prof. Ismael H F Santos April 05 Prof. Ismael H. F. Santos - ismael@tecgraf.puc-rio.br 1 Ementa Sistemas Distribuídos Cliente-Servidor April 05 Prof. Ismael H. F. Santos -

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

Telematics 1. Chapter 9 Internet Application Layer. Principles of network applications Important application protocols Socket programming

Telematics 1. Chapter 9 Internet Application Layer. Principles of network applications Important application protocols Socket programming Telematics 1 Chapter 9 Internet Application Layer Principles of network applications Important application protocols Socket programming Acknowledgement: Most of these slides have been prepared by J.F.

More information

Chapter 2: Application layer. Chapter 2 Application Layer. Some network apps. Chapter 2: Application Layer. Chapter 2: Application layer

Chapter 2: Application layer. Chapter 2 Application Layer. Some network apps. Chapter 2: Application Layer. Chapter 2: Application layer Chapter 2 Application Layer A note on the use of these ppt slides: We re making these slides freely available to all (faculty, students, readers). They re in PowerPoint form so you can add, modify, and

More information

Chapter 2: Application layer. Chapter 2 Application Layer. Chapter 2: Application Layer. Some network apps

Chapter 2: Application layer. Chapter 2 Application Layer. Chapter 2: Application Layer. Some network apps Chapter 2 Application Layer A note on the use of these ppt slides: We re making these slides freely available to all (faculty, students, readers). They re in PowerPoint form so you can add, modify, and

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

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

Chapter 4: Processes. Process Concept. Process State

Chapter 4: Processes. Process Concept. Process State 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

COMPUTER NETWORKS CHAP 2 : APPLICATION LAYER

COMPUTER NETWORKS CHAP 2 : APPLICATION LAYER COMPUTER NETWORKS CHAP 2 : APPLICATION LAYER 0210 8 h 12 h 22 Sep 2011 Chapter 2: Application layer 2 2.1 Principles of network applications 2.2 Web and HTTP 2.3 FTP 2.4 Electronic Mail SMTP, POP3, IMAP

More information

Distributed Systems. Communication (2) Schedule of Today. Distributed Objects. Distributed Objects and RMI. Corba IDL Example

Distributed Systems. Communication (2) Schedule of Today. Distributed Objects. Distributed Objects and RMI. Corba IDL Example 1 Overview Distributed Systems Communication (2) Lecture 4 Schedule of Today Remote Object (Method) Invocation Binding Client to an Object Static versus Dynamic Binding Basics MPI, Sockets, Distributed

More information

Distributed Systems. Communication (2) Lecture Universität Karlsruhe, System Architecture Group

Distributed Systems. Communication (2) Lecture Universität Karlsruhe, System Architecture Group Distributed Systems Communication (2) Lecture 4 2003 Universität Karlsruhe, System Architecture Group 1 Overview Schedule of Today Remote Object (Method) Invocation Distributed Objects Binding Client to

More information

Introduction to Client-Server Model

Introduction to Client-Server Model Preview Introduction to Client-Server Model Motivation of Client-Server Model Terminologies and Concepts in Client-Server Model Connectionless vs. Connection-Oriented Stateless vs. Stateful Server Identify

More information

Data Communications & Networks. Session 2 Main Theme Application Layer. Dr. Jean-Claude Franchitti

Data Communications & Networks. Session 2 Main Theme Application Layer. Dr. Jean-Claude Franchitti Data Communications & Networks Session 2 Main Theme Application Layer Dr. Jean-Claude Franchitti New York University Computer Science Department Courant Institute of Mathematical Sciences Adapted from

More information

Data Communications & Networks. Session 2 Main Theme Application Layer. Dr. Jean-Claude Franchitti

Data Communications & Networks. Session 2 Main Theme Application Layer. Dr. Jean-Claude Franchitti Data Communications & Networks Session 2 Main Theme Application Layer Dr. Jean-Claude Franchitti New York University Computer Science Department Courant Institute of Mathematical Sciences Adapted from

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

NETWORK PROGRAMMING. Instructor: Junaid Tariq, Lecturer, Department of Computer Science

NETWORK PROGRAMMING. Instructor: Junaid Tariq, Lecturer, Department of Computer Science NETWORK PROGRAMMING CSC- 341 25 Instructor: Junaid Tariq, Lecturer, Department of Computer Science 26 9 Lecture Sockets as means for inter-process communication (IPC) application layer Client Process Socket

More information

Contents. Java RMI. Java RMI. Java RMI system elements. Example application processes/machines Client machine Process/Application A

Contents. Java RMI. Java RMI. Java RMI system elements. Example application processes/machines Client machine Process/Application A Contents Java RMI G53ACC Chris Greenhalgh Java RMI overview A Java RMI example Overview Walk-through Implementation notes Argument passing File requirements RPC issues and RMI Other problems with RMI 1

More information

CSCI Computer Networks Spring 2017

CSCI Computer Networks Spring 2017 source: computer-networks-webdesign.com CSCI 6760 - Computer Networks Spring 2017 Instructor: Prof. Roberto Perdisci perdisci@cs.uga.edu These slides are adapted from the textbook slides by J.F. Kurose

More information

Telematics Chapter 8: Transport Layer

Telematics Chapter 8: Transport Layer Telematics Chapter 8: Transport Layer User watching video clip Application Layer Presentation Layer Session Layer Transport Layer Server with video clips Application Layer Presentation Layer Session Layer

More information