Outline of Topics. UDP Socket Java Programming. Multicast in Java. Real-time protocol (RTP) XMPP and Jingle protocols. Java I/O and New IO (NIO)

Size: px
Start display at page:

Download "Outline of Topics. UDP Socket Java Programming. Multicast in Java. Real-time protocol (RTP) XMPP and Jingle protocols. Java I/O and New IO (NIO)"

Transcription

1 Outline Outline of Topics UDP Socket Java Programming Multicast in Java Real-time protocol (RTP) XMPP and Jingle protocols Java I/O and New IO (NIO)

2 UDP Socket Java Programming User Datagram Protocol (UDP) Sends independent packets of data (called datagrams) between computers without guarantees about arrival and sequencing. Transaction-oriented: suitable for simple query-response protocols Not connection-based (point-to-point) like TCP: suitable for very large numbers of clients Lack of retransmission delays

3 UDP Socket Java Programming Datagrams Datagrams: an independent, self-contained message sent over the network whose arrival, arrival time, and content are not guaranteed. UDP header consists of 4 fields, each of which is 16 bits Table : UDB datagram Bit Source port Destination port 32 Length Checksum... Data

4 UDP Socket Java Programming Datagrams: checksum Used for error-checking of the UDP header and data Also include IP address to prevent misrouting Basic idea: the complement of a 16-bit one s complement sum calculated over an IP pseudo-header and the actual UDP data. A pseudo-header: the IP header and the UDP header without checksum field At the receiver end: all the 16-bit words of the headers plus data area are added together = Sum Sum + Checksum =

5 UDP Socket Java Programming Datagrams: checksum calculation Source IP address UDP total length Protocol Destination IP address Source port number Data Destination port number

6 UDP Socket Java Programming UDP datagram communication in Java Two packages in java.net package: DatagramPacket : contains several constructors for creating datagram packet object Example: DatagramPacket(byte[] buf, int length, InetAddress address, int port); DatagramSocket : provides various methods for transmitting or receiving datagrams over the network Example: void send(datagrampacket p) or void receive(datagrampacket p)

7 UDP Socket Java Programming Example 1: UDP word counting server We will create a simple UDP server waits for clients requests and then accepts the message (datagram) and send back the number of words in the message.

8 Multicast in Java Multicast Imaging you need to send message to a group of 1,000 clients What s wrong with TCP? Connection-based: you need 1,000 connections which consume a lot of processing power on sender! Flow control: The arrival time is not the same for every clients Multicast is a special feature of UDP protocol that enable programmer to send message to a group of receivers on a specific multicast IP address and port. One-to-many and many-to-many real-time communication over internet Send data only once to any number of any receivers

9 Multicast in Java Multicast: Java example A multicast group is specified by a class D IP address and by a standard UDP port number. Class D IP addresses are in the range to , inclusive. Receivers must join multicast group to receive packet Multicast IP address Sender Joint to receive multicast message Receivers

10 Multicast in Java Multicast: Java example MulticastSocket class: sending and receiving IP multicast packets A MulticastSocket is a (UDP) DatagramSocket, with additional capabilities for joining groups of other multicast hosts on the internet. For Android App development, you can also use MulticastSocket class

11 Multicast in Java Multicast: Java example Steps of using MulticastSocket to receive messages Step 1: creating a MulticastSocket with the desired port Step 2: joinng a group using the joingroup(inetaddress groupaddr) Step 3: leaving the group using leavegroup(inetaddress addr) method. method

12 Multicast in Java Multicast: Java example Steps of using MulticastSocket to send messages Step 1: creating a MulticastSocket Step 2: create a DatagramPacket for a message Step 3: set Time-To-Live (TTL) using Step 4: send data Step 4: close the MulticastSocket settimetolive Note: Time-To-Live (TTL): a value between zero and 255. Every time a router forwards the packet, it decrements the TTL field in the packet header. The packet will dropped if the value reaches zero. Used to avoid packages being looped forever due to routing errors.

13 Real-time protocol (RTP) Real-time protocol (RTP): What is it? Defined by RFC-1889, RTP, a Transport Protocol for Realtime Applications A standardized packet format for delivering audio and video over IP networks Why: to cope with misordered or lost packets How: ignoring the loss or re-sending the missing data, and processing out-of-order packages Implementations are built on the UDP Allows data transfer to multiple destinations through multicast

14 Real-time protocol (RTP) Applications of RTP IP Phone Audio conference Video conference IP television / video on demand

