Вы находитесь на странице: 1из 29

Open Source. Open Possibilities.

Peer-to-Peer Technology:
Driving Innovative User
Experiences in Mobile
Marcello Lioy
Director, Engineering,
Qualcomm Innovation Center, Inc.

PAGE 1

Open Source. Open Possibilities.

Agenda
AllJoyn Overview
Architecture and Security Concepts
Performance Considerations
Open Source
Q&A

PAGE 2

Open Source. Open Possibilities.

AllJoyn Overview

PAGE 3

Open Source. Open Possibilities.

What is AllJoyn?
AllJoyn enables ad hoc, proximity based, peer-to-peer, bearer
agnostic networking between devices and applications

PAGE 4

Open Source. Open Possibilities.

What is peer-to-peer
and why is it important?
Enables devices and applications to
communicate with each other without the
need of a server
Mobile peer-to-peer will enable a new
generation of proximal experiences

PAGE 5

Open Source. Open Possibilities.

Why Peer-to-Peer (P2P) Is Hard


TRANSPORTS LIKE BLUETOOTH AND WI-FI ARE NOT ENOUGH

Radio technologies alone


have not made P2P easy.
(ex: Bluetooth pairing)

PAGE 6

Open Source. Open Possibilities.

P2P enablers have


not become
ubiquitous or open

P2P via the cloud is not


proximal, adds latency,
requires a WWAN, and
subjects the user to
data charges

AllJoyn Makes Peer-to-Peer Simple


Discover

Adapt

Manage

Interoperate

Exchange

devices and
applications
around you

to devices
coming and
going

transports like
Bluetooth and
Wi-Fi and
message routing
across them

across disparate
Operating
Systems and
bearers

Information in a
secure manner

PAGE 7

Open Source. Open Possibilities.

MEDIA
SHARING
Trade pictures,
videos or business
cards

PROXIMAL
AWARENESS

CHAT
Exchange tips, ask
questions or taunt your
opponent

MULTI-PLAYER
GAMING
Play head-to-head

Notification of others
nearby

SOCIAL
Find people nearby to
follow or places to like

PROXIMAL
SERVICES
Coupons & rewards

What new experiences can AllJoyn enable?

PAGE 8

Open Source. Open Possibilities.

Architecture and Security Concepts

PAGE 9

Open Source. Open Possibilities.

Overview
AllJoyn is a distributed software bus
Each device runs a bus daemon
Applications communicate directly with daemon
Daemons on each device communicate with daemons on other devices
Daemons do message routing and namespace management

Bus formation is ad hoc


Based on proximal discovery
Abstracts multiple discovery mechanisms

Protocol is transport independent


Ground-up implementation of the D-Bus wire-protocol with extensions
Supports Wi-Fi and Bluetooth currently

PAGE 10

Open Source. Open Possibilities.

Why the D-Bus Wire Protocol?


Why reinvent the wheel?
www.freedesktop.org/wiki/Software/dbus

IPC mechanisms used on many Linux distributions


Deeply integrated with system services and session management
Supports RPCs as well as unicast and multicast events

Message bus architecture


RPC and events implemented as messages
P2P came from extending bus cross device; messages flow over bigger bus

Object oriented
Objects, interfaces, methods, and properties

Language neutral
Bindings for C, Java, Python, Perl, etc.

PAGE 11

Open Source. Open Possibilities.

DBus Compatibility

Peer sessions

Service
Advertisement
& Discovery

Distributed
Bus
Management

Object model
Authentication
&
Encryption

DBus Compatibility
Wire-protocol

Routing rules

Client-bus
authentication
Header
Compression

Message
Expiration (TTL)

Signals

Remote
procedure call

Introspection

Device-to-device
message
routing

Name space
Raw Session
support

Topology
management
Bluetooth

PAGE 12

Open Source. Open Possibilities.

WiFi

Distributed Software Bus


Device 1
TCP or Bluetooth
Local socket

App X

App Y

Daemon

Device 2
App X

App Z

Daemon

PAGE 13

Open Source. Open Possibilities.

Conceptually peers are


applications, not devices.
Applications communicate
with a local daemon.
Daemons handle routing
between devices.

Device 3
App Y

App Z

Daemon

Ad-hoc Bus Formation

Device

Find-Name
request

Advertise-Name
request

Client App

Daemon

Service App

Eureka!

Actual discovery mechanism is transport dependent


On Wi-Fi a lightweight IP multicast protocol
On Bluetooth device discovery with EIR and SDP query

PAGE 14

Open Source. Open Possibilities.

Device

Daemon

Ad-hoc Bus Formation


Once connected daemons form single bus with shared namespace
Peers can discover when other peers join or leave bus
Peers can make RPC calls and send and receive events
Session reference counting keeps device-to-device connections alive
Multicast events can be sent to all peers in the session

Device

Device

Client App

Service App
Peer Session

Daemon

PAGE 15

