SE322 Software Design and Architecture

Size: px
Start display at page:

Download "SE322 Software Design and Architecture"

Transcription

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

2 Middleware References Middleware Architecture with Patterns and Frameworks E-book link: About Author of the book Professor of Computer Science Sacha Krakowiak SE322, Middleware, Pree T. 2

3 Middle Topics Introduction to middleware Middleware principles and basic patterns Naming and Binding Communication and Distributed Object Coordination and Events Composition System Management SE322, Middleware, Pree T. 3

4 Agenda Introduction to Middleware Motivation for Middleware Categories of Middleware Issues and Challenges in Middleware Design SE322, Middleware, Pree T. 4

5 Introduction to Middleware Overview Software layer that lies between the operating system and the applications on each site of the system. Make application development easier. To support heterogeneous environments open networking standards were introduced (i.e. OSI) SE322, Middleware, Pree T. 5

6 Example of Middle in OSI layers SE322, Middleware, Pree T. 6

7 SE322, Middleware, Pree T. 7

8 SE322, Middleware, Pree T. 8

9 Introduction to Middleware How do we build/connect applications over a network? Answer: Middleware The growth of network-based applications, the more important of middleware. Distributed objects and components. Message-oriented communication. Mobile application support. SE322, Middleware, Pree T. 9

10 What is middleware? Middleware enables applications running across multiple platforms to communicate with each other. Middleware shields the developer from dependencies on Network Protocols, OS and hardware platforms. Middleware is a software layer that lies between the operating system and the applications on each site of the system. SE322, Middleware, Pree T. 10

11 Motivation for Middleware Reusing legacy software Applications that have been developed before that advent of current open standards. Integrating previously independent application together with new developments. Cost of re-writing legacy application SE322, Middleware, Pree T. 11

12 Motivation for Middleware Integrating legacy applications SE322, Middleware, Pree T. 12

13 Motivation for Middleware Mediation Systems Collection of various devices interconnected by a network E.g. Computer networks, telecommunication systems Tasks involves remote access to the devices, data collection and reaction to the critical events. SE322, Middleware, Pree T. 13

14 Motivation for Middleware Monitoring and controlling networked equipments. SE322, Middleware, Pree T. 14

15 Motivation for Middleware Component-based architectures. Allowing the developers to concentrate on application-specific problems, through the provision of common services. Improving portability and interoperability by defined standard interfaces. Improving scalability by separating the application and database management layers, which may be separately upgraded to cater for an increase in load. SE322, Middleware, Pree T. 15

16 Motivation for Middleware An environment for component-based applications. SE322, Middleware, Pree T. 16

17 Motivation for Middleware Client adaption through proxies. Hiding distribution. Hiding the heterogeneity of the various hardware components. Providing uniform, standard, high-level interfaces to the application developers and integrators. Supplying a set of common service to perform various general purpose functions. SE322, Middleware, Pree T. 17

18 Motivation for Middleware Adaption to client resources through proxies. SE322, Middleware, Pree T. 18

19 Motivation for Middleware Middleware Organization SE322, Middleware, Pree T. 19

20 Categories of Middleware Communication properties Fixed vs variable topology (e.g. Mobile phone) Predictable vs unpredictable characteristics (e.g. latency) Fixed, unpredictable (e.g. LAN, the internet) Fixed, predictable(e.g. Gaming) Variable, unpredictable(e.g. Mobile) SE322, Middleware, Pree T. 20

21 Categories of Middleware Architecture and interfaces. Managed entities Objects Agents Components Service provision structure (predefined roles) Client and Serve Publisher and subscriber Service provision interface Communication follow by these paradigm Synchronous (wait for reply) Asynchronous (doesn t care) SE322, Middleware, Pree T. 21

22 Next lecture Introduction to Middleware A simple instance of Middleware: Remote Procedure call (RPC) History Note of Middleware Middleware principles and basic patterns Services and Interface SE322, Middleware, Pree T. 22

23 SE323 Software Design and Architecture Middleware lecture 2 Pree Thienguburanathum pree.t@cmu.ac.th SE322, Middleware, Pree T. 23

24 Agenda Introduction of Middleware Motivation for Middleware Categories of Middleware A Simple Instance of Middleware: Remote Procedure Call Middleware Principle and Basic Patterns Services and Interfaces.. Naming and Binding SE322, Middleware, Pree T. 24

25 Simple Middleware System Remote Procedure Call(RPC) Motivations and requirements Abstraction Key concept of programming. black box Encapsulation The procedure may only called through an interface. SE322, Middleware, Pree T. 25

26 Simple Middleware System Remote procedure call SE322, Middleware, Pree T. 26

27 Simple Middleware System Advantages Semantics between local and remote call. Portability is improved. Disadvantages Problem with preserving semantics The failure modes are different in the local and distributes cases. The semantics of parameter passing is different SE322, Middleware, Pree T. 27

28 RPC Implementation Principle RPC(Birrell and Nelson 1984) Client and Server stubs The client stub acts as a local representative of the server on the client ; the server stub has a symmetrical role. SE322, Middleware, Pree T. 28

29 RPC Implementation Principle Remote procedure call: maincomponents SE322, Middleware, Pree T. 29

30 Client side: Process Management and Synchronization The calling process must be blocked while waiting for the procedure to return. Server side: Parallel execution problem such that the server may be used by multiple clients. SE322, Middleware, Pree T. 30

31 Parallel computing What is Parallel Computing? Traditionally, software has been written for serial computation: To be run on a single computer having a single Central Processing Unit (CPU); A problem is broken into a discrete series of instructions. Instructions are executed one after another. Only one instruction may execute at any moment in time. SE322, Middleware, Pree T. 31

32 Parallel computing SE322, Middleware, Pree T. 32

33 Parallel computing In the simplest sense, parallel computing is the simultaneous use of multiple compute resources to solve a computational problem:to be run using multiple CPUs A problem is broken into discrete parts that can be solved concurrently Each part is further broken down to a series of instructions Instructions from each part execute simultaneously on different CPUs SE322, Middleware, Pree T. 33

34 Parallel computing SE322, Middleware, Pree T. 34

35 More about Parallel computing The compute resources can include: A single computer with multiple processors; CMP System or Het. CMP system. An arbitrary number of computers connected by a network; A combination of both. The Universe is Parallel: Parallel computing is an evolution of serial computing that attempts to emulate what has always been the state of affairs in the natural world: many complex, interrelated events happening at the same time, yet within a sequence. For examples: Galaxy formation Planetary movement Weather and ocean patterns Tectonic plate drift Rush hour traffic Automobile assembly line Building a space shuttle Ordering a hamburger at the drive through. SE322, Middleware, Pree T. 35

