Sharing audiovisual content using a P2P environment
based in JXTA
Rosa Mª Martín, Barcelona School of Informatics -
Technical University of Catalonia (UPC) i2CAT Foundation
Terena 2007
Contents
Introduction
Integrated Research Project
MobileMedia project
MACHINE Project
Conclusions
Terena 2007
Contents
Introduction
Integrated Research Project
MobileMedia project
MACHINE Project
Conclusions
Terena 2007
Introduction
• We’ll present the outcome of several projects developed by the i2CAT Foundation that use P2P technology based in JXTA:
– Integrated Research Project -audiovisual files sharing P2P application (e-Ruc).
– MediaMòbil (MobileMedia) project -Mobile P2P application.
– MACHINE Project -live P2P streaming application (coolruc).
Terena 2007
Participants• i2CAT Foundation promoted and financed the projects
described in this presentation.
• i2CAT Foundation is a non-profit organization whose aim is to promote research and innovation in advanced Internet technology.– High quality media distribution over IP– distributed audiovisual services– mobile multimedia applications– …
• These projects have been developed by our group at the Barcelona School of Informatics in collaboration with other research groups from other universities.
Terena 2007
Why did we choose P2P?• A model for application decentralization and distribution.
– Nodes can act as client and servers at the same time.– Peers cooperate to offer the services
• P2P is very extended – It is a very efficient technology for data sharing, instant
messaging, collaborative work, etc.– P2P traffic represents an important percentage of Internet traffic.
• Opportunity – More nodes connected to Internet.– More powerful user equipments.– Better connections
• Content distribution medium of the future if security and DRM issues are conveniently solved.
• There are a lot of possibilities for research and innovation in this area.
Terena 2007
Why JXTA?• JXTA is a specification of open protocols that
offers services and infrastructure for P2P applications
• JXTA facilitates the communication between different kind of peers (personal computers, servers, mobile terminals, etc.)
• Open software project www.jxta.org promoted by a development team from Sun Microsystems.
• JXTA is independent of the implementation (programming language, platform, network and application).
Terena 2007
About JXTA• JXTA defines the mechanisms for the
management and control of nodes behaviour to:– Discover other nodes (peers), keep their
visibility, publish their resources and discover the rest of resources and services of the network.
• Exchanging messages called Advertisements.
– Organize the nodes into subgroups (peergroups) of nodes.
• Peergroups are independent of the network topology (firewalls, NAT, type of connection, etc.)
– Communicate among nodes• Using pipes that are communication channels.
Terena 2007
Terena 2007
Contents Introduction
Integrated Research Project
MobileMedia project
MACHINE Project
Conclusions
Terena 2007
Integrated Research Project
• 2004-2005.
• application e-Ruc – management and sharing of
audiovisual contents.
Terena 2007
e-Ruc architecture • The application architecture is based on web services (SOAP) and
P2P (JXTA platform).
• Architecture follows the MPEG21 standard for. – Content management.– content adaptation to device and network capacities– personalization and content recommendations– Digital rights management (user and distribution licenses).
• Video distribution systems based on a central server or on P2P technologies (integrating content protection mechanism).
• Video transcodification services that rely on a grid.
• Distributed authentication and security (SSO, single sign on)
Terena 2007
e-Ruc architecture
Terena 2007
Authentication and security in e-Ruc
• Distributed authentication and security (SSO, single sign on) based on SAML.
– Integrated in all web services.
– We’ve integrated it in the P2P network (JXTA).
WS ClienteWS
Servidor Autenticación
WS
SAML-Request
SAML-Assertion
Llamada +[+ SAML-Assertion]
[+ Firma Cliente]
Crear_SAML_Request()Firmar()
verificar_SAML_Assertion()
Terena 2007
Content distribution in e-Ruc
• Semantic metadata and licenses are stored in central servers (and accessed through web services).
• We also store, together with metadata, a reference to physical location of content.
• This reference indicates the mechanism used to publish and to access the file. We used three different mechanisms for e-Ruc:– a P2P network based on JXTA.
p2pi2cat://reference – External services (using a URL)– Central Video servers (Content
upload is done through a web service).
Terena 2007
Digital Rights Management and Content Protection
1. The contents distributed through the P2P network can be coded.
2. The keys to decipher it are stored in the module of DRM.
3. The application verifies, calling the DRM module, the authorization to access content of the user and if the user license is correct, and obtains the deciphering key for it.
4. The application downloads the file from the p2p network and it deciphers the content while it visualizes in player (it is not stored deciphered).
Terena 2007
JXTA in e-Ruc
• Nodes executing the e-Ruc application are members of the JXTA group I2catPeerGroup. All JXTA services and resources are available through:
– The Rendezvous service that obtains initial information about group members.
– The Membership service that accepts or denies new members. eRUC implements a JAAS module (Java Authentication and Authorization Service) to integrate authentication with the SSO system of the project.
– The Discovery service that discovers resources and services. It allows the publication and searching of advertisements.
– The Content Manager Service (CMS) that allows file sharing. e-Ruc implements an audiovisual file sharing module that uses this service.
Terena 2007
Results from the Integrated Research
Project• An e-Ruc node publishes and downloads files from a p2p network:– We’ve gained expertise with p2p and JXTA technology.– We’ve used p2p to share audiovisual content in
conjunction with protection mechanisms and rights management services.
– Results have been integrated in other innovation projects such the XAC project (an audiovisual platform for local televisions) or AprenCAT (an audiovisual portal for catalan learning).
• But…– The system we implemented downloads the complete file
from other node in the network. This is not very efficient for large files.
Terena 2007
Contents Introduction
Integrated Research Project
MobileMedia project
MACHINE Project
Conclusions
Terena 2007
MediaMòbil/MobileMedia Project (2005-2006)
• Main objectives:– To evaluate the possibilities of applying peer to peer
(p2p) technologies on the mobile based applications.
– To analyze the technological possibilities, those that allow and improve the convergence between TV and mobile devices (DVB-H, video streaming, advanced interactive systems¿)
– Analyze, test and develop context awareness technologies, multimedia services, localization services and localization-based instant messenger services.
Terena 2007
P2P in MediaMòbil
• P2P architecture implemented using JXME.– JXTA adaptation for mobile terminals
(supporting Java MIDP and CLDP configuration).
– Adapted to device restrictions: problems of connectivity and low memory capacity.
• Use of JXME to manage presence control (in a multiplayer mobile game):
– XML messages adapted for the project.– Connexion to the peergroup using a proxy-
relay that keeps information of the path between nodes, forwards messages coming from the rest of the nodes. It’s available through port 80.
– Data compression between the relay and the terminal.
– Different kind of member in the peergroup: mobile terminals, servers, personal computers, etc.
• Use of Bluetooth (JSR-82) to share files.
Terena 2007
Contents
Introduction
Integrated Research Project
MobileMedia project
MACHINE Project
Conclusions
Terena 2007
Machine Project
• 2006-2007 • Advanced services for the distribution
and management of high quality media. – distributed audiovisual services based on
the MPEG 21 standards (such as Digital Rights Management services, Content Management services, Session Mobility, Content Adaptation, etc. )
– Enhancements to modules developed in previous projects.
– P2P streaming.
Terena 2007
Content ManagementService
Web ServicesAutentification
Content ManagementService
Media servers
SO
AP
DRM
ClusterVideolan
Transcodification
Device characteritics detection
Content ManagementService Content Management
Service
CoolrucApplication
coolrucp2p live streaming
P2P streamingnetwork
P2P connected
servers
Tracking, Session Mobility and Personalization
P2P in Machine Project
Streaming P2P
•IP multicast alternative.•Requirements:
• Requires less Band Width in the origin than Client-Server models.
• Is more scalable than Client-Server models.
•Similar to Peercast, freecast, ACTLab TV, ESM, Vatata, NodeZilla, Coolstreaming, Pplive
MembershipManager
Parnership Manager
Buffer Manager
SchedulerManager
BUFFER
DONet Manager (DONet Network interface)
JXTA
Buffer Map
Seg5
Seg4
Seg3
Seg2
Seg1
VLC Input Adapter
UDP port
VideoLAN
Video file
Videocam
P2P technology is extended to other modules Media Servers, Transcodification Services, Metadata servers
Streaming P2p
Terena 2007
P2P Streaming• Exemples: Peercast, freecast, ACTLab TV, ESM, Vatata,
NodeZilla, Coolstreaming, PPlive, etc.
• These systems rely on an overlay network built out of different peers that share segments of the buffer that is being streamed.– The peer that broadcasts the stream divides the streaming
buffer into segments. All receivers peers have to assemble the buffer back from the segments as well as forward the segments to other peers based on a gossip algorithm
• There are several approaches for P2P streaming depending on how the overlay network is built.
Terena 2007
P2P streaming reliability and efficiency
• The way the overlay network is built and maintained is a key issue for the system robustness in front of node failures. To consider:– Nodes can connect and disconnect at any time– Control messages to maintain the overlay network
shouldn’t add too much overhead.
• Efficiency of p2p streaming networks is optimized by minimizing:– packet looses– the first segment arrival time
– the point to point delay.
Terena 2007
System design: DONet+JXTA
• We decided to design our system based on DONet, a data-driven approach for P2P streaming.– DONet is an efficient architecture.
• and to use JXTA services and protocols– JXTA makes it easier to integrate with other modules of the
project.– it gives us more independence from the topology of the
physical network (NAT, firewalls, etc.) – It allows us to speed up the development process.
• However…– JXTA may add an extra overhead to DONet protocols that can
make them loose their efficiency. – This is a key issue we plan to evaluate by developing and
testing a high definition streaming p2p application called coolruc.
Terena 2007
Coolruc application• The application we are
developing (coolruc) allows users to send and receive a live stream of video or audio.
• A P2P Multimedia stream is originated at one point using a live video signal as source (live streaming) or a multimedia file.
• The stream is sent to other nodes using p2p.
• Each node implements the DONet architecture, using some of the JXTA services and protocols to implement part of its functionality.
Videocam
Coolruc(Stream
consumer)
Coolruc (Stream originator)
Coolruc(consumer)
Coolruc(consumer)
Video file
Terena 2007
MembershipManager
Parnership Manager
Buffer Manager
SchedulerManager
BUFFER
DONet Manager (DONet Network interface)
JXTA
Buffer Map
Seg5
Seg4
Seg3
Seg2
Seg1
VLC Input Adapter
UDP port
VideoLAN
Video file
Videocam
stream originator
1. We use VideoLAN player to stream from a file or a live source. VideoLAN player is in charge of streaming the multimedia source, sending content through an UDP port.
Terena 2007
MembershipManager
Parnership Manager
Buffer Manager
SchedulerManager
BUFFER
DONet Manager (DONet Network interface)
JXTA
Buffer Map
Seg5
Seg4
Seg3
Seg2
Seg1
VLC Input Adapter
UDP port
VideoLAN
Video file
Videocam
stream originator
2. A special component (called VLN input adapter) continuously receives the local stream and stores it in the Buffer.
3. The buffer is divided into data segments of the same size. This segments are ready to be shared amongst peers.
Terena 2007
MembershipManager
Parnership Manager
Buffer Manager
SchedulerManager
BUFFER
DONet Manager (DONet Network interface)
JXTA
Buffer Map
Seg5
Seg4
Seg3
Seg2
Seg1
VLC Input Adapter
UDP port
VideoLAN
Video file
Videocam
stream originator
4. The DONet Manager creates a channel in the DONet network. Nodes willing to download the stream will connect to this channel.
5. The Membership Manager manages the set of members and may redirect new connections to other members that act as Deputy Nodes.
Note that receivers always make a first connection to the origin node. This may help to check user access control or more sophisticated DRM functionalities.
Terena 2007
MembershipManager
Parnership Manager
Buffer Manager
SchedulerManager
BUFFER
DONet Manager (DONet Network interface)
JXTA
Buffer Map
Seg5
Seg4
Seg3
Seg2
Seg1
VLC Output Adapter
UDP port
VideoLAN player
Stream receiver1. coolruc connects to
the DONet network through DONet Manager and looks for the origin of the stream or channel that wants to visualize which is created by the stream originator.
2. When it connects (join) to this channel, the stream originator returns an alternative node (Deputy Node) from its members list.
Terena 2007
MembershipManager
Parnership Manager
Buffer Manager
SchedulerManager
BUFFER
DONet Manager (DONet Network interface)
JXTA
Buffer Map
Seg5
Seg4
Seg3
Seg2
Seg1
VLC Output Adapter
UDP port
VideoLAN player
Stream receiver
3. Deputy node sends back to the receiver a set of candidate nodes that is added to the list of members, that is managed by the Membership Manager.
4. The receiver exchange segments with partners which is a subset of members that are randomly chosen and managed by the Partnership Manager.
Terena 2007
Stream receiver
5. Partners exchange their Buffer maps, in order to indicate their buffer segments availability
Buffer map reflects the state of the buffer. It indicates which segments are available in the local node.
MembershipManager
Parnership Manager
Buffer Manager
SchedulerManager
BUFFER
DONet Manager (DONet Network interface)
JXTA
Buffer Map
Seg5
Seg4
Seg3
Seg2
Seg1
VLC Output Adapter
UDP port
VideoLAN player
Terena 2007
MembershipManager
Parnership Manager
Buffer Manager
SchedulerManager
BUFFER
DONet Manager (DONet Network interface)
JXTA
Buffer Map
Seg5
Seg4
Seg3
Seg2
Seg1
VLC Output Adapter
UDP port
VideoLAN player
Stream receiver
n-1 n n+1
n-1 n n+1n-1 n n+1
G
C DH
6. Scheduler Manager uses the DONet algorithm to determine the best partner from which to download a segment, using the information provided by the partners BufferMaps
n
n+1
n-1
Terena 2007
MembershipManager
Parnership Manager
Buffer Manager
SchedulerManager
BUFFER
DONet Manager (DONet Network interface)
JXTA
Buffer Map
Seg5
Seg4
Seg3
Seg2
Seg1
VLC Output Adapter
UDP port
VideoLAN player
Stream receiver
7. Buffer segments are read by the VLC Output Adapter that sends buffer content through an UDP port.
8. VideoLAN player receives and displays the multimedia stream that is been sent though the UDP port.
Terena 2007
Content management
• Basic or metadata driven distributed search.• Automatic adaptation/transcodification. Redundancy media services (balanced cluster)
DRM
• Digital Rights Control. Distribution and user licenses (including adaptation conditions)
Security
• SSO (Single Sign On) Authentication System in conjunction with user certificates based on SAML 2.0• Use of SRTP to cipher contents
Other services
• Preferences, recommendations and user tracking (WS)• Session mobility
Other functionalities of the MACHINE Project
Terena 2007
MACHINE PROJECTResearch on high quality audiovisual streaming services
Content management
• Basic or metadata driven distributed search.• Automatic adaptation/transcodification. Redundancy media services (balanced cluster)
CoolrucLive P2P Streaming applicationMPEG21 architecture (metadata management, DRM, session mobility, content adaptation)Distributed application: P2P (JXTA) and web services
Security
• SSO (Single Sign On) Authentication System in conjunction with user certificates based on SAML• SRTP
DRM
• Digital Rights Control. Distribution and user licenses (including adaptation conditions)
Other services
• Preferences, recommendations and user tracking (WS)• Session mobility
Content ManagementService
Web ServicesAutentification
Content ManagementService
Media servers
SO
AP
DRM
ClusterVideolan
Transcodification
Device characteritics detection
Content ManagementService Content Management
Service
CoolrucApplication
coolrucp2p live streaming
P2P streamingnetwork
P2P connected
servers
Tracking, Session Mobility and Personalization
Streaming P2P
•IP multicast alternative.•Requisites:
• Requires less Band Width in the origin than Client-Server models.
• Is more scalable than Client-Server models.
MembershipManager
Parnership Manager
Buffer Manager
SchedulerManager
BUFFER
DONet Manager (DONet Network interface)
JXTA
Buffer Map
Seg5
Seg4
Seg3
Seg2
Seg1
VLC Input Adapter
UDP port
VideoLAN
Video file
Videocam
<license><license>
<issuer><issuer>
<grant><principal><mx:play><allConditions>
</allConditions></grant>
<grant><principal><mx:play><allConditions>
</allConditions></grant>
Condicions d’adaptacióBitrateFormatDisplay size
Other conditions
Condicions d’adaptacióBitrateFormatDisplay size
Other conditions
Content InformationBitrateFormatDisplay size
Content InformationBitrateFormatDisplay size
MPEG-21 + MPEG-7
Original content data
Final user license with adaptation conditions
Content InformationBitrateFormatDisplay size
Content InformationBitrateFormatDisplay size
Final content data (if adapted)
MPEG-7
MPEG-7
<license><license>
<issuer><issuer>
<grant><principal><mx:play><allConditions>
</allConditions></grant>
<grant><principal><mx:play><allConditions>
</allConditions></grant>
Condicions d’adaptacióBitrateFormatDisplay size
Other conditions
Condicions d’adaptacióBitrateFormatDisplay size
Other conditions
Content InformationBitrateFormatDisplay size
Content InformationBitrateFormatDisplay size
MPEG-21 + MPEG-7
Original content data
Final user license with adaptation conditions
Content InformationBitrateFormatDisplay size
Content InformationBitrateFormatDisplay size
Final content data (if adapted)
MPEG-7
MPEG-7
Terena 2007
MACHINE PROJECTMetadata Management and Personalization
Session Mobility
• Enables changing the terminal and resuming the previous viewing of a content• Content adaptation according to terminal and network capabilities• Good usability
application/x-www-form-urlencoded
MySQLContent Features
Distributed Search
• Distributed metadata search using the JXTA technology• Algorithm designed for an environment where multiple entities share audiovisual contents• Searches performed in parallel on different servers load balancing faster searches than in a centralized environment• Removes the Single Point of Failure
Content Cataloguing
• 2 Steps:1. Temporal video segmentation2. Segment cataloguing
• JSP, JavaScript & AJAX tecnologies• Form accessibility• Optimum navigation to avoid using the mouse speeds up the data introduction process Main Menu
User Logging In
User NOT FOUND in the database User FOUND in the databaseOpens a new player
The player starts at the time pointwhere the session was saved
User search on the database
Session Mobility working scheme
MyS QLS es s ions
JXTA
SearchData
WS
Remote Servers
Local Server
Local client
SearchData
SearchData
SearchData
Terena 2007
Contents Introduction
Integrated Research Project
MobileMedia project
MACHINE Project
Conclusions
Terena 2007
Conclusions• P2P applications represent a vast area of technology for
innovation and research.
• P2P is already used for audiovisual distribution for a large scale number of users.
• We’ve successfully used JXTA P2P technologies to discover services dynamically, to share audiovisual files and to connect different kind of devices.
• Our current work intends to determine whether or not a JXTA p2p application is suitable for high quality streaming and video on demand services.
• Integration with other research groups developments will allow us to generate a powerful distributed application to access and share audiovisual content.
Terena 2007
ThanksRosa Mª Martín ([email protected])
• Thanks to: Josep Casanovas, José Francisco Crespo, Joan Esteve, Joan Giralt, Fran Martínez Posadas from LCFIB.i2CAT Foundation.
People from the research groups of UPC, URL and UPF that have worked in the projects presented.
Terena 2007
Extra slides
Terena 2007
JXTA Independency of the implementation
• Independency from programming language (there are implementations in Java, C/C++ and Perl) and from the operative system.
• It can work with different protocols (HTTP, TCP, etc.) and network topologies.
• XML is used to code the Messages (advertisements)
Java == platform independenceXML == application independenceJXTA == network independence
Terena 2007
JXTA software architecture
Terena 2007
References• [1] i2CAT Foundation. http://www.i2cat.net• [2] JXTA official web. http://www.jxta.org• [3] eRuc final presentation.
http://www.i2cat.cat/i2cat/servlet/I2CAT.MainServlet?seccio=15_3_4• [4] MediaMobile project.
http://www.i2cat.cat/i2cat/servlet/I2CAT.MainServlet?seccio=16_26• [5] P2P IPTV Motherlist. http://orblive.com/modules/newbb/viewtopic.php?
topic_id=13&forum=4• [6] Silverston, Thomas; Fourmaux, Oliver. “Source vs Data-driven
Approach for Live P2P Streaming”. International Conference on Networking, International Conference on Systems and International Conference on Mobile Communications and Learning Technologies (ICNICONSMCL’06). 2006.
• [7] Duc, A.Tran; Kien, A. Hua; Tai, D.; “ZIGZAG: An Efficcient Peer-to-Peer Scheme for Media Streaming”. IEEE INFOCOM. 2003. San Francisco, CA.
• [8] Zhang, Xinyan; Liu, Jiangchuan; Li, Bo; Yum, Tak-Shing Peter “DONet: A data-driven overlay network for efficient live media streaming”. IEEE INFOCOM. 2005.
• [9] JXTA Membership Service.• http://platform.jxta.org/nonav/java/api/net/jxta/membership/package-
summary.html• [10] VideoLAN VLC media player http://www.videolan.org/