15 Real-time protocol (RTP) Java Media Framework (JMF) A Java library that enables audio, video and other time-based media to be added to Java applications and applets. Used for capturing, playing, streaming, and transcoding multiple media formats Provides support for RTP to enable the transmission and reception of real-time media streams across the network. Cannot be used for Android and lack of updates and maintenance (last update in 2008!) A few alternatives exist, the most promising one is Freedom for Media in Java (FMJ)

16 Real-time protocol (RTP) Further reading Since JMF and RTP are beyond this module, you can learn from: IBM JMF Tutorial JMF tutorial from Univ. of Colorado Some code examples from Old Dominion University Documents for developing RTP APPs in Android

17 XMPP and Jingle protocols XMPP: what is it? XMPP: Extensible Messaging and Presence Protocol A open standard communications protocol for message-oriented middleware based on XML Was a open-source project called Jabber Formalize by Internet Engineering Task Force (IETF) as a open standard, no royalties are required Cisco acquired Jabber (Cisco Jabber) in 2008 for Enterprise Instant Messaging Can be used for instant messaging, VoIP, video, file transfer, gaming Used by Google Talk, Facebook s chat, Skype and Microsoft Messenger service. Click Full list or here

18 XMPP and Jingle protocols Jingle: what is it? An extension to XMPP which adds peer-to-peer (P2P) session control (signaling) for multimedia interactions, e.g., Voice over IP (VoIP) or video conferencing communications. Designed by Google and the XMPP Standards Foundation Real-time Transport Protocol (RTP) as the media transport Google App Engine provides support for Jingle or XMPP You can use the libjingle to develop Google Talk applications Google replaced GTalk with Handouts, as well as their Jingle protocol You can also use this Java library: Smack For Android, you can use asmack Other libraries

19 XMPP and Jingle protocols Samck Java example: chat with Google Talk We can use Smack to send/receive chat messages to/from Google Talk. You can try Facebook Chat Not in the campus because of the firewall A few tutorials/examples to get you started: Smack official document. A facebook chat client using Smack You can do a lot of cool things: voice chat, video chat, file transfer, games, etc.

20 Java I/O and New IO (NIO) Java I/O: what is it? I/O: input/output, refers to the interface between a computer/the world, or program/the rest of the computer. Usually built into the operating system. Uses stream metaphor: packaged and transmitted data as one byte at a time, through an object called a Stream. Reminder: Socket is a kind of I/O. Advantages: easy to process the streamed data through I/O, e.g., to create filters. Disadvantages: slow

21 Java I/O and New IO (NIO) Java NIO: what is it? An alternative Java IO API to the standard Java IO API Offer features for intensive I/O operations Uses a different metaphor: block I/O Block I/O: data is packaged and transmitted in blocks. Advantages: faster than standard stream-oriented I/O You can read more from Oracle s Java page Java 7 release NIO version 2 in 2011: provides extended capabilities for file system tasks,

22 Java I/O and New IO (NIO) Java NIO: imprtant concepts Two central concept: Channel Buffer Channels are analogous to streams in the original I/O package where you can read and write data. A Buffer is a container object, which holds some data, that is to be written to or that has just been read from. Buffer is the most significant difference between tradition stream-oriented IO and NIO In stream-oriented I/O data is directly written to, and read data from, Stream objects, but in NIO, data is read and write via Buffer

23 Java I/O and New IO (NIO) Java NIO: Channels details All IO in NIO starts with a Channel. Three types of network related channels: DatagramChannel: read/write data via UDP SocketChannel: read/write data via TCP. ServerSocketChannel: similar to ServerSocket to listen for incoming TCP connections Also file channel: FileChannel Similar to Streams

24 Java I/O and New IO (NIO) Java NIO: Differences between Channels and Streams Channels are bi-directional: you can both read and write data from/to a Channels. Streams are one-way: you need to use InputStream and OutputStream Channels can be asynchronous, that is, reading and writing data without blocking Channels always read/write data to/from a Buffer.

25 Java I/O and New IO (NIO) Java NIO: Buffer details Essentially a block of memory, or more precisely, an array. But more than an array: provides structured access to data and also keeps track of the system s read/write processes There are different kinds of Buffer : ByteBuffer: most common one, can be used for most of the I/O operations CharBuffer, ShortBuffer, IntBuffer, LongBuffer, FloatBuffer, DoubleBuffer

26 Java I/O and New IO (NIO) Java NIO: How to use Buffer? Five steps: Step 1: Create a buffer ByteBuffer buffer = ByteBuffer.allocate(1024); Step 2: Write data from Channel into the Buffer inchannel.read(buffer); Step 3: Call buffer.flip() to switch the buffer from writing mode into reading mode Step 4: Read data out of the Buffer buffer.get() or buffer.array() Step 5: Call buffer.clear() or buffer.compact() to clear the buffer. clear() clears all buffer, compact() only clears the data which you have already read