36 More about Parallel computing SE322, Middleware, Pree T. 36

37 Java Server Thread public class sample_server { private static int port=4444, maxconnections=0; // Listen for incoming connections and handle them public static void main(string[] args) { int i=0; try{ ServerSocket listener = new ServerSocket(port); Socket server; while((i++ < maxconnections) (maxconnections == 0)){ docomms connection; server = listener.accept(); docomms conn_c= new docomms(server); Thread t = new Thread(conn_c); t.start(); } } catch (IOException ioe) { System.out.println("IOException on socket listen: " + ioe); ioe.printstacktrace(); } } } SE322, Middleware, Pree T. 37

38 Java Server Thread class docomms implements Runnable { private Socket server; private String line,input; docomms(socket server) { this.server=server; } public void run () { input=""; try { // Get input from the client DataInputStream in = new DataInputStream (server.getinputstream()); PrintStream out = new PrintStream(server.getOutputStream()); while((line = in.readline())!= null &&!line.equals(".")) { input=input + line; out.println("i got:" + line); } // Now write to the client System.out.println("Overall message is:" + input); out.println("overall message is:" + input); } server.close(); } catch (IOException ioe) { System.out.println("IOException on socket listen: " + ioe); ioe.printstacktrace(); } } SE322, Middleware, Pree T. 38

39 Process Management and Synchronization Remote procedure call: Thread management on the server side SE322, Middleware, Pree T. 39

40 Parameter marshalling and unmarshalling Parameters and results need to be transmitted over the network. They need to be put in a serialized form Ensure portability and standard E.g. byte ordering Converting data from a local representation to standard serialized form is called marshalling. The reverse conversion is called unmarshalling. SE322, Middleware, Pree T. 40

41 Parameter marshalling and unmarshalling Example of set or routines of marshallers writeint writestring Example of set or routines of unmarshaller readint readstring SE322, Middleware, Pree T. 41

42 Reacting to failures Failures may occur on the client site, or server side. 3 steps process Failure hypotheses Detecting failures Reacting to failure detection Fail-Step for nodes Time out mechanism SE322, Middleware, Pree T. 42

43 Overall organization of RPC Remote procedure call: overall flow of control SE322, Middleware, Pree T. 43

44 Developing Applications with RPC How are the client and server linked together? How are the client and server stubs constructed? How are the programs installed and started? SE322, Middleware, Pree T. 44

45 Client-Server Binding Remote procedure call: locating the server SE322, Middleware, Pree T. 45

46 Stub generation and Application deployment SE322, Middleware, Pree T. 46

47 Middleware Principles and Basic Patterns Services and Interfaces A hardware/software system is organized as a set of parts, or components, each of them may be describes as a service. A service is a contractually defined behavior that can be implemented and provided by any component for use by any component A provided service is usually embodied in a set of interfaces, each of which represents an aspect of the service. SE322, Middleware, Pree T. 47

48 Basic Interaction Mechanisms The simplest form of communication is an asynchronous transient event. SE322, Middleware, Pree T. 48

49 Basic Interaction Mechanisms A more elaborate form of communication is asynchronous persistent message passing SE322, Middleware, Pree T. 49

50 Basic Interaction Mechanisms Synchronous call SE322, Middleware, Pree T. 50

51 Next lecture Interfaces Architectural Patterns Multilevel Architectures Multitier Architectures Frameworks Distributed Objects Objects in Programming Remote Objects SE322, Middleware, Pree T. 51

52 SE323 Software Design and Architecture Middleware lecture 3 Tuesday 12 July, 2011 Pree Thienguburanathum pree.t@cmu.ac.th SE322, Middleware, Pree T. 52

53 Agenda Interfaces Architectural Patterns Framework Distribute Objects Programming Assignment SE322, Middleware, Pree T. 53

54 Interfaces An interface interaction between the requester and the provider of the service. 2 views of the interfaces The usage view: an interface defines the operations and data structures to be used for the provision of a service. The contract view: an interface defines a contract between the requester and the provider of the service. E.g. Programming language for usage view. Specific language, Service Level Agreement(SLA), or Quality of Service (QoS) for contract view. SE322, Middleware, Pree T. 54

55 Interfaces Synchronous procedure or method call, with parameters and return value. Access to an attribute, getter or setter. Asynchronous procedure call. Data stream provider (output channel) or receiver (input channel). SE322, Middleware, Pree T. 55

56 Interfaces Interfaces SE322, Middleware, Pree T. 56

57 Interfaces Interface Description Languages (IDL) No single common model of an IDL. Java and C# has its owns IDL. Encapsulation principle, to ensure the independence between interface and implementation. No assumption between sender and receiver. plug and play concept. SE322, Middleware, Pree T. 57

58 Interface interface Bicycle { void changecadence(int newvalue); // wheel revolutions per minute void changegear(int newvalue); void speedup(int increment); } void applybrakes(int decrement); SE322, Middleware, Pree T. 58

59 Interface class CAMTBicycle implements Bicycle { } // remainder of this class implemented as before SE322, Middleware, Pree T. 59

60 Interfaces The buttons on the front of your television set, for example, are the interface between you and the electrical wiring on the other side of its plastic casing. You press the "power" button to turn the television on and off. Making the complex simple! SE322, Middleware, Pree T. 60

61 Architectural Patterns Multilevel Architectures Layered Architectures Decomposing a complex system into layers of abstraction. SE322, Middleware, Pree T. 61

62 Multilevel Architecture Layered Architecture The interface provided by each level may be viewed as a set of function defining a library, as we known as Application Programming Interface (API) Alternative view is to consider each level as a Virtual Machine (VM) Examples: VMWare provides a completely virtualized set of hardware to the guest operating system Java runtime environment, the Java Virtual Machine(JVM) creates virtualized resources which the bytecode access. These actions are then passed on to the machine s actual resources. SE322, Middleware, Pree T. 62

63 VMWare Architecture VMware Virtual SMP enables a single virtual machine to span multiple physical processors. SE322, Middleware, Pree T. 63

64 JVM Architecture JVM emulation run on a physical machine SE322, Middleware, Pree T. 64

65 JVM Architecture JVM handles translations SE322, Middleware, Pree T. 65

66 Mutitier Architectures The historical evolution of a common form of client-server applications, in which a client s request are processed using information stored in a database. In the 1970s, DBMS functions and application are executed on the mainframe. SE322, Middleware, Pree T. 66

67 Mutitier Architectures In the 1980s work station are available as a client machine, GUI is introduced. Draw back!, modify application may have to modify Client and server. SE322, Middleware, Pree T. 67

68 Mutitier Architectures In the 1990s, the functions of application Is now split between the client and server machines. SE322, Middleware, Pree T. 68

69 Frameworks A software framework is a program skeleton that may be directly reused, or adapted according to well-defined rules, to solve a family of related problems. SE322, Middleware, Pree T. 69

70 Frameworks Example Frameworks architectures SE322, Middleware, Pree T. 70

71 Frameworks Example Figure a, The microkernel, an architecture introduced in the 1980s in an attempt to develop flexible operating systems. 2 layers The microkernel proper, which manages the hardware resources(processor, memory, I/O, network comm.) Provides an abstract resources management API to the upper level. The kernel, which implements a specific OS using the API of the microkernel. SE322, Middleware, Pree T. 71

72 Frameworks Example Figure b, organization of the middle tier of a 3- tier client-server architecture. The program is made up of application components, which use the API provided by the framework and must supply a set of callback interfaces. SE322, Middleware, Pree T. 72

73 Distributed Objects Objects in Programming Encapsulation Classes and instances Inheritance Polymorphism SE322, Middleware, Pree T. 73

74 Introduction to Distributing Objects Before understanding the Remote Objects in Distributing Objects. We must first understand the basic socket or networking in some programming language (OOP). Java networking support Socket and DatagramSocket Socket = TCP Datagram = UDP SE322, Middleware, Pree T. 74

75 Socket programming Goal: learn how to build client/server applications that communicate using sockets Socket API introduced in BSD4.1 UNIX, 1981 explicitly created, used, released by apps client/server paradigm two types of transport service via socket API: unreliable datagram reliable, byte streamoriented 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 SE322, Middleware, Pree T. 75

76 Socket-programming using TCP Socket: a door between application process and end-endtransport protocol (UDP or TCP) TCP service: reliable transfer of bytes from one process to another controlled by application developer controlled by operating system process socket TCP with buffers, variables internet process socket TCP with buffers, variables controlled by application developer controlled by operating system host or server host or server SE322, Middleware, Pree T. 76

77 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 SE322, Middleware, Pree T. 77

78 Socket programming with TCP Example client-server app: client reads line from standard input (infromuser stream), sends to server via socket (outtoserver stream) server reads line from socket server converts line to uppercase, sends back to client client reads, prints modified line from socket (infromserver stream) Input stream: sequence of bytes into process Output stream: sequence of bytes out of process client socket SE322, Middleware, Pree T. 78

79 Client/server socket interaction: TCP Server (running on hostid) Client create socket, port=x, for incoming request: welcomesocket = ServerSocket() wait for incoming connection request connectionsocket = welcomesocket.accept() TCP connection setup create socket, connect to hostid, port=x clientsocket = Socket() read request from connectionsocket write reply to connectionsocket close connectionsocket send request using clientsocket read reply from connectionsocket close clientsocket SE322, Middleware, Pree T. 79

80 Example: Java client (TCP) import java.io.*; import java.net.*; class TCPClient { Create input stream Create client socket, nect to Create server output stream ched to socket 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()); SE322, Middleware, Pree T. 80

81 Example: Java client (TCP), cont. 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(); } } SE322, Middleware, Pree T. 81

82 Example: Java server (TCP) import java.io.*; import java.net.*; class TCPServer { Create lcoming socket at port 6789 t, on welcoming cket for contact by client Create input ream, attached to socket 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())); SE322, Middleware, Pree T. 82

83 Create output stream, attached Read in line to socket from socket Write out line to socket Example: Java server (TCP), cont } } } DataOutputStream outtoclient = new DataOutputStream(connectionSocket.getOutputStream()); clientsentence = infromclient.readline(); capitalizedsentence = clientsentence.touppercase() + '\n outtoclient.writebytes(capitalizedsentence); End of while loop, loop back and wait for another client connection SE322, Middleware, Pree T. 83