Open Source. Open Possibilities.

Distributed bus

Daemon

Object Model
AllJoyn applications expose their functionality via objects
These are typically organized in a hierarchy

Objects implement interfaces (one or more)


Interfaces are composed of members, which fall into three categories
Methods classic OO object interaction

Signals asynchronous event notification

Can be broadcast, multicast or point-to-point

Properties data members


Application

Application

Event
handler

Bus
Proxy
Object

Signal

PAGE 16

Bus
Object
Tree

Open Source. Open Possibilities.

Signal

Language Bindings
Native implementation for AllJoyn is C++
Java binding is available for Android
Binding for JavaScript is under development
Considering bindings for C, C# and Python
Object model is similar for all bindings

PAGE 17

Open Source. Open Possibilities.

Design of Security Framework


Authentication and encryption is designed to be app-to-app
The bus is not involved other than to route
Trust relationship established between the applications
Device pairing not required unless the transport requires it

In case of Bluetooth, AllJoyn does not normally trigger pairing

Security is enabled per-interface


Authentication and key exchange initiated on demand

Security-enabled interface
Authentication is required to make method calls
Authentication required to receive signals

PAGE 18

Open Source. Open Possibilities.

Security ModelAuthentication and Encryption


Method calls to security-enabled
interface are designed to be
encrypted and authenticated. If
call encrypted, so is reply.
AllJoyn
Application

Key
Store

Signals from a
security-enabled
interface are
designed to be
encrypted and
authenticated.

Key
AllJoyn
Store Application

PAGE 19

Open Source. Open Possibilities.

AllJoyn
Distributed
Bus

AllJoyn
Application

Key
Store

Application
can allow a
mix of securityenabled and
non-secure
interfaces.
Maintain own
key storecan
use password.

Performance Considerations

PAGE 20

Open Source. Open Possibilities.

Message Efficiency
Header compression
Designed to significantly reduce the size of message headers
Intended for messages that are sent frequently
Designed to allow short messages to fit into single-slot Bluetooth packets

Time to live
Added for multi-player games and streaming where stale data is useless
Expired messages are silently discarded
Mainly applies to signals
Introduces a new message header field

Multipoint sessions
Bounds the scope of broadcast signals to session members
Provides mechanism for deciding when radios are no longer in use

PAGE 21

Open Source. Open Possibilities.

Direct Point-to-Point Bulk Data Exchange


Raw Sessions

Process

Removes overhead by
providing direct access to
underlying socket

1. AllJoyn sets up a regular peer-topeer session

Application can read/write


any data to the socket

3. Daemon returns open file


descriptors to peers, closes
session

2. Peers call daemon to obtain the


file descriptor for socket

4. Session is gone but sockets


remain open
Available in current 2.0 release

PAGE 22

Open Source. Open Possibilities.

Open Source

PAGE 23

Open Source. Open Possibilities.

Why Open Source AllJoyn?


Qualcomm Innovation Center, Inc. (QuIC)
Brings together dedicated group of engineers focused on OSS
Enables and optimizes open source software with Qualcomm technology
QuIC is a large contributor to WebKit and other OSS projects

Peer-to-peer success relies on network effect


Must be on as many devices as possible

Not practical for QuIC to port to every platform


Allow OSS community to add platforms

As well as features, and fixes! All contributions are welcome!

To further enable this chose Apache 2.0 license

PAGE 24

It is a common and well accepted OSS license


Provides flexibility to licensees and developers

Open Source. Open Possibilities.

AllJoyn Open Source Project: www.alljoyn.org


Launched Jan. 2011
GitHub hosts source
alljoyn.github.com

Apache 2 License
Download
Documentation
SDK

Contribute Code
Participate
Get Source

PAGE 25

Open Source. Open Possibilities.

Open Source Status


Publishing updates to the source all weekdays
Publish a binary SDK when we do major releases
Released version 2.0 mid May

Have process in place for accepting third party contributions


Building user community
Lots of discussions on the
forums
Broad range of questions
and topics

PAGE 26

Open Source. Open Possibilities.

Summary
Easier P2P Development

Open Source Sponsored by QuIC


Launched January 2011

OS and platform
independent

Multiple language bindings


Multiple transports

Download SDK

PAGE 27

Open Source. Open Possibilities.

SDK download and forums at


www.alljoyn.org

Source code available on GitHub at


www.github.com/alljoyn

Download Source Code

Contribute

Questions?

Questions?
Questions?
Sprgsml?
Sprgsml?
Cwestiynau?
Cwestiynau?

PAGE 28

Open Source. Open Possibilities.

Questions?

Disclaimer

Copyright 2011 Qualcomm Innovation Center, Inc. All rights reserved. AllJoyn is a trademark
of Qualcomm Innovation Center, Inc. Other product and brand names may be trademarks or
registered trademarks of their respective owners.

PAGE 29

Open Source. Open Possibilities.

Вам также может понравиться