p2p audio streaming for the ipod touch p2p audio
play

P2P Audio Streaming for the iPod Touch P2P Audio Streaming for the - PowerPoint PPT Presentation

P2P Audio Streaming for the iPod Touch P2P Audio Streaming for the iPod Touch Student: Tran, Thanh Minh Tu Student: Tran, Thanh Minh Tu Advisor: Prof. Dr. Thomas Schmidt Advisor: Prof. Dr. Thomas Schmidt Information Engineering Information


  1. P2P Audio Streaming for the iPod Touch P2P Audio Streaming for the iPod Touch Student: Tran, Thanh Minh Tu Student: Tran, Thanh Minh Tu Advisor: Prof. Dr. Thomas Schmidt Advisor: Prof. Dr. Thomas Schmidt Information Engineering Information Engineering HAW Hamburg – iNet Lab HAW Hamburg – iNet Lab iPhone University Program iPhone University Program Hamburg - 19.11.2009 Hamburg - 19.11.2009

  2. Introduction Overlay P2P ALM iPhone PAS4i Discussion Overview  Introduction  Overlay P2P Network  Application Layer Multicast (ALM)  Audio Processing on the iPhone  P2P Audio Streaming for the iPod Touch (PAS4i)  Discussion

  3. Introduction Overlay P2P ALM iPhone PAS4i Discussion Introduction  The P2P file sharing systems  The P2P media streaming systems  Our story  The PAS4i application

  4. Introduction Overlay P2P ALM iPhone PAS4i Discussion The P2P file sharing systems  Napster (1999)  Gnutella  BitTorrent

  5. Introduction Overlay P2P ALM iPhone PAS4i Discussion The P2P media streaming systems

  6. Introduction Overlay P2P ALM iPhone PAS4i Discussion The P2P media streaming systems

  7. Introduction Overlay P2P ALM iPhone PAS4i Discussion Our story

  8. Introduction Overlay P2P ALM iPhone PAS4i Discussion The PAS4i application  PAS4i: “P2P Audio Streaming for the iPod Touch” ¯ ¯ ¯ ¯ ± ¯ ¯ 9

  9. Introduction Overlay P2P ALM iPhone PAS4i Discussion Client-Server model Client-Server For large scale system: High deployment cost!!!

  10. Introduction Overlay P2P ALM iPhone PAS4i Discussion Overlay P2P Network  Unstructured P2P  Centralized P2P  Pure P2P  Hybrid P2P  Structured P2P  DHT-based: Chord, Pastry, CAN etc.

  11. Introduction Overlay P2P ALM iPhone PAS4i Discussion Unstructured P2P Centralized P2P Pure P2P Hybrid P2P Central entity (indexing) No central entity Dynamic central entities Any peer can be provides the service Any peer can be removed removed Pros and Cons solution Central server: Flooding: of both Centralized & single point of failure communication overhead Pure P2P

  12. Introduction Overlay P2P ALM iPhone PAS4i Discussion Unstructured P2P Pure P2P Structured P2P Centralized P2P

  13. Introduction Overlay P2P ALM iPhone PAS4i Discussion Structured DHT-based P2P I have or I know where BabyOneMoreTime.mp3 is located. Hi, I am looking for BabyOneMoreTime.mp3 Node locations on the underlay IP network

  14. Introduction Overlay P2P ALM iPhone PAS4i Discussion Structured DHT-based P2P P2P user: search for BabyOneMoreTime.mp3 IP: 85.8.10.30 Song key = 810 Key: 280 Step 1: forwarding Routing table: 400, 545 Key: 400 IP: stanford.edu Step 2: forwarding Key: 009 Key: 120 Routing table: Step 3: forwarding 120, 280 Step 4: responding IP: 7.31.10.25 Key: 545 Key: 870 Routing table: IP: haw-hamburg.de BabyOneMoreTime.mp3 691 Key: 810 Key: 691 Routing table: 545, 870 Node locations on the Structured P2P network

  15. Introduction Overlay P2P ALM iPhone PAS4i Discussion Structured DHT-based P2P – Pastry approach  Routing information of a Pastry node key: 102022 key: 103200

  16. Introduction Overlay P2P ALM iPhone PAS4i Discussion Structured DHT-based P2P – Pastry approach  Pastry API  pastryInit(Credentials, Application)  route(msg, key)  send(msg, IP-addr)  deliver(msg, key)  forward(msg, key, nextId)  newLeafs(leafSet)

  17. Introduction Overlay P2P ALM iPhone PAS4i Discussion Structured DHT-based P2P

  18. Introduction Overlay P2P ALM iPhone PAS4i Discussion Application Layer Multicast (ALM)  IP Multicast vs. ALM  ALM characteristics  ALM media Live streaming topologies  Tree-first vs. Mesh-first  Scribe – a Tree-first approach

  19. Introduction Overlay P2P ALM iPhone PAS4i Discussion IP Multicast vs. ALM IP Multicast ALM

  20. Introduction Overlay P2P ALM iPhone PAS4i Discussion ALM characteristics  Deployment level (i.e., Proxy-based or End- system ALM)  Application domain (e.g., number of user, latency constraint, network resource etc.)  Multicast management approach  Routing mechanism

  21. Introduction Overlay P2P ALM iPhone PAS4i Discussion Streaming topologies – Tree-first Single-tree approach Multi-tree approach No upload bandwidth for leaf nodes All nodes contribute the upload bandwidth

  22. Introduction Overlay P2P ALM iPhone PAS4i Discussion Streaming topologies – Tree-first Peer Churn Robustness in Tree-based approach?

  23. Introduction Overlay P2P ALM iPhone PAS4i Discussion Scribe – a Tree-based approach Streaming tree: Scribe Built on the Pastry Overlay Pastry Overlay Network

  24. Introduction Overlay P2P ALM iPhone PAS4i Discussion Scribe – a Tree-based approach  Scribe API  create(credentials, groupId)  join(credentials, groupId, msgHandler)  leave(credentials, groupId)  multicast(credentials, groupId, msg)

  25. Introduction Overlay P2P ALM iPhone PAS4i Discussion Scribe – group creation

  26. Introduction Overlay P2P ALM iPhone PAS4i Discussion Scribe – group joining

  27. Introduction Overlay P2P ALM iPhone PAS4i Discussion Scribe – multicast tree

  28. Introduction Overlay P2P ALM iPhone PAS4i Discussion Scribe – group multicasting

  29. Introduction Overlay P2P ALM iPhone PAS4i Discussion Scribe – multicast tree repairing

  30. Introduction Overlay P2P ALM iPhone PAS4i Discussion Streaming topologies – Mesh-first Poor mesh topology Streaming tree is built On improved mesh Communication overhead?

  31. Introduction Overlay P2P ALM iPhone PAS4i Discussion Audio Processing on the iPhone  Layers of iPhone OS  The three API layers of Core Audio  Audio Queue Services  Audio File Stream Services  Audio Unit Services (Converter unit, Multichannel Mixer unit, remoteIO unit)  Audio Processing Graph Services  etc. (not used in Pas4i)  Audio Codec

  32. Introduction Overlay P2P ALM iPhone PAS4i Discussion Layers of iPhone OS Graphics Technologies Audio Technologies Three API Layers Video Technologies

  33. Introduction Overlay P2P ALM iPhone PAS4i Discussion The three API layers of Core Audio Used by PAS4i Only available for Mac OS X (not in iPhone OS)

  34. Introduction Overlay P2P ALM iPhone PAS4i Discussion Audio File Stream Services (1 st )  To play streamed audio content (i.e., from network connection)  Used with Audio Queue Services  Parse audio packets and metadata in a network bitstream or on-disk files ( two callback functions for audio packet and metadata )  Supported formats: MP3, AAC, WAVE, MPEG-4 etc.

  35. Introduction Overlay P2P ALM iPhone PAS4i Discussion Audio Queue Services (AQS) (2 nd )  Provides low overhead way to record and play audio  AQS and AVAudioPlayer class: the only ways to play compressed audio (e.g., MP3)  Uses with Audio File Services or Audio File Stream Services  Audio Queue Callback Functions for Recording and Playback

  36. Introduction Overlay P2P ALM iPhone PAS4i Discussion Playback with AQS (2 nd )

  37. Introduction Overlay P2P ALM iPhone PAS4i Discussion Recording with AQS (2 nd )  For recording, the audio callback has a converse role  Not used in the PAS4i: WHY?  recording callback occurred only every 16384 samples (latency of 0.37s for 44.1 kHz)  unacceptable for real-time audio processing  => have to use Audio Unit remoteIO (callback occurred for every 1024 samples)

  38. Introduction Overlay P2P ALM iPhone PAS4i Discussion Audio Unit Services (AU) (3 rd )  Provides lowest latency audio, especially when doing simultaneous input and output e.g., VoIP  Converter unit  Multichannel mixer unit  RemoteIO unit  etc. (not used in PAS4i)

  39. Introduction Overlay P2P ALM iPhone PAS4i Discussion AU Converter (3 rd )  Provides sample rate, bit depth, and bit format (linear to fixed-point) conversions  Conversion is done only between PCM ( Audio Converter Services for conversion with other compressed formats ) O I u input bus 0 n output bus 0 t p AU Converter p PCM PCM* u u t t

  40. Introduction Overlay P2P ALM iPhone PAS4i Discussion AU Multichannel mixer (3 rd )  Used to mix multiple audio streams to a single stream  Only works with PCM PCM input bus 0 O I u output bus 0 n PCM input bus 1 t AU Multichannel p p mixer PCM Mixed stream u u PCM input bus n t t

  41. Introduction Overlay P2P ALM iPhone PAS4i Discussion AU remoteIO (3 rd )  Allows to connect to inputs (from microphone or from application data) and outputs (to speaker or to application)  Only works with PCM O input bus 0 – from app. output bus 0 – to speaker I u n t p AU remoteIO input bus 1 – from mic. output bus 1 – to app. p u u t t

  42. Introduction Overlay P2P ALM iPhone PAS4i Discussion Audio Processing Graph Services (4 th )  Provides interfaces for representing a set of audio units, connections between their inputs and outputs, and callbacks used to provide inputs

Recommend


More recommend