84 Socket programming with 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 application viewpoint UDP provides unreliable transfer of groups of bytes ( datagrams ) between client and server UDP: transmitted data may be received out of order, or lost SE322, Middleware, Pree T. 84

85 Client/server socket interaction: UDP Server (running on hostid) Client create socket, port=x, for incoming request: serversocket = DatagramSocket() read request from serversocket create socket, clientsocket = DatagramSocket() Create, address (hostid, port=x), send datagram request using clientsocket write reply to serversocket specifying client host address, port number read reply from clientsocket close clientsocket SE322, Middleware, Pree T. 85

86 Example: Java client (UDP) import java.io.*; import java.net.*; Create input stream Create client socket Translate ostname to IP ress using DNS 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(); SE322, Middleware, Pree T. 86

87 Create datagram with data-to-send, length, IP addr, end datagram port to server ead datagram from server Example: Java client (UDP), cont. 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(); } SE322, Middleware, Pree T. 87

88 Example: Java server (UDP) import java.io.*; import java.net.*; Create atagram socket at port 9876 Create space for ceived datagram Receiv e datagr 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]; while(true) { DatagramPacket receivepacket = new DatagramPacket(receiveData, receivedata.length); serversocket.receive(receivepacket); SE322, Middleware, Pree T. 88

89 Example: Java server (UDP), cont Get IP addr port #, of sender ate datagram 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 client connection SE322, Middleware, Pree T. 89

90 Programming Assignment 1 Giving you a background of basic socket programming Why? We need a real distribute objects for real world application. Socking programming is very important. SE322, Middleware, Pree T. 90

91 Programming Assignment 1 Our program will call TheEcho Group of 2 people Submit program at pree.t@cmu.ac.th Write your title as SE322, A1, XXXXXXXX, Name, Last name Include your readme file. SE322, Middleware, Pree T. 91

92 Programming Assignment 1 README file How to compile and run the program Example of input and output Compress your.java and readme file into one single zip and write into CD What to turn in on 29 July, 2011 CD of your source codes (.java) and readme file Print out your source code and example of input and out of your program SE322, Middleware, Pree T. 92

93 Programming Assignment Requirements 1. A client reads a line from its standard input (keyboard) and sends the line out its socket to the server. 2. The server reads a line from its connection socket. 3. The server converts the line to uppercase and count the number of letter. 4. The server sends the modified line and number of letter out its connection socket to the client. 5. The client reads the modified line and number of letter from its socket and prints the line on its standard output (monitor). SE322, Middleware, Pree T. 93

94 Conclusion What we have learn today? Review Services Interfaces Java interfaces Architecture patterns Multilevel Architectures Layered Architectures VMWare JVM Mutitier Architectures Frameworks Microkernel Middle tier framework Distributed Objects Objects in programming Introduction to Remote Objects Basic Socket programming. SE322, Middleware, Pree T. 94

95 Next lecture No class on Friday Asalabucha day! And followed by Buddhist Lent day NO DRINKS AND DRUNK AND DRIVES! Remote Objects. Patterns for Distributed Object Middleware. Proxy Factory Interceptor Naming and Binding. SE322, Middleware, Pree T. 95

96 Middleware Lecture 4 Question regarding the programming assignment 1 Due date 29 July, 2011 Lectures Slide is located at Today Topics (Finish Ch.2 and start Ch. 3) Remote Objects Patterns for Distributed Object Middleware Proxy Factory adaptor Interceptor Naming DNS Resolver SE322, Middleware, Pree T. 96

97 Remote Objects Heterogeneity and Encapsulation. Dynamic creation of object instances Inheritance Remote Objects are an example of a client-server system. Client may use several different objects on server. A middleware must be provided to make this system work which is called Object Request Broker(ORB) Similar to RPC. SE322, Middleware, Pree T. 97

98 Remote Objects Remote Method Invocation SE322, Middleware, Pree T. 98

99 Patterns for Distributed Object Middleware Five properties to be considered. Context or environment Problem Desirable Properties Constraint or limitation Solution SE322, Middleware, Pree T. 99

100 Patterns for Distributed Object Middleware Remote execution mechanism rely on a few design patterns. Proxy First design pattern in distributed programming. Hard coding for communication (Problem) Object based client-server(context) Access should be efficient at run time, simple and no different for both client and server(desirable Properties) The client and server are in different address space(constraints) Information are hidden in the proxy (Solution) SE322, Middleware, Pree T. 100

101 Proxy SE322, Middleware, Pree T. 101

102 Proxy The internal structure of the proxy follows a well-defined pattern, which facilitates its automatic generation. The pre-processing phase, which essentially consists of marshalling the parameters and preparing the request message. the actual invocation of the servant, using the underlying communication protocol to send the request and to receive the reply. The post-processing phase, which essentially consists of unmarshalling the return values. Proxy server VS Proxy in middle ware (function less) SE322, Middleware, Pree T. 102

103 Factory Application organizes in a set of objects in a distributed environment(context) Dynamically create families of related objects (e.g. instances of a class), while allowing some decisions to be deferred to run time (e.g. choosing a concrete class to implement a given interface).(problem) The implementation details of the created objects should be abstracted away.(desired) Solution = AbstractFactory calles Factory method SE322, Middleware, Pree T. 103

104 Factory SE322, Middleware, Pree T. 104

105 Factory Creates objects without exposing the instantiation logic to the client. Refers to the newly created object through a common interface Most widely used pattern in middleware. It is used in application, to create remote instances of application objects) SE322, Middleware, Pree T. 105

