Data Communication EDA344, DIT420 Description of Lab 1 and Optional Programming HTTP Assignment Bapi Chatterjee Prajith R G.

Slides:



Advertisements
Similar presentations
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Advertisements

HTTP HyperText Transfer Protocol. HTTP Uses TCP as its underlying transport protocol Uses port 80 Stateless protocol (i.e. HTTP Server maintains no information.
HyperText Transfer Protocol (HTTP)
Application Layer-11 CSE401N: Computer Networks Lecture-4 Application Layer Overview HTTP.
2: Application Layer1 Chapter 2: Application Layer Our goals: r conceptual, implementation aspects of network application protocols m transport-layer service.
HyperText Transfer Protocol (HTTP) Computer Networks Computer Networks Spring 2012 Spring 2012.
Some slides are in courtesy of J. Kurose and K. Ross Review of Previous Lecture Network access and physical media Internet structure and ISPs Delay & loss.
9/16/2003-9/18/2003 The Application Layer and Java Programming September 16-18, 2003.
Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley, July.
Week 11: Application Layer1 Week 11: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
Web, HTTP and Web Caching
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
2: Application Layer1 Chapter 2: Application Layer Our goals: r conceptual, implementation aspects of network application protocols m transport-layer service.
Introduction Protocol Layers. Introduction 1-2 Chapter 1 Introduction Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition.
1 K. Salah Module 2.1: Application Layer Application-level protocols provide high-level services –Web and HTTP –DNS –Electronic mail –Remote login –FTP.
HTTP Overview Vijayan Sugumaran School of Business Administration Oakland University.
2/9/2004 Web and HTTP February 9, /9/2004 Assignments Due – Reading and Warmup Work on Message of the Day.
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
PL-IV- Group A HTTP Request & Response Header
2: Application Layer World Wide Web (WWW). Introduction 1-2 Internet protocol stack (recap) r application: supporting network applications m FTP,
CS 3830 Day 7 Introduction : Application Layer 2 Processes communicating Process: program running within a host. r within same host, two processes.
FTP (File Transfer Protocol) & Telnet
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
Mail (smtp), VoIP (sip, rtp)
HyperText Transfer Protocol (HTTP).  HTTP is the protocol that supports communication between web browsers and web servers.  A “Web Server” is a HTTP.
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
TCP/IP Protocol Suite 1 Chapter 22 Upon completion you will be able to: World Wide Web: HTTP Understand the components of a browser and a server Understand.
2: Application Layer1 CS 4244: Internet Software Development Dr. Eli Tilevich.
Application Layer 2 Figures from Kurose and Ross
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
20-1 Last time □ NAT □ Application layer ♦ Intro ♦ Web / HTTP.
2: Application Layer1 Internet apps: their protocols and transport protocols Application remote terminal access Web file transfer streaming multimedia.
Week 11: Application Layer1 Web and HTTP First some jargon r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,…
CS 372 – introduction to computer networks* Wednesday June 30
Maryam Elahi University of Calgary – CPSC 441.  HTTP stands for Hypertext Transfer Protocol.  Used to deliver virtually all files and other data (collectively.
© Janice Regan, CMPT 128, Jan 2007 CMPT 371 Data Communications and Networking HTTP 0.
Introduction 1 Lecture 6 Application Layer (HTTP) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
2: Application Layer1 Web and HTTP First some jargon Web page consists of base HTML-file which includes several referenced objects Object can be HTML file,
1 HTTP EECS 325/425, Fall 2005 September Chapter 2: Application layer r 2.1 Principles of network applications m app architectures m app requirements.
CIS679: Lecture 13 r Review of Last Lecture r More on HTTP.
1-1 HTTP request message GET /somedir/page.html HTTP/1.1 Host: User-agent: Mozilla/4.0 Connection: close Accept-language:fr request.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
Appendix E: Overview of HTTP ©SoftMoore ConsultingSlide 1.
Important r There will be NO CLASS on Friday 1/30/2015! r Please mark you calendars 1.
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications  app architectures  app requirements r 2.2 Web and HTTP.
CITA 310 Section 2 HTTP (Selected Topics from Textbook Chapter 6)
Overview of Servlets and JSP
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 7 Omar Meqdadi Department of Computer Science and Software Engineering University of.
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
COMP2322 Lab 2 HTTP Steven Lee Jan. 29, HTTP Hypertext Transfer Protocol Web’s application layer protocol Client/server model – Client (browser):
World Wide Web r Most Web pages consist of: m base HTML page, and m several referenced objects addressed by a URL r URL has two components: host name and.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Week 11: Application Layer 1 Web and HTTP r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,… r Web page consists.
© Janice Regan, CMPT 128, Jan 2007 CMPT 371 Data Communications and Networking HTTP 0.
Lecture 5 Internet Core: Protocol layers. Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP 
Network Applications: HTTP/1.0
2: Application Layer 1 Chapter 2 Application Layer These ppt slides are originally from the Kurose and Ross’s book. But some slides are deleted and added.
Data Communication EDA344, DIT420 Description of Lab 1 and Optional Programming HTTP Assignment Aras Atalar Prajith R G.
Block 5: An application layer protocol: HTTP
Lecture 2 Dr. Richard Spillman Fall 2009
COMP2322 Lab 2 HTTP Steven Lee Feb. 8, 2017.
Internet transport protocols services
Introduction to Networks
Chapter 2: outline 2.1 principles of network applications
EEC-484/584 Computer Networks
لایه ی کاربرد مظفر بگ محمدی 2: Application Layer.
CS 5565 Network Architecture and Protocols
Data Communication EDA344, DIT420 Description of Lab 1 and Optional Programming HTTP Assignment Aras Atalar Prajith R G 24/01/2018.
EEC-484/584 Computer Networks
Socket Programming 2: Application Layer.
Presentation transcript:

Data Communication EDA344, DIT420 Description of Lab 1 and Optional Programming HTTP Assignment Bapi Chatterjee Prajith R G

DataCommunication'16 Overview Lab 1 (Compulsory): Wireshark lab –General Description Programming Assignment (Optional): Multi-threaded Web Server –What to do and how to do it –HTTP messages –Processes and threads

Lab 1 (Compulsory): Wireshark lab Get insight into Internet traffic through the Wireshark tool Beware of ethical considerations! E.g. it is inappropriate to use this and similar tools outside the lab environment. DataCommunication'16

Wireshark Lab: Important Deadlines Feb 2: Study and submit in ping-pong the preparatory assignment. ** ONLY after this submission can you get an invitation to the lab and book a timeslot. Accept the invitation & book lab-slot in ping-pong ** Feb 8, 9: Lindholmen. Study and get a printed copy of the manual for this lab and get a printed copy along when coming to lab Feb 15: Submit Lab Report in ping-pong DataCommunication'16

Accepting the invitation When an invitation is sent to you, you will also be notified by mail to your mail-id. You should log-in to your ping-pong account and go to the invitations (On top menu : Tools -> Invitations). Check the current invitations and click on the link 'Book me on event' to book yourself for the event. DataCommunication'16

Focus on the labs now DataCommunication'16

Wireshark Lab Download wireshark and install it in your machine Follow the preparation notes for the lab to get familiar with wireshark. Try the lab instruction manual yourself and there will be help during the lab session. DataCommunication'16

Programming Assignment (Optional): Multi-threaded Web Server Implement a multi-threaded webserver following the http RFC specifications Successful completion gives extra credit if you pass the March2016 exam DataCommunication'16

Programming Assignment: Important Deadlines 0: Study the assignment description. Work on the assignment. For support with questions consult the FreuentlyAskedQuestions Document Feb 3, 10: Join the Q&A sessions Feb 17: Present your solution at the demo session Feb 24: Submit your code in ping-pong system DataCommunication'16

Multi-threaded Web Server The task: –Write a small Web server that supports a subset of the HTTP 1.0 specifications –The server should be able to handle simultaneous requests implement the HTTP methods GET and HEAD handle and respond to invalid requests Include Date:, Server:, Content-Type: and Content- Length: headers in all responses. Last-Modified: should be included where appropriate.

DataCommunication'16 Multi-threaded Web Server Hints –Read the textbook an example: simple Web server that does not handle simultaneous requests (Section 2.7, 2.9, 5 th edition) –To handle concurrent requests One way is to create a thread for each request –Java tutorial Writing a Client/Server pair –Check course assignments page for hints

DataCommunication'16 http message format: request ASCII (human-readable format; try telnet to www server, port 80) GET /somedir/page.html HTTP/1.0 Host: Connection: close User-agent: Mozilla/4.0 Accept: text/html, image/gif,image/jpeg Accept-language:fr (extra carriage return + line feed) request line (GET, POST, HEAD commands) header lines Carriage return, line feed indicates end of message

DataCommunication'16 http request message: general format

DataCommunication'16 http message format: response HTTP/ OK Date: Thu, 06 Aug :00:15 GMT Server: Apache/1.3.0 (Unix) Last-Modified: Mon, 22 Jun 1998 …... Content-Length: 6821 Content-Type: text/html data data data data data... status line (protocol status code status phrase) header lines data, e.g., requested html file

DataCommunication'16 http response status codes 200 OK –request succeeded, requested object later in this message 301 Moved Permanently –requested object moved, new location specified later in this message (Location:) 400 Bad Request –request message not understood by server 404 Not Found –requested document not found on this server 505 HTTP Version Not Supported In first line in server->client response message. A few sample codes:

DataCommunication'16 Java Concurrency Support class MessagePrinter implements Runnable { protected String msg_; The message to print protected PrintStream out_; The place to print it MessagePrinter(String msg, PrintStream out) { out_ = out; msg_ = msg; } public void run() { out_.print(msg_); // display the message }

DataCommunication'16 Sequential Version class SequentialPrinter { public static void main(String[] args) { MessagePrinter mpHello = new MessagePrinter("Hello\n", System.out); MessagePrinter mpGoodbye = new MessagePrinter("Goodbye\n", System.out); mpHello.run(); mpGoodbye.run(); }

DataCommunication'16 MultiThreaded Version class ConcurrentPrinter { public static void main(String[] args) { MessagePrinter mpHello = new MessagePrinter("Hello\n", System.out); MessagePrinter mpGoodbye = new MessagePrinter("Goodbye\n", System.out); Thread tHello = new Thread(mpHello); Thread tGoodbye = new Thread(mpGoodbye); tHello.start(); tGoodbye.start(); }

DataCommunication'16 Different types of servers Single process/thread do forever accept client connection process all client requests close connection One thread per connection do forever accept client connection create a new thread to process requests

Socket programming goal: learn how to build client/server applications that communicate using sockets socket: door between application process and end-end-transport protocol DataCommunica tion'16 Internet controlled by OS controlled by app developer transport application physical link network process transport application physical link network process socket

DataCommunication'16 Socket programming Two socket types for two transport services: – UDP: unreliable datagram – TCP: reliable, byte stream-oriented TCP Client Socket: Socket TCP Server Socket: ServerSocket We will see examples in our skeleton code