27 Java I/O and New IO (NIO) Java NIO: Using FileChannel to read a file. Three steps: Step 1: Get a FileChannel from a FileInputStream Step 2: Create a buffer Step 3: Read from the channel into the buffer Q: How it differs from original I/O? A: Original I/O only creates a FileInputStream and read from that Some tricks to make it even faster: use Channel to Channel Transfers

28 Java I/O and New IO (NIO) Java NIO network programming: SocketChannel Steps for setting up SocketChannel Step 1: Open a SocketChannel SocketChannel socketchannel = SocketChannel.open(); Step 2: Connect to a server socketchannel.connect (new InetSocketAddress("google.com", 80)); Step 3: Reading/writing from/to a SocketChannel to Buffer Step 4: Close the SocketChannel

29 Java I/O and New IO (NIO) Java NIO network programming: ServerSocketChannel Steps for setting up ServerSocketChannel Step 1: Open a ServerSocketChannel ServerSocketChannel serversocketchannel = ServerSocketChannel.open(); Step 2: Listening for Incoming Connections while(true) { SocketChannel socketchannel = serversocketchannel.accept(); //communication using socketchannel } Step 4: Close the ServerSocketChannel serversocketchannel.close();

30 Java I/O and New IO (NIO) Further readings Oracle s tutorial KryoNet : API for efficient TCP and UDP client/server network communication using NIO Five ways to maximize Java NIO and NIO.2 You can ignore those bits on non-blocking or asynchronous mode and selection. I will come back to this after multi-threading programming.

Construction d Applications Réparties / Master MIAGE

Construction d Applications Réparties / Master MIAGE Construction d Applications Réparties / Master MIAGE Networking Giuseppe Lipari CRiSTAL, Université de Lille January 26, 2016 Outline Introduction Networking Transport Protocols TCP and UDP Addressing

More information

Joseph Faber Wonderful Talking Machine (1845)

Joseph Faber Wonderful Talking Machine (1845) Joseph Faber Wonderful Talking Machine (1845) Connected World Human-to-Human communication Human-Machine interaction Machine-to-Machine communication (M2M) Internet-of-Things (IOT) Internet of Things How

More information

Distributed Programming in Java

Distributed Programming in Java Distributed Programming in Java Networking (1) Motivating Scenario apps apps apps apps 2/28 apps nslookup A program for looking up IP addresses 3/28 1 InetAddress This class represents an IP address Each

More information

JAVA Network API. 2 - Connection-Oriented vs. Connectionless Communication

JAVA Network API. 2 - Connection-Oriented vs. Connectionless Communication JAVA Network API To be discussed 1 - java.net... 1 2 - Connection-Oriented vs. Connectionless Communication... 1 3 - Connectionless:... 1 4 - Networking Protocols... 2 5 - Sockets... 2 6 - Multicast Addressing...

More information

Interprocess Communication

Interprocess Communication Interprocess Communication Nicola Dragoni Embedded Systems Engineering DTU Informatics 4.2 Characteristics, Sockets, Client-Server Communication: UDP vs TCP 4.4 Group (Multicast) Communication The Characteristics

More information

Introduction to NIO: New I/O

Introduction to NIO: New I/O Chapter 2 Introduction to NIO: New I/O Advanced Topics in Java Khalid Azim Mughal khalid@ii.uib.no http://www.ii.uib.no/~khalid/atij/ Version date: 2004-09-01 ATIJ 2: Introduction to NIO: New I/O 2-1/36

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

4. The transport layer

4. The transport layer 4.1 The port number One of the most important information contained in the header of a segment are the destination and the source port numbers. The port numbers are necessary to identify the application

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

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

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

CS 4390 Computer Networks. Transport Services and Protocols

CS 4390 Computer Networks. Transport Services and Protocols CS 4390 Computer Networks UT D data Session 07 Transport Layer Overview and UDP Adapted from Computer Networking a Top-Down Approach 1996-2012 by J.F Kurose and K.W. Ross, All Rights Reserved Transport

More information

Networking. Lecture 25 ish? COP 3252 Summer July 11, 2017

Networking. Lecture 25 ish? COP 3252 Summer July 11, 2017 Networking Lecture 25 ish? COP 3252 Summer 2017 July 11, 2017 Open-Read/Write-Close The Unix I/O system follows a paradigm usually referred to as Open-Read/Write-Close. Before a program/process can perform

More information

Lecture 3: Socket Programming

Lecture 3: Socket Programming Lecture 3: Socket Programming Prof. Shervin Shirmohammadi SITE, University of Ottawa Fall 2005 CEG4183/ELG4183 3-1 Sockets From a logical perspective, a Socket is a communication end point. It is not a

More information

Transport Layer Overview

Transport Layer Overview Transport Layer Overview Kai Shen Transport-layer Overview Network layer: host-to-host to logical communication between hosts. Transport layer: logical communication between s. multiple comm. s can reside

More information

Introduction to the Application Layer. Computer Networks Term B14

Introduction to the Application Layer. Computer Networks Term B14 Introduction to the Application Layer Computer Networks Term B14 Intro to Application Layer Outline Current Application Layer Protocols Creating an Application Application Architectures Client-Server P2P

More information

C19: User Datagram and Multicast

C19: User Datagram and Multicast CISC 3120 C19: User Datagram and Multicast Hui Chen Department of Computer & Information Science CUNY Brooklyn College 4/18/2018 CUNY Brooklyn College 1 Outline Recap Network fundamentals IPv4, IPv6 addresses

More information

Internet Group Communication: IP Multicasting

Internet Group Communication: IP Multicasting Internet Group Communication: IP Multicasting Introduction Why to Talk in Groups? Aspects of Group Communication IP-Multicasting Addressing The Internet Group Protocol Motivation Current Situation: Use

More information

C18: Network Fundamentals and Reliable Sockets

C18: Network Fundamentals and Reliable Sockets CISC 3120 C18: Network Fundamentals and Reliable Sockets Hui Chen Department of Computer & Information Science CUNY Brooklyn College 4/16/2018 CUNY Brooklyn College 1 Outline Networking fundamentals Network

More information

CSC 4900 Computer Networks: P2P and Sockets

CSC 4900 Computer Networks: P2P and Sockets CSC 4900 Computer Networks: P2P and Sockets Professor Henry Carter Fall 2017 Recap SMTP is the language that mail servers use to exchange messages. SMTP is push-based... why? You can run SMTP from a telnet

More information

OSI Transport Layer. Network Fundamentals Chapter 4. Version Cisco Systems, Inc. All rights reserved. Cisco Public 1

OSI Transport Layer. Network Fundamentals Chapter 4. Version Cisco Systems, Inc. All rights reserved. Cisco Public 1 OSI Transport Layer Network Fundamentals Chapter 4 Version 4.0 1 Transport Layer Role and Services Transport layer is responsible for overall end-to-end transfer of application data 2 Transport Layer Role

More information

Chapter 9: UDP sockets & address conversion function

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

More information

The ASP Virtual Networking (VNET) Component. 23 July Abstract

The ASP Virtual Networking (VNET) Component. 23 July Abstract The ASP Virtual Networking (VNET) Component 23 July 2002 Abstract This document describes the implementation of the virtual networking (VNET) component of the ASP EE. VNET is a simple and modular implementation

More information

Transport Over IP. CSCI 690 Michael Hutt New York Institute of Technology

Transport Over IP. CSCI 690 Michael Hutt New York Institute of Technology Transport Over IP CSCI 690 Michael Hutt New York Institute of Technology Transport Over IP What is a transport protocol? Choosing to use a transport protocol Ports and Addresses Datagrams UDP What is a

More information

4 rd class Department of Network College of IT- University of Babylon

4 rd class Department of Network College of IT- University of Babylon 1. INTRODUCTION We can divide audio and video services into three broad categories: streaming stored audio/video, streaming live audio/video, and interactive audio/video. Streaming means a user can listen

More information

Networking: IPv6, UDP and TCP. Network Programming in Java UDP and TCP

Networking: IPv6, UDP and TCP. Network Programming in Java UDP and TCP Networking: IPv6, UDP and TCP Network Programming in Java UDP and TCP SCOMRED, November 2018 Instituto Superior de Engenharia do Porto (ISEP) Departamento de Engenharia Informática(DEI) SWitCH Computing

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

Effec%ve So*ware. Lecture 6: Non-blocking I/O, C10K, efficient networking. David Šišlák

Effec%ve So*ware. Lecture 6: Non-blocking I/O, C10K, efficient networking. David Šišlák Effec%ve So*ware Lecture 6: Non-blocking I/O, C10K, efficient networking David Šišlák david.sislak@fel.cvut.cz Network Communica%on OSI Model 10 th April 2017 ESW Lecture 6 2 Network Communica%on HTTP

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

31 Network Programming

31 Network Programming 31 Network Programming Network / Inter-Network OODS 1997-2000 Michael Golm Network Programming 31.218 31.1 Host Addressing: InetAddress IP addresses: DNS form: www4.informatik.uni-erlangen.de "dotted quad"

More information

Outlines. Networking in Java. Internet hardware structure. Networking Diagram. IP Address. Networking in Java. Networking basics

Outlines. Networking in Java. Internet hardware structure. Networking Diagram. IP Address. Networking in Java. Networking basics G52APR Application programming Networking in Java Michael Li http://www.cs.nott.ac.uk/~jwl/g52apr Outlines Networking basics Network architecture IP address and port Server-client model TCP and UDP protocol

More information

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

Ch.11 Nonblocking I/O

Ch.11 Nonblocking I/O CSB541 Network Programming 網路程式設計 Ch.11 Nonblocking I/O 吳俊興國立高雄大學資訊工程學系 Outline 11.1 An Example Client 11.2 An Example Server 11.3 Buffers 11.4 Channels 11.5 Readiness Selection 2 Java I/O Two typical

More information

CN1047 INTRODUCTION TO COMPUTER NETWORKING CHAPTER 6 OSI MODEL TRANSPORT LAYER

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

More information

Lecture 3: The Transport Layer: UDP and TCP

Lecture 3: The Transport Layer: UDP and TCP Lecture 3: The Transport Layer: UDP and TCP Prof. Shervin Shirmohammadi SITE, University of Ottawa Prof. Shervin Shirmohammadi CEG 4395 3-1 The Transport Layer Provides efficient and robust end-to-end

More information

Transport protocols Introduction

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

More information

CSE 461 Module 10. Introduction to the Transport Layer

CSE 461 Module 10. Introduction to the Transport Layer CSE 461 Module 10 Introduction to the Transport Layer Last Time We finished up the Network layer Internetworks (IP) Routing (DV/RIP, LS/OSPF, BGP) It was all about routing: how to provide end-to-end delivery

More information

Da t e: August 2 0 th a t 9: :00 SOLUTIONS

Da t e: August 2 0 th a t 9: :00 SOLUTIONS Interne t working, Examina tion 2G1 3 0 5 Da t e: August 2 0 th 2 0 0 3 a t 9: 0 0 1 3:00 SOLUTIONS 1. General (5p) a) Place each of the following protocols in the correct TCP/IP layer (Application, Transport,

More information

ETSF10 Internet Protocols Transport Layer Protocols

ETSF10 Internet Protocols Transport Layer Protocols ETSF10 Internet Protocols Transport Layer Protocols 2012, Part 2, Lecture 2.2 Kaan Bür, Jens Andersson Transport Layer Protocols Special Topic: Quality of Service (QoS) [ed.4 ch.24.1+5-6] [ed.5 ch.30.1-2]

More information

Chapter 5.6 Network and Multiplayer

Chapter 5.6 Network and Multiplayer Chapter 5.6 Network and Multiplayer Multiplayer Modes: Event Timing Turn-Based Easy to implement Any connection type Real-Time Difficult to implement Latency sensitive 2 Multiplayer Modes: Shared I/O Input

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 3 Transport Layer

Chapter 3 Transport Layer Chapter 3 Transport Layer Lec 8: Transport Layer Service Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 All material copyright 1996-2012 J.F Kurose

More information

Internet Protocol (IP) TCP versus UDP

Internet Protocol (IP) TCP versus UDP Internet Protocol (IP) Low-level protocols used by hosts and routers Guides the packets from source to destination host Hides the transmission path phone lines, LANs, WANs, wireless radios, satellite links,

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

Basic Java Network Programming. CS211 July 30 th, 2001

Basic Java Network Programming. CS211 July 30 th, 2001 Basic Java Network Programming CS211 July 30 th, 2001 The Network and OSI Model IP Header TCP Header TCP/IP: A Paradox TCP Connection Oriented and Connectionless Protocols Reliable: no loss, or duplication,

More information

Become a WebRTC School Qualified Integrator (WSQI ) supported by the Telecommunications Industry Association (TIA)

Become a WebRTC School Qualified Integrator (WSQI ) supported by the Telecommunications Industry Association (TIA) WSQI Certification Become a WebRTC School Qualified Integrator (WSQI ) supported by the Telecommunications Industry Association (TIA) Exam Objectives The WebRTC School Qualified Integrator (WSQI ) is designed

More information

Chapter 2. Application Layer. Chapter 2: Application Layer. Application layer - Overview. Some network apps. Creating a network appication

Chapter 2. Application Layer. Chapter 2: Application Layer. Application layer - Overview. Some network apps. Creating a network appication Mobile network Chapter 2 The Yanmin Zhu Department of Computer Science and Engineering Global ISP Home network Regional ISP Institutional network CSE Department 1 CSE Department 2 Application layer - Overview

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

Internet Group Communication: IP Multicasting

Internet Group Communication: IP Multicasting Internet Group Communication: IP Multicasting Introduction Why to Talk in Groups? Aspects of Group Communication IP-Multicasting Addressing The Internet Group Protocol Motivation Current Situation: Use

More information

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

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

More information

CSC 4900 Computer Networks: Transport Layer

CSC 4900 Computer Networks: Transport Layer CSC 4900 Computer Networks: Transport Layer Professor Henry Carter Fall 2017 Last Time... Sockets programming API TCP and UDP look different. Remember, there is no connect() in UDP - just start sending

More information

Chapter 3 Transport Layer

Chapter 3 Transport Layer Chapter 3 Transport Layer A note on the use of these Powerpoint slides: We re making these slides freely available to all (faculty, students, readers). They re in PowerPoint form so you see the animations;

More information

UNIT IV -- TRANSPORT LAYER

UNIT IV -- TRANSPORT LAYER UNIT IV -- TRANSPORT LAYER TABLE OF CONTENTS 4.1. Transport layer. 02 4.2. Reliable delivery service. 03 4.3. Congestion control. 05 4.4. Connection establishment.. 07 4.5. Flow control 09 4.6. Transmission

More information

Transport Layer. Chapter 3: Transport Layer

Transport Layer. Chapter 3: Transport Layer Transport Layer EECS 3214 Slides courtesy of J.F Kurose and K.W. Ross, All Rights Reserved 29-Jan-18 1-1 Chapter 3: Transport Layer our goals: understand principles behind layer services: multiplexing,

More information

416 Distributed Systems. Networks review; Day 2 of 2 Fate sharing, e2e principle And start of RPC Jan 10, 2018

416 Distributed Systems. Networks review; Day 2 of 2 Fate sharing, e2e principle And start of RPC Jan 10, 2018 416 Distributed Systems Networks review; Day 2 of 2 Fate sharing, e2e principle And start of RPC Jan 10, 2018 1 Last Time Modularity, Layering, and Decomposition Example: UDP layered on top of IP to provide

More information

Higher layer protocols

Higher layer protocols ETSF05/ETSF10 Internet Protocols Higher layer protocols DHCP DNS Real time applications RTP The hen or the egg? DHCP IP addr. IP DNS TCP UDP ETSF05/ETSF10 - Internet Protocols 2 What to configure IP address

More information

CS 3516: Advanced Computer Networks

CS 3516: Advanced Computer Networks Welcome to CS 3516: Advanced Computer Networks Prof. Yanhua Li Time: 9:00am 9:50am, T, R, and F Location: Fuller 320 Fall 2017 A-term 1 Some slides are originally from the course materials of the textbook

More information

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 4

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 4 CMPE 150/L : Introduction to Computer Networks Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 4 1 Lab schedule confirmation Mondays, 12:00-2:00pm Tuesdays, 11:00am-1:00pm Wednesdays, 4:00-6:00pm

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

Development of reliable protocol Sliding window protocols. C = channel capacity in bps I = interrupt/service time + propagation delay

Development of reliable protocol Sliding window protocols. C = channel capacity in bps I = interrupt/service time + propagation delay Outline Development of reliable protocol Sliding window protocols Go-Back-N, Selective Repeat Protocol performance Sockets, UDP, TCP, and IP UDP operation TCP operation connection management flow control

More information

Improving Java Network Programming. Brian Runk, 25 Apr 2006

Improving Java Network Programming. Brian Runk, 25 Apr 2006 Improving Java Network Programming Brian Runk, b.runk@morganstanley.com 25 Apr 2006 Topics Background A simple distributed application java.net programming model java.nio programming model A better programming

More information

Lecture 4: The Transport Layer and UDP

Lecture 4: The Transport Layer and UDP Lecture 4: The Transport Layer and UDP Prof. Shervin Shirmohammadi SITE, University of Ottawa Prof. Shervin Shirmohammadi CEG 4183 4-1 The Transport Layer Provides efficient and robust end-to-end service

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

Multimedia! 23/03/18. Part 3: Lecture 3! Content and multimedia! Internet traffic!

Multimedia! 23/03/18. Part 3: Lecture 3! Content and multimedia! Internet traffic! Part 3: Lecture 3 Content and multimedia Internet traffic Multimedia How can multimedia be transmitted? Interactive/real-time Streaming 1 Voice over IP Interactive multimedia Voice and multimedia sessions

More information

Part 3: Lecture 3! Content and multimedia!

Part 3: Lecture 3! Content and multimedia! Part 3: Lecture 3! Content and multimedia! Internet traffic! Multimedia! How can multimedia be transmitted?! Interactive/real-time! Streaming! Interactive multimedia! Voice over IP! Voice and multimedia

More information

Multimedia Networking

Multimedia Networking Multimedia Networking #2 Multimedia Networking Semester Ganjil 2012 PTIIK Universitas Brawijaya #2 Multimedia Applications 1 Schedule of Class Meeting 1. Introduction 2. Applications of MN 3. Requirements

More information

OSI Transport Layer. objectives

OSI Transport Layer. objectives LECTURE 5 OSI Transport Layer objectives 1. Roles of the Transport Layer 1. segmentation of data 2. error detection 3. Multiplexing of upper layer application using port numbers 2. The TCP protocol Communicating

More information

The TCP Protocol Stack

The TCP Protocol Stack The TCP Protocol Stack Michael Brockway February 16, 2018 Introduction - Layered archtecture Networking software is desgined in a layered fashion The bottom layer is the services offered by the underlying

More information

This is a sample chapter of WebRTC: APIs and RTCWEB Protocols of the HTML5 Real-Time Web by Alan B. Johnston and Daniel C. Burnett.

This is a sample chapter of WebRTC: APIs and RTCWEB Protocols of the HTML5 Real-Time Web by Alan B. Johnston and Daniel C. Burnett. This is a sample chapter of WebRTC: APIs and RTCWEB Protocols of the HTML5 Real-Time Web by Alan B. Johnston and Daniel C. Burnett. For more information or to buy the paperback or ebook editions, visit

More information

CCNA 1 Chapter 7 v5.0 Exam Answers 2013

CCNA 1 Chapter 7 v5.0 Exam Answers 2013 CCNA 1 Chapter 7 v5.0 Exam Answers 2013 1 A PC is downloading a large file from a server. The TCP window is 1000 bytes. The server is sending the file using 100-byte segments. How many segments will the

More information

Different Layers Lecture 20

Different Layers Lecture 20 Different Layers Lecture 20 10/15/2003 Jian Ren 1 The Network Layer 10/15/2003 Jian Ren 2 Network Layer Functions Transport packet from sending to receiving hosts Network layer protocols in every host,

More information

UDP and TCP. Introduction. So far we have studied some data link layer protocols such as PPP which are responsible for getting data

UDP and TCP. Introduction. So far we have studied some data link layer protocols such as PPP which are responsible for getting data ELEX 4550 : Wide Area Networks 2015 Winter Session UDP and TCP is lecture describes the two most common transport-layer protocols used by IP networks: the User Datagram Protocol (UDP) and the Transmission

More information

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

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

More information

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

TCP and Concurrency. The third assignment at DA

TCP and Concurrency. The third assignment at DA TCP and Concurrency The third assignment at DA2402 2009-03-05 Jonas Lundberg/Ola Flygt adapted to Java by Marcus Edvinsson maintained by Marcus Edvinsson Matematiska och systemtekniska institutionen, MSI

More information

Lecture 11. Transport Layer (cont d) Transport Layer 1

Lecture 11. Transport Layer (cont d) Transport Layer 1 Lecture 11 Transport Layer (cont d) Transport Layer 1 Agenda The Transport Layer (continue) Connection-oriented Transport (TCP) Flow Control Connection Management Congestion Control Introduction to the

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

CSE 461 Module 11. Connections

CSE 461 Module 11. Connections CSE 461 Module 11 Connections This Time More on the Transport Layer Focus How do we connect processes? Topics Naming processes Connection setup / teardown Flow control Application Presentation Session

More information

Networking Technologies and Applications

Networking Technologies and Applications Networking Technologies and Applications Rolland Vida BME TMIT Transport Protocols UDP User Datagram Protocol TCP Transport Control Protocol and many others UDP One of the core transport protocols Used

More information

CSC 401 Data and Computer Communications Networks

CSC 401 Data and Computer Communications Networks CSC 401 Data and Computer Communications Networks Transport Layer Intro, Mutliplexing/Demultiplexing, UDP Sec 3.1 3.4 Prof. Lina Battestilli Fall 2017 Chapter 3: Transport Layer our goals: understand principles

More information

CSCD 330 Network Programming

CSCD 330 Network Programming CSCD 330 Network Programming Lecture 9 Transport Layer Winter 2019 Reading: Begin Chapter 3 Some Material in these slides from J.F Kurose and K.W. Ross All material copyright 1996-2007 1 Outline Overview

More information

Master Course Computer Networks IN2097

Master Course Computer Networks IN2097 Chair for Network Architectures and Services Prof. Carle Department for Computer Science TU München Chair for Network Architectures and Services Prof. Carle Department for Computer Science TU München Master

More information

ECE 435 Network Engineering Lecture 15

ECE 435 Network Engineering Lecture 15 ECE 435 Network Engineering Lecture 15 Vince Weaver http://web.eece.maine.edu/~vweaver vincent.weaver@maine.edu 26 October 2016 Announcements HW#5 due HW#6 posted Broadcasts on the MBONE 1 The Transport

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

Java Socket Workshop. July Purpose of this workshop:

Java Socket Workshop. July Purpose of this workshop: Java Socket Workshop July 2012 Purpose of this workshop: The objective of this workshop is to gain experience with writing and compiling programs using the Java programming language. The exercises provide

More information

CS UDP: User Datagram Protocol, Other Transports, Sockets. congestion worse);