106 Adaptor Context: Service provision, in a distributed environment. Problem: Reuse an existing servant by providing a different interface for its functions in order to comply to the interface expected by a client. Solution, provide a wrapper! SE322, Middleware, Pree T. 106

107 Adaptor SE322, Middleware, Pree T. 107

108 Interceptor Context. Service provision, in a distributed environment. Problem. One wants to enhance an existing service with new capabilities, or to provide it by different means. Desirable Properties. The mechanism should be generic (applicable to a wide variety of situations) Solution. Create interposition objects (statically or dynamically). These objects intercept calls (and/or returns) and insert specific processing, that may be based on contents analysis. An interceptor may also redirect a call to a different target. SE322, Middleware, Pree T. 108

109 Interceptor SE322, Middleware, Pree T. 109

110 Naming and Binding Naming deals with the designation of the various resources in system. Binding is concerned with actual access to objects through names. The term Object has a very general meaning here. SE322, Middleware, Pree T. 110

111 Name In a computing system, a name is an information associated with an object (the name designates the object) in order to fulfill two functions: to identify the object, i.e., to distinguish it from other objects, so the object can be (usually unambiguously) referred to. to provide an access path for the object, so the object can actually be used according to its specification. SE322, Middleware, Pree T. 111

112 Name To share information and resources between different users or different programming systems. Allow objects to be shared by reference. Cheaper, easier to manage E.g. WWW, Code libraries SE322, Middleware, Pree T. 112

113 Naming System Naming system is a framework which a specific category of objects is named. Rules and algorithms Name space defines the set of valid names, usually providing an alphabet and a set of syntax rules SE322, Middleware, Pree T. 113

114 Name space Name Space in C++ /////////////////////// // stdin input example // using cin.getline /////////////////////// #include <iostream> using namespace std; int main() { while(cin) { getline(cin, input_line); cout << input_line << endl; }; return 0; } SE322, Middleware, Pree T. 114

115 Name space In Java, the idea of a namespace is embodied in Java packages. Import java.lang.util; The main issues in the design of a naming system are the following: Organizing the name space, this process called naming context. Finding the object, this process called name resolution. SE322, Middleware, Pree T. 115

116 Naming Context A naming context is a set of associations, or bindings, between names and objects. Organizational or structural subdivisions of a global name space. E.g. Departments in CAMT Directories in a file system. SE322, Middleware, Pree T. 116

117 Naming Context SE322, Middleware, Pree T. 117

118 Naming Context Contexts are convenient for grouping related objects. E.g. symbolic links. Contexts may be used to speed up navigation in the name space. Linking existing contexts together can create new context. SE322, Middleware, Pree T. 118

119 Name Resolution In order to determine the object, this process name resolution must be carried out. Starts in an initial naming context and proceeds in steps. target = context.resolve (name) SE322, Middleware, Pree T. 119

120 Name Resolution Problems in Practical A single point of failure Traffic volume Distant centralized database Maintenance Problem of Distributed Naming Availability, Is it ready to use? Performance, Is it lag? Scalability, what if the clients grow? Performance? Adaptability, change in enviroment? SE322, Middleware, Pree T. 120

121 Name Resolution To solve the problem, at least!! Using few design principles and heuristics function have shown to be efficient. Use hierarchical decomposition Use redundancy Use hints Avoid broadcast Use time out SE322, Middleware, Pree T. 121

