Distributed Computing Systems Project 3 – Nutella: A P2P Streaming Movie System Due: Tuesday, April 15 th.

Slides:



Advertisements
Similar presentations
Introduction to Sockets Jan Why do we need sockets? Provides an abstraction for interprocess communication.
Advertisements

Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
Programming with TCP – I
Socket Programming Application Programming Interface.
MULTICAST USING UDP SOCKETS. PRELIMINARIES *CAST Unicast Communication is strictly from one sender to another specified receiver eg: TCP on LAN Broadcast.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Application Layer – Lecture.
Internet Networking Spring 2006 Tutorial 12 Web Caching Protocols ICP, CARP.
Socket Programming.
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
User Datagram Protocol. Introduction UDP is a connectionless transport protocol, i.e. it doesn't guarantee either packet delivery or that packets arrive.
1 Java Networking – Part I CS , Spring 2008/9.
Page: 1 Director 1.0 TECHNION Department of Computer Science The Computer Communication Lab (236340) Summer 2002 Submitted by: David Schwartz Idan Zak.
CSCI 4550/8556 Computer Networks Comer, Chapter 3: Network Programming and Applications.
UDP: User Datagram Protocol. UDP: User Datagram Protocol [RFC 768] r “bare bones”, “best effort” transport protocol r connectionless: m no handshaking.
1 Spring Semester 2007, Dept. of Computer Science, Technion Internet Networking recitation #13 Web Caching Protocols ICP, CARP.
CSE/EE 461 Getting Started with Networking. Basic Concepts  A PROCESS is an executing program somewhere.  Eg, “./a.out”  A MESSAGE contains information.
File Transfer: FTP and TFTP
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Application Layer PART VI.
Client Server Model The client machine (or the client process) makes the request for some resource or service, and the server machine (the server process)
Online Chess Project 3 Due date: April 17 th. Introduction Third in series of three projects This project focuses on adding online support –2 players.
An Introduction to Internetworking. Why distributed systems - Share resources (devices & CPU) - Communicate people (by transmitting data)
© Lethbridge/Laganière 2001 Chap. 3: Basing Development on Reusable Technology 1 Let’s get started. Let’s start by selecting an architecture from among.
An Introduction to Internetworking. Algorithm for client-server communication with UDP (connectionless) A SERVER A CLIENT Create a server-socket (listener)and.
UNIX Sockets COS 461 Precept 1. Clients and Servers Client program – Running on end host – Requests service – E.g., Web browser Server program – Running.
Process-to-Process Delivery:
Lightning Talk Fred Rodriguez Aakash Juneja CPSC 473 March 16, 2012.
Distributed Computing Systems Project 2 – Distributed Shell Due: Friday, April 4 th.
Chapter 17 Networking Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William Stallings.
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.
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
Server Sockets: A server socket listens on a given port Many different clients may be connecting to that port Ideally, you would like a separate file descriptor.
Outline Overview Video Format Conversion Connection with An authentication Streaming media Transferring media.
Internet Applications and Network Programming Dr. Abraham Professor UTPA.
CS162B: IPv4 Socketing Jacob T. Chan. Socketing in the Real World  Most computer games are multiplayer in nature or have multiplayer components  DotA,
Chapter 4: Interprocess Communication‏ Pages
Chapter 2 Applications and Layered Architectures Sockets.
Remote Shell CS230 Project #4 Assigned : Due date :
ECEN “Internet Protocols and Modeling”, Spring 2012 Course Materials: Papers, Reference Texts: Bertsekas/Gallager, Stuber, Stallings, etc Class.
CPSC 441 TUTORIAL – FEB 13, 2012 TA: RUITNG ZHOU UDP REVIEW.
1 Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani Lecture 3: Sockets.
Distributed Computing A Programmer’s Perspective.
Position of application layer. Application layer duties.
DoS Suite and Raw Socket Programming Group 16 Thomas Losier Paul Obame Group 16 Thomas Losier Paul Obame.
CSCE 515: Computer Network Programming UDP Socket Wenyuan Xu Department of Computer Science and Engineering.
CSE/EE 461 Getting Started with Networking. 2 Basic Concepts A PROCESS is an executing program somewhere. –Eg, “./a.out” A MESSAGE contains information.
Project 2: Socket Programming. Overview Sockets Working with sockets Client-Server example Project 1 Hints.
Client/Server Socket Programming Project
The Client-Server Model And the Socket API. Client-Server (1) The datagram service does not require cooperation between the peer applications but such.
Programming with UDP – II Covered Subjects: Creating UDP sockets Client Server Sending data Receiving data Connected mode.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
1 Tips for the assignment. 2 Socket: a door between application process and end- end-transport protocol (UDP or TCP) TCP service: reliable transfer of.
Project 3 Overview Spring 2010 Recitation #9.
Socket Programming. Computer Science, FSU2 Interprocess Communication Within a single system – Pipes, FIFOs – Message Queues – Semaphores, Shared Memory.
Distributed Computing Systems Project 3 – Nutella a P2P Streaming Movie System Due: Sunday, February 14 th.
COMP2322 Lab 4 Socket Programming Toby Lam March 2, 2016.
Socket Programming in C CS587x Lecture 3 Department of Computer Science Iowa State University.
1 K. Salah Application Layer Module K. Salah Network layer duties.
Chapter 9 The Transport Layer The Internet Protocol has three main protocols that run on top of IP: two are for data, one for control.
SOCKET PROGRAMMING Presented By : Divya Sharma.
COMP2322 Lab 4 Socket Programming
CSCE 313 Network Socket MP8 DUE: FRI MAY 5, 2017
Sockets and Beginning Network Programming
Principles of Network Applications
Chapter 14 User Datagram Program (UDP)
Internet Networking recitation #12
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Network Programming CSC- 341
Chapter 07. Socket Options.
TA: Donghyun (David) Kim
Presentation transcript:

Distributed Computing Systems Project 3 – Nutella: A P2P Streaming Movie System Due: Tuesday, April 15 th

Taking a Walk 0 | Mini Video Text-based frames Stored in single file – Delimiter between frames (e.g., “end”) One to ten frames per second (See samples) Taking a Walk 0 | / \ Taking a Walk 0 |

Basic Player from File Open file While file not empty 1.Read everything until “end”, writing to stdout 2.Discard “end” 3.Pause appropriate amount (e.g., usleep() ) 4.Clear screen (see clear.c ) clear.c 5.Repeat from step 1 Close file

Only ASCII? Check out Star Wars ____ `. / /,-.-. \ (/# /__`-'_| || || ) ||# []/()] O || || | __` '__ |--| |<=={_______}=|| |--| | | | || | | | | |={_______}==>|| | | | | | |: _ :| || | | > _| |___|:===:| || |__< :| | __| |: - :| || | |: :| | ==| |: _ :| || | |: :| | ==|_|:===:|___||_| |: :| |___|_|:___:|___||_| |: :| ||| ||/_\|| ||| -| |: ;I_|||[]_||\_/|| ||| -|_I; |_ |__________________| _| | `\\\___|____|____/_//' | J : | \____/ | : L _|_: | |__| | :_|_ -/ _-_.' -/ \- `.-_- \- /______\ /______\ /______\ Or ASCIImeo: (but these are not hand-created)

Searching Looking Get query (i.e., movie name) from user Multicast query to well-known address Listen for peer response – Will provide IP and port for contact If no response, assume no movie If response, contact remote peer and request movie Once movie done or query fails, repeat Listening Listen on well-known address If query matches local movie, send IP and port If request comes to IP and port, stream movie

Streaming Local client contacts Nutella peer and requests movie Nutella peer sends each movie frame – UDP (why?) – Pause between frames sleep(), usleep(), setitimer() Local client receives each movie frame Play frame as it arrives

Streaming Initiating video request Send unicast request for movie to IP and port – Option to play once or repeat Receive frames on socket Play each frame as it arrives Note: should be able to play video and serve video Providing video Listen for movie request at unicast IP address and port Parse request for movie name Stream movie to IP and port of client – One frame at a time Repeat movie once done (if desired) Note: only needs to stream 1 video at time

Example SERVER PEER CLIENT PEER Server started. Client started. Listening... Enter movie name: Thor Sending search request Waiting for response... Received search request for "Thor" Movie not here, so no response Listening... Timeout, movie not found Enter movie name: Walk Sending search request Received search request "Walk“ Movie here Sending IP , port 7832 Listening... Received IP and port from server Sending request to stream... Connection request received. Streaming movie "Walk" to client... O Movie done. Sending done message. | Listening... / \... Received done message. Enter movie name:

IP Multicast - Raw Just like UDP client-server, but special addresses (see Socket slide deck) Server – Send to to addr.sin_addr.s_addr = inet_addr( ); – Port Receiver struct ip_mreq mreq; mreq.imr_multiaddr.s_addr = inet_addr( ); mreq.imr_interface.s_addr = htonl(INADDR_ANY); setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq));

IP Multicast - Middleware /* msockcreate -- Create socket from which to read. return socket descriptor if ok, -1 if not ok. */ int msockcreate(int type, char *address, int port); /* msockdestroy -- Destroy socket by closing. return socket descriptor if ok, -1 if not ok. */ int msockdestroy(int sock); /* msend -- Send multicast message to given address. return number of bytes sent, -1 if error. */ int msend(int sock, char *message, int len); /* mrecv -- Receive message on given mcast address. Will block. return bytes received, -1 if error. */ int mrecv(int sock, char *message, int max_len); (See msock.tar )

IP Multicast – Be Careful! Debug twice, run once From: "Charles R. Anderson" To: Cc: Subject: cs.wpi.edu flooding network cs.wpi.edu is flooding the network with multicast traffic, causing network outages in Fuller Labs. I have disabled the port. -- Charles R. Network Engineer(508) Computing and Communications CenterX2220 on-campus Worcester Polytechnic Institute Fax (508)

Hand In Include all source code (headers, project/Makefiles, etc.) Name at top of all code README.txt with directions Zip up, submit (proj3 is name) Online turnin

Grading Guidelines 15%Client peer movie search. 15%Server peer response to search. 10%Server peer movie parsing. 20%Server peer streaming. 20%Client peer movie playing. 5% Movie looping (request another or repeat). 5%Overall socket communication. 5%Documentation to run, Makefile, etc. 5%Overall robustness (i.e. no bugs)

Grading Rubric Nutella p2p streaming fully implemented, with clients able to query movie, server processes responding, clients playing and the system being robust overall. Proper use of multicast and socket communication. All documentation included Nutella p2p streaming implemented, with queries, response and movie playing, but occasional bugs and/or documentation is missing Nutella p2p streaming framework setup, but query or response not fully functioning and playout of movie may not commence properly. Occasional bugs, but system still compiles and runs. Documentation may be missing Nutella p2p streaming not functional. Server and client pieces compile and run but are not fully integrated. Socket communication works for some aspects of the system but not completely. May be some bugs. Documentation may be missing Nutella p2p system not implemented in that most of the system cannot be started, significant problems or crashes arise during even short runs. Documentation missing and/or problems in compilation.