CS UDP: User Datagram Protocol, Other Transports, Sockets. congestion worse); CS314-26 UDP: User Datagram Protocol, Other Transports, Sockets! IP is an unreliable datagram protocol " congestion or transmission errors cause lost packets " multiple routes may lead to out-of-order

More information

Ex. No. : 1 Retrieving Data using URL Procedure URLs A URL identifies the location of a resource on the Internet. It specifies the protocol used to access a server (e.g., FTP, HTTP), the name of the server,

More information

CMPE 80N: Introduction to Networking and the Internet

CMPE 80N: Introduction to Networking and the Internet CMPE 80N: Introduction to Networking and the Internet Katia Obraczka Computer Engineering UCSC Baskin Engineering Lecture 11 CMPE 80N Fall'10 1 Announcements Forum #2 due on 11.05. CMPE 80N Fall'10 2 Last

More information

Transporting Voice by Using IP

Transporting Voice by Using IP Transporting Voice by Using IP National Chi Nan University Quincy Wu Email: solomon@ipv6.club.tw 1 Outline Introduction Voice over IP RTP & SIP Conclusion 2 Digital Circuit Technology Developed by telephone

More information

Input ports, switching fabric, output ports Switching via memory, bus, crossbar Queueing, head-of-line blocking

Input ports, switching fabric, output ports Switching via memory, bus, crossbar Queueing, head-of-line blocking Last time Router internals Input ports, switching fabric, output ports Switching via memory, bus, crossbar Queueing, head-of-line blocking Mobility Home, visited s Home, foreign agents Permanent, care-of