122 Design Principle of Naming Service The Domain Name System (DNS) is the name service of the Internet. The Internet has actually expanded at an exponential rate since the introduction of the DNS The name space is organized as a hierarchy of spaces called domains. SE322, Middleware, Pree T. 122

123 Name Resolution SE322, Middleware, Pree T. 123

124 Name Resolution A Distributed, Hierarchical Database. Large number of servers. Root DNS servers Top-Level Domain(TLD) servers. Authoritative DNS servers. SE322, Middleware, Pree T. 124

125 Name Resolution Iterative DNS resolver SE322, Middleware, Pree T. 125

126 Name Resolution Recursive DNS Resolver SE322, Middleware, Pree T. 126

127 Name Resolution A highly decentralized structure, increasing in scalability Server replication, increase in performance. Intensive use of caching. SE322, Middleware, Pree T. 127

128 Conclusion Remote Objects Patterns for Distributed Object Middleware Proxy Factory Interceptor Naming and Binding Name context Name resolution DNS Resolver SE322, Middleware, Pree T. 128

129 Next lecture (Chapter 4, 5) Communication and Distributed Object Coordination and Events Next Tuesday (Chapter 6) Composition System Management SE322, Middleware, Pree T. 129

130 Middleware Lecture 5 June 22, 2011 Question regarding the programming assignment 1 Due date 29 July, 2011 Lectures Slide is located at Version 1.4 Course Text book download at ACM Programming contest tomorrow at Computer Engineering Department. SE322, Middleware, Pree T. 130

131 Previous lecture Remote Objects Patterns for Distributed Object Middleware Proxy Factory Adaptor Interceptor Naming and Binding Name context Name resolution DNS Resolver Iterative Recursive SE322, Middleware, Pree T. 131

132 Agenda Binding (Ch.3) Distributed Binding (Ch.3) Client-Server Binding (Ch.3) Introduction to Communication Systems (Ch.4) Introduction to Networking (Application and Transport layer) (Ch.4) Delay Transport Protocols, TCP, UDP Example of Java Code Multiple receivers and Message, Unreliable Channel Broadcast and Multicast SE322, Middleware, Pree T. 132

133 Binding Binding The process of interconnecting a set of objects in a computing system. The association, or link, created between the bound objects. Examples Opening a file, link between a file descriptor and the file. (performed by OS) Associating the identifier of a variable with a storage location containing its value. (performed by compiler and link loader). SE322, Middleware, Pree T. 133

134 Binding Binding may be static. Binding may occur at compile time. Binding may occur at link time. Binding may be dynamic, deferred until execution time. SE322, Middleware, Pree T. 134

135 Distributed Binding Client to server binding using sockets SE322, Middleware, Pree T. 135

136 Distributed Binding Distributed systems are built by interconnecting hardware and software components located on different hosts over a network. A reference to remote object such as host network address and port number is not directly usable for access. Binding, creating a socket on the client host and connecting this socket, through a connect operation. SE322, Middleware, Pree T. 136

137 Client-server Binding Global view of service provision SE322, Middleware, Pree T. 137

138 Client-server Binding Service creation. Server created a concrete implementation of the service. Service registration. The server registers the service with the service directory, by providing a link to the service location with a name. (Export) Service lookup. The requester looks up the directory. Service binding. The requester performs the bind operation on the reference. Service access. The requester invoke the services. SE322, Middleware, Pree T. 138

139 Introducing Communication Systems Main function of middleware system is to provide communication services. Supply a high level communication interface to applications. Communication. The process of transmitting information between two entities. A sender and a receiver. SE322, Middleware, Pree T. 139

140 Introducing Communication Systems Message, the transmitted information. A single bit A flow of data Communication relies on a physical process. Router Wired, fiber, cable At the application level, we see communication as a service. Communication system is the combination of hardware and software that provides a communication service to applications. SE322, Middleware, Pree T. 140

141 Internet protocol stack for programmer application: supporting network applications FTP, SMTP, HTTP transport: host-host data transfer TCP, UDP network: routing of datagrams from source to destination IP, routing protocols link: data transfer between neighboring network elements PPP, Ethernet physical: bits on the wire application transport network link physical Introduction 1-141

142 A closer look at network structure: network edge: applications and hosts network core: routers network of networks access networks, physical media: communication links Introduction 1-142

143 The Network Core mesh of interconnected routers the fundamental question: how is data transferred through net? circuit switching: dedicated circuit per call: telephone net packet-switching: data sent thru net in discrete chunks Introduction 1-143

144 Layering: physical communication data application transport network link physical application transport network link physical application transport network link physical network link physical data application transport network link physical Introduction 1-144

145 Residential access: point to point access Dialup via modem up to 56Kbps direct access to router (often less) Can t surf and phone at same time: can t be always on ADSL: asymmetric digital subscriber line up to 1 Mbps upstream (today typically < 256 kbps) up to 8 Mbps downstream (today typically < 1.5 Mbps) FDM: 50 khz - 1 MHz for downstream 4 khz - 50 khz for upstream 0 khz - 4 khz for ordinary telephone Both use twisted-pair copper Introduction 1-145

146 Residential access: cable modems HFC: hybrid fiber coax (coax = coaxial cable) network of cable and fiber attaches homes to ISP router Asymmetric: more bandwidth and therefore faster downstream than upstream shared access to router among home issue: congestion downstream, collisions upstream deployment: available via cable companies, e.g., CAT True, ToT Introduction 1-146

147 Introduction 1-147

148 Delay & loss in packet-switched networks Four sources of packet delay 1. nodal processing: A check bit errors determine output link transmission 2. queueing propagation time waiting at output link for transmission depends on congestion level of router B nodal processing queueing Introduction 1-148

149 Delay in packet-switched networks 3. Transmission delay: R=link bandwidth (bps) L=packet length (bits) time to send bits into link = L/R 4. Propagation delay: d = length of physical link s = propagation speed in medium (~2x10 8 m/sec) propagation delay = d/s A transmission Note: s and R are very different quantities! propagation B nodal processing queueing Demo applet Introduction 1-149

150 Nodal delay d = d + d + d + nodal proc queue trans d prop d proc = processing delay typically a few microsecs or less d queue = queuing delay depends on congestion d trans = transmission delay = L/R, significant for low-speed links d prop = propagation delay a few microsecs to hundreds of msecs Introduction 1-150

