Distributed Computer Systems - PowerPoint PPT Presentation

About This Presentation
Title:

Distributed Computer Systems

Description:

Distributed Computer Systems. Project 4. Nutella - A P2P Streaming Movie System. Taking a Walk ... Local client contacts Nutella peer and requests movie. UDP (why? ... – PowerPoint PPT presentation

Number of Views:403
Avg rating:3.0/5.0
Slides: 9
Provided by: clay2
Learn more at: http://web.cs.wpi.edu
Category:

less

Transcript and Presenter's Notes

Title: Distributed Computer Systems


1
Distributed Computer Systems
  • Project 4
  • Nutella - A P2P Streaming Movie System

2
Mini Video
Taking a Walk 0
Taking a Walk 0 / \
Taking a Walk 0
  • Text-based frames
  • Stored in single file
  • Delimiter between frames
  • One to ten frames per second

3
Only ASCII? Check out Star Wars
,-'//__\\-. ,' ____ .
/ / ,-.-. \ (/ /__-'_
) /() O
__------------------'__ -- lt_______
-- -------------
_______gt _
gt _ ___ __lt __ -
_
_____ ___________
/_\ -
I__\_/ -_I _
__________________ _ \\\___________/_//
' J \____/ L __
__ __ -/ _-_.' -/ \- .-_-
\- /______\ /______\ /______\
  • http//www.asciimation.co.nz/

4
Searching
  • Get query (ie- movie name) from user
  • Multicast query to well-known address
  • Listen for peer response
  • Will providing IP and port for contact
  • Contact remote peer and request movie
  • If no response, assume no movie
  • Note, will only work on LAN. But tomorrow
  • Internet 2 may do multicast
  • Multicast overlay networks

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

6
IP Multicast - Raw
  • Just like UDP client-server, but special
    addresses
  • Server
  • Send to 239.0.0.1 to 239.255.255.255
  • addr.sin_addr.s_addr inet_addr(239.0.0.1)
  • Port
  • Receiver
  • struct ip_mreq mreq
  • mreq.imr_multiaddr.s_addr inet_addr(239.0.0.1)
  • mreq.imr_interface.s_addr htonl(INADDR_ANY)
  • setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP,
    mreq, sizeof(mreq))

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

(Hey! See msock.tar!)
8
IP Multicast Be Careful!
From "Charles R. Anderson" ltcra_at_WPI.EDUgt To
system_at_cs.wpi.edu, mvoorhis_at_WPI.EDU,
jbanning_at_WPI.EDU Cc netops_at_WPI.EDU Subject
cs.wpi.edu flooding network Date Mon, 25 Nov
2002 002935 -0500 cs.wpi.edu is flooding the
network with multicast traffic, causing network
outages in Fuller Labs. I have disabled the
port. -- Charles R. Andersoncra_at_wpi.edu Network
Engineer(508) 831-6110 Computing and
Communications CenterX2220 on-campus Worcester
Polytechnic Institute Fax (508) 831-5483
  • Debug twice, run once
Write a Comment
User Comments (0)
About PowerShow.com