More information

Reading and Writing Files

Reading and Writing Files Reading and Writing Files 1 Reading and Writing Files Java provides a number of classes and methods that allow you to read and write files. Two of the most often-used stream classes are FileInputStream

More information

Chapter 2 Applications and

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

More information

RTP. Prof. C. Noronha RTP. Real-Time Transport Protocol RFC 1889

RTP. Prof. C. Noronha RTP. Real-Time Transport Protocol RFC 1889 RTP Real-Time Transport Protocol RFC 1889 1 What is RTP? Primary objective: stream continuous media over a best-effort packet-switched network in an interoperable way. Protocol requirements: Payload Type

More information

Introduction to Network Programming using Java

Introduction to Network Programming using Java Introduction to Network Programming using Java 1 Development platform Starting Point Unix/Linux/Windows available in the department or computing centre More information http://www.tkk.fi/cc/computers/

More information

Chapter 3: Transport Layer Part A

Chapter 3: Transport Layer Part A Chapter 3: Transport Layer Part A Course on Computer Communication and Networks, CTH/GU The slides are adaptation of the slides made available by the authors of the course s main textbook 3: Transport

More information

What is a Network? TCP / IP. The ISO OSI Model. Protocols. The TCP/IP Protocol Suite. The TCP/IP Protocol Suite. Computer network.

What is a Network? TCP / IP. The ISO OSI Model. Protocols. The TCP/IP Protocol Suite. The TCP/IP Protocol Suite. Computer network. What is a Network? TCP / IP Computer network a set of computers using common protocols to communicate over connecting transmission media. Protocol a formal description of message formats and the rules

More information

The aim of this unit is to review the main concepts related to TCP and UDP transport protocols, as well as application protocols. These concepts are

The aim of this unit is to review the main concepts related to TCP and UDP transport protocols, as well as application protocols. These concepts are The aim of this unit is to review the main concepts related to TCP and UDP transport protocols, as well as application protocols. These concepts are important requirements for developing programs that

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

Operating Systems. 16. Networking. Paul Krzyzanowski. Rutgers University. Spring /6/ Paul Krzyzanowski

Operating Systems. 16. Networking. Paul Krzyzanowski. Rutgers University. Spring /6/ Paul Krzyzanowski Operating Systems 16. Networking Paul Krzyzanowski Rutgers University Spring 2015 1 Local Area Network (LAN) LAN = communications network Small area (building, set of buildings) Same, sometimes shared,

More information