151 The Protocols for the Internet The Internet Protocol stack SE322, Middleware, Pree T. 151

152 The Protocols for the Internet TCP stands for Transmission Control Protocol Build on top of IP but not on top of UDP Like UDP, adds a source and destination port number to the header Adds a sequence number and an acknowledgement sequence number to the header With these sequence numbers the order of delivery can be guaranteed The reception of packets is acknowledged, so TCP is 2 way traffic TCP is more like telephone where UDP is like telegram Because TCP is phone like it is said to be connection oriented SE322, Middleware, Pree T. 152

153 The Protocols for the Internet TCP has more overhead, so it generates more traffic UDP might deliver packets in the wrong order or not at all Building your own connection protocol with UDP might be less efficient than using TCP UDP well suited to broadcast sound or video SE322, Middleware, Pree T. 153

154 The Protocols for the Internet The Transport Interface. SE322, Middleware, Pree T. 154

155 TCP in JAVA 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())); DataOutputStream outtoclient = new DataOutputStream(connectionSocket.getOutputStream()); clientsentence = infromclient.readline(); System.out.println("Received: " + clientsentence); capitalizedsentence = clientsentence.touppercase() + '\n'; outtoclient.writebytes(capitalizedsentence); } } } SE322, Middleware, Pree T. 155

156 TCP in JAVA 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("localhost", 6789); DataOutputStream outtoserver = new DataOutputStream(clientSocket.getOutputStream()); 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(); } } SE322, Middleware, Pree T. 156

157 UDP in Java 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]; while(true) { DatagramPacket receivepacket = new DatagramPacket(receiveData, receivedata.length); serversocket.receive(receivepacket); String sentence = new String( receivepacket.getdata()); System.out.println("RECEIVED: " + sentence); 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); } SE322, Middleware, Pree T. 157 }

158 UDP in Java 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("localhost"); byte[] senddata = new byte[1024]; byte[] receivedata = new byte[1024]; String sentence = infromuser.readline(); senddata = sentence.getbytes(); 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(); } SE322, Middleware, Pree T. 158

159 Multiple receivers and Message, Unreliable Channel How to build a reliable channel on top of an unreliable one. How to characterize the timing properties of communication. How to specify the properties of communication involving multiple senders and receivers SE322, Middleware, Pree T. 159

160 Building a reliable channel Three main causes message may be corrupted. Transmission errors at the physical level, due to noise or signal weakening. Failures or overload conditions in communication software (e.g. packet loss in overloaded routers.) Accidental cuts or disconnection, which break the physical connection between sender and reciever. SE322, Middleware, Pree T. 160

161 Timing and Ordering Properties of Communication Communication is synchronize when the upper bound is known on the transmission time of the message. If no upper bound is the communication is asynchronous. Internet is asynchronous, rely on shared resources (e.g. routers), load unpredictable. Hard-real time constraints comm.. Late message may cause application to fail. Achieved by resource reservation. Physical time awareness. Achieved by using Clock synchronize algorithm SE322, Middleware, Pree T. 161

162 Broadcast and Multicast Both involve a single sender an several receivers. Broadcast. The receivers are the processes that belong to a single set. The sender is also a member of the set. Multicast. The receivers are the members or one or several process groups. The sender may or not belong to the set of receivers. SE322, Middleware, Pree T. 162

163 Broadcast and Multicast Unicast, a packet is sent to only one destination Broadcast, a packet is sent to anyone listening Multicast, a packet is sent to everyone registered TCP is always unicast! UDP can be all three. Due to standardization problems multicast is mostly restricted to local area networks. SE322, Middleware, Pree T. 163

164 Next lecture - Last lecture for Middleware! YEAH! - Finish Communication chapter (ch.4). - Advance topics - Coordination and event (ch.6). - Composition (ch.7) - Review session on next Friday before Midterm. SE322, Middleware, Pree T. 164

165 Middleware Lecture 6 June 26, 2011 Question regarding the programming assignment 1 Due date 29 July, 2011 Lectures Slide is located at Version 1.5 Course Text book download at Midterm Exam, August 6 th, (1:30-4:30pm) Room 113 slope ACM Programming contest result(good job!) SE322, Middleware, Pree T. 165

166 Previous Lecture Binding (Ch.3) Distributed Binding (Ch.3) Client-Server Binding (Ch.3) Introduction to Communication Systems (Ch.4) Introduction to Networking (Application and Transport layer) (Ch.4) Delay Transport Protocols, TCP, UDP Example of Java Code Multiple receivers and Message, Unreliable Channel Broadcast and Multicast SE322, Middleware, Pree T. 166

167 Agenda Coordination Introduction to Coordination Terminology Patterns for Coordination Observer Composition Objects to Components Requirements for Components SE322, Middleware, Pree T. 167

168 Introduction for Coordination Many applications involve a number of activities that cooperate to achieve a common goal and need to interact in order to coordinate their evolution coordination refers to the methods and tools that allow several entities to cooperate towards a common goal SE322, Middleware, Pree T. 168

169 Introduction to Coordination A coordination model provides a framework to organize this cooperation, by defining three elements. coordination entities whose cooperation is being organized, e.g. processes, threads, various forms of "agents. coordination media through which the entities communicate, e.g. messages, shared variables. coordination rules, which define the interaction primitives and patterns used by the cooperating entities to achieve coordination. SE322, Middleware, Pree T. 169

170 Introduction for Coordination We are specifically interested in application domains that are subject to the following requirements. Loose coupling. The entities involved in the cooperation should be allowed to evolve independently, and coordination should therefore not impose strong constraints on their behavior. SE322, Middleware, Pree T. 170

171 Introduction for Coordination Dynamic evolution. The cooperating entities are allowed to join and leave the application freely, during execution. Late binding is therefore mandatory. Large scale. The number of cooperating entities may potentially become very large and they may operate over a wide geographical range; the coordination algorithms and structures should therefore be scalable with respect to these two aspects. Heterogeneity. The cooperating entities may use heterogeneous hardware, operating systems, run time environments, and security policies; they may be administered by various authorities. SE322, Middleware, Pree T. 171

172 Introduction for Coordination Example of such application domains. Monitoring of industrial installations. Supervision of networking equipment. Weather forecast using distributed sensors. Stock tracking. Distributed auctions SE322, Middleware, Pree T. 172

173 Terminology Event is a detectable state transition that locally occurs at a definite point in time in a specified environment. The occurrence of interrupt (mouse click, time out) The change in variable. Notification, the action of signaling an event to consumers. Message is an information transmitted by a sender to one or several receiver(s). SE322, Middleware, Pree T. 173

174 Patterns for Coordination Observer The problem is for the observers to be kept aware of any change occurring in the observed object. E.g. The contents of a spreadsheet (Excel), images need to be update according the change. SE322, Middleware, Pree T. 174

175 The Observer Pattern View A is the subject. View A displays the temperature of a container. View B display a green light is the temperature is above 20 degree Celsius. Therefore View B registers itself as a Listener to View A. If the temperature of View A is changed an event is triggered. That is event is send to all registered listeners in this example View B. View B receives the changed data and can adjust his display. SE322, Middleware, Pree T. 175

176 The Observer Pattern SE322, Middleware, Pree T. 176

177 The Observer Pattern SE322, Middleware, Pree T. 177

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

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 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: 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 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 1. Computer Networks and the Internet

Chapter 1. Computer Networks and the Internet Chapter 1 Computer Networks and the Internet Internet traffic What s the Internet? (hardware) PC server wireless laptop cellular handheld wired links millions of connected computing devices: hosts = end

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

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. 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

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

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

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

Chapter II: Application Layer

Chapter II: Application Layer Chapter II: Application Layer UG3 Computer Communications & Networks (COMN) Myungjin Lee myungjin.lee@ed.ac.uk Slides copyright of Kurose and Ross Internet hourglass Here 2 Some network apps e-mail web

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

Internet Architecture & Performance. What s the Internet: nuts and bolts view

Internet Architecture & Performance. What s the Internet: nuts and bolts view Internet Architecture & Performance Internet, Connection, Protocols, Performance measurements What s the Internet: nuts and bolts view millions of connected computing devices: hosts, end systems pc s workstations,

More information

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

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

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 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 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

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

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

CC451 Computer Networks

CC451 Computer Networks CC451 Computer Networks Lecture 4 Application Layer (cont d) 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,

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

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

Chapter 1: Introduction

Chapter 1: Introduction Chapter 1: Introduction Our goal: get context, overview, feel of networking more depth, detail later in course approach: descriptive use Internet as example Overview: what s the Internet what s a protocol?

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

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

Computer Networks. 5th of February, This exam consists of 6 questions with subquestions. Every subquestion counts for 10 points.

Computer Networks. 5th of February, This exam consists of 6 questions with subquestions. Every subquestion counts for 10 points. Computer Networks 5th of February, 05 This exam consists of 6 questions with subquestions. Every subquestion counts for 0 points. Mark every page with name and student number. Use of books, additional

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

Part 1: Introduction. Goal: Review of how the Internet works Overview

Part 1: Introduction. Goal: Review of how the Internet works Overview Part 1: Introduction Goal: Review of how the Internet works Overview Get context Get overview, feel of the Internet Application layer protocols and addressing Network layer / Routing Link layer / Example

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

Packet-switching: store-and-forward

Packet-switching: store-and-forward Packet-switching: store-and-forward L R R R Takes L/R seconds to transmit (push out) packet of L bits on to link or R bps Entire packet must arrive at router before it can be transmitted on next link:

More information

Part I: Introduction. 1: Introduction 1

Part I: Introduction. 1: Introduction 1 Part I: Introduction Chapter goal: get context, overview, feel of networking more depth, detail later in course approach: descriptive use Internet as example Overview: what s the Internet what s a protocol?

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

Module 2 Overview of Computer Networks

Module 2 Overview of Computer Networks Module 2 Overview of Computer Networks Networks and Communication Give me names of all employees Who earn more than $00,000 ISP intranet backbone satellite link desktop computer: server: network link:

More information

Module 2 Overview of. Computer Networks

Module 2 Overview of. Computer Networks Module Overview of Networks and Communication Give me names of all employees Who earn more than $00,000 ISP intranet backbone satellite link desktop computer: server: network link: CS454/654 - Issues How

More information

CSCI Computer Networks

CSCI Computer Networks CSCI-1680 - Computer Networks Chen Avin (avin) Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti, Peterson & Davie, Rodrigo Fonseca Administrivia Sign and hand in Collaboration

More information

02 - Distributed Systems

02 - Distributed Systems 02 - Distributed Systems Definition Coulouris 1 (Dis)advantages Coulouris 2 Challenges Saltzer_84.pdf Models Physical Architectural Fundamental 2/58 Definition Distributed Systems Distributed System is

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

Foundations of Telematics

Foundations of Telematics Foundations of Telematics Chapter 2 Application Layer Principles of network applications Important application protocols Using sockets Acknowledgement: These slides have been prepared by J.F. Kurose and

More information

Communication Paradigms

Communication Paradigms Communication Paradigms Nicola Dragoni Embedded Systems Engineering DTU Compute 1. Interprocess Communication Direct Communication: Sockets Indirect Communication: IP Multicast 2. High Level Communication

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

Advanced Java Programming. Networking

Advanced Java Programming. Networking Advanced Java Programming Networking Eran Werner and Ohad Barzilay Tel-Aviv University Advanced Java Programming, Spring 2006 1 Overview of networking Advanced Java Programming, Spring 2006 2 TCP/IP protocol

More information

02 - Distributed Systems

02 - Distributed Systems 02 - Distributed Systems Definition Coulouris 1 (Dis)advantages Coulouris 2 Challenges Saltzer_84.pdf Models Physical Architectural Fundamental 2/60 Definition Distributed Systems Distributed System is

More information

Computer Networks. Application Layer

Computer Networks. Application Layer Computer Networks Application Layer By: Mohammad Nassiri Bu-Ali Sina University, Hamedan Fall 2009 Chapter 2: Application layer!! 2.1 Principles of network applications!! 2.2 Web and HTTP!! 2.3 FTP!! 2.4

More information

Digital Communication Networks

Digital Communication Networks Digital Communication Networks MIT PROFESSIONAL INSTITUTE, 6.20s July 25-29, 2005 Professor Muriel Medard, MIT Professor, MIT Slide 1 Digital Communication Networks Introduction Slide 2 Course syllabus

More information

CSC 401 Data and Computer Communications Networks

CSC 401 Data and Computer Communications Networks CSC 401 Data and Computer Communications Networks Application Layer Video Streaming, CDN and Sockets Sec 2.6 2.7 Prof. Lina Battestilli Fall 2017 Outline Application Layer (ch 2) 2.1 principles of network

More information

Chapter 2 Application Layer

Chapter 2 Application Layer Chapter 2 Application Layer A note on the use of these ppt slides: The notes used in this course are substantially based on powerpoint slides developed and copyrighted by J.F. Kurose and K.W. Ross, 2007

More information

What s a protocol? What s a protocol? A closer look at network structure: What s the Internet? Hardware view: What s the Internet?

What s a protocol? What s a protocol? A closer look at network structure: What s the Internet? Hardware view: What s the Internet? What s the Internet? Hardware view: What s the Internet? Hardware view: PC server wireless laptop cellular handheld access points wired s connected computing devices: hosts = end systems running apps communication

More information

Introduction to computer networking

Introduction to computer networking edge core Introduction to computer networking Comp Sci 3600 Security Outline edge core 1 2 edge 3 core 4 5 6 The edge core Outline edge core 1 2 edge 3 core 4 5 6 edge core Billions of connected computing

More information

Java Network Programming

Java Network Programming CPSC 360 Network Programming Java Network Programming Michele Weigle Department of Computer Science Clemson University mweigle@cs.clemson.edu January 24, 2005 http://www.cs.clemson.edu/~mweigle/courses/cpsc360

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

55:134/22C:178 Computer Communications Lecture Note Set 2 Summer 2004

55:134/22C:178 Computer Communications Lecture Note Set 2 Summer 2004 Chapter 2 Application Layer Note: These slides are adapted, with permission, from copyrighted material developed by the authors of Computer Networks, a Top-Down Approach All material copyright 1996-2002

More information

Chapter 2: Application layer. Computer Networks. Application Layer. Chapter 2: Application Layer. Some network apps. Bu-Ali Sina University, Hamedan

Chapter 2: Application layer. Computer Networks. Application Layer. Chapter 2: Application Layer. Some network apps. Bu-Ali Sina University, Hamedan Computer Networks Chapter 2: Application layer Application Layer By: Mohammad Nassiri!! 2.1 Principles of network applications!! 2.2 Web and HTTP!! 2.3 FTP!! 2.4 Electronic Mail!! SMTP, POP3, IMAP!! 2.5

More information

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

Tonight. Communication. Middleware Protocols. Remote Procedure Call (RPC) Several common communication mechanisms RPC RMI Sockets Next week: HTTP, 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

More information

Chapter 16 Networking

Chapter 16 Networking Chapter 16 Networking Outline 16.1 Introduction 16.2 Network Topology 16.3 Network Types 16.4 TCP/IP Protocol Stack 16.5 Application Layer 16.5.1 Hypertext Transfer Protocol (HTTP) 16.5.2 File Transfer

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

Introduction to Distributed Systems

Introduction to Distributed Systems Introduction to Distributed Systems Other matters: review of the Bakery Algorithm: why can t we simply keep track of the last ticket taken and the next ticvket to be called? Ref: [Coulouris&al Ch 1, 2]

More information

CS 126 Lecture S5: Networking

CS 126 Lecture S5: Networking CS 126 Lecture S5: Networking Outline Introductions Connectivity Naming and addressing Abstractions and layering Example: socket programming Conclusions CS126 24-1 Randy Wang Review: Technology Advances

More information

CS 126 Lecture S5: Networking

CS 126 Lecture S5: Networking CS 126 Lecture S5: Networking Outline Introductions Connectivity Naming and addressing Abstractions and layering Example: socket programming Conclusions CS126 24-1 Randy Wang Review: Technology Advances

More information

Computer Communication Networks

Computer Communication Networks Contents ELL 785 Computer Communication Networks Introduction Lecture 1 Taxonomy of communication works Computer Communication Networks Building a work ed work architecture 1-1 Introduction PC server wireless

More information

Lecture 2 Communication services The Trasport Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Lecture 2 Communication services The Trasport Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it Lecture 2 Communication services The Trasport Layer Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it The structure edge: applications and hosts core: routers of s access s, media:

More information

Chapter 2 APPLICATIONS

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

More information

Introduction to Information Science and Technology 2017 Networking I. Sören Schwertfeger 师泽仁

Introduction to Information Science and Technology 2017 Networking I. Sören Schwertfeger 师泽仁 I Sören Schwertfeger 师泽仁 Outline Internet History of the Internet Internet Structure Internet Protocols Network layer details 1. Physical Layer 2. Data Link Layer 3. Network Layer Internet: Huge network

More information

CAS 703 Software Design

CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario Acknowledgments: Material based on Software by Tao et al. (Chapters 9 and 10) (SOA) 1 Interaction

More information

Transport layer protocols. Lecture 15: Operating Systems and Networks Behzad Bordbar

Transport layer protocols. Lecture 15: Operating Systems and Networks Behzad Bordbar Transport layer protocols Lecture 15: Operating Systems and Networks Behzad Bordbar 78 Interprocess communication Synchronous and asynchronous comm. Message destination Reliability Ordering Client Server

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 v SMTP, POP3, IMAP 2.5 DNS 2.6 P2P applications

More information

CPEG514 Advanced Computer Networks. Atef Abu Salim University of Nizwa Spring 2013/2014

CPEG514 Advanced Computer Networks. Atef Abu Salim University of Nizwa Spring 2013/2014 CPEG514 Advanced Computer Networks Atef Abu Salim University of Nizwa Spring 2013/2014 Today s Class Topics Course Syllabus Computer Networks LANs and WANs The Internet Protocols, Layers and Interfaces

More information

What s a protocol? What s a protocol? A closer look at network structure: What s the Internet? What s the Internet? What s the Internet?

What s a protocol? What s a protocol? A closer look at network structure: What s the Internet? What s the Internet? What s the Internet? What s the Internet? PC server laptop cellular handheld access points wired s connected computing devices: hosts = end systems running apps communication s fiber, copper, radio transmission rate = bandwidth

More information

CS454/654 Midterm Exam Fall 2004

CS454/654 Midterm Exam Fall 2004 CS454/654 Midterm Exam Fall 2004 (3 November 2004) Question 1: Distributed System Models (18 pts) (a) [4 pts] Explain two benefits of middleware to distributed system programmers, providing an example

More information

Application Layer. Application Layer 1. By Mikkel Christiansen for NA mm7 Spring 2004

Application Layer. Application Layer 1. By Mikkel Christiansen for NA mm7 Spring 2004 Application Layer By Mikkel Christiansen for NA mm7 Spring 2004 Based on power-point material from J.F Kurose and K.W. Ross website Application Layer 1 Last on NA End-systems PCs workstations, servers

More information