Documente Academic
Documente Profesional
Documente Cultură
Proceedings of the Fourth Annual IEEE International Conference on Pervasive Computing and Communications Workshops (PERCOMW06)
0-7695-2520-2/06 $20.00 2006 IEEE
network if the pure P2P network is connected with the
hybrid P2P network via a gateway node.
As described in 2.1, the P2P protocols consist of the
P2P Core protocol and P2P System protocols. Table 1
shows the functions provided by these protocols. We
classified the functions of each protocol as mandatory
or optional.
3.1. 1. P2P Core protocol
The P2P Core Protocol provides a function to
forward messages on P2P networks which realizes
reactive and proactive communication modes. Request
and response messages are defined for the reactive
communication mode while an advertise message is
defined for the proactive communication mode.
Additionally, this protocol defines three
communication types namely, unicast, multicast and
broadcast.
Since the most important function for the
communication on P2P networks is forwarding
messages between nodes, most of the functions defined
on the P2P Core protocol are classified as mandatory.
However, P2P multicast communication function is
classified as optional since P2P multicast
communication is not always necessary, and requires
complex processing.
3.1. 2. P2P Basic Communication protocol
The P2P Basic Communication Protocol establishes
and releases P2P sessions. In our P2P architecture, all
communications are based on a P2P session between a
pair of adjacent P2P nodes. This protocol also has the
function of exchanging node resource information
such as names of its adjacent nodes, joined multicast
groups, and supported P2P applications. This protocol
consists of a Hello method, a Bye method, and a
Resource Information Exchange method. A Hello
method is used to establish a P2P session. A Bye
method is used to release a P2P session. A Resource
Information Exchange method is used to exchange
node resource information between P2P nodes.
The Basic communication protocol is required by
every node on the P2P network, since it is used to
establish and release the connection between P2P
nodes.
3.1. 3. P2P Control Message protocol
The P2P Control Message Protocol provides
ancillary functions such as notification of message
forwarding error, keep-alive for P2P sessions, and first
peer node discovery in pure P2P network
environments. For example, an ErrorReport message is
used to notify the source node of the forwarding error
of a message. A Diagnose message is used to measure
RTT (Round Trip Time) between P2P nodes. A
Lookfor message is used to find the first peer node to
which a node should connect in pure P2P network
environments.
On the P2P network, P2P nodes join or leave
frequently, and the messages are transmitted hop by
hop. On such environment, the existence of a
destination node or the route to the destination node
can not be assured in advance when a source node
forwards a message to the destination node. When the
message can not be forwarded to the destination node,
the node which receives the message should send back
an error message to the source node.
Since the above functions of the P2P Control
Message protocol is required by every node on the P2P
network, those functions are classified as mandatory.
Discovery function for finding resources
autonomously on the P2P network is also very
important since there is no server to manage the
information of resources on the P2P network.
Therefore, the functions of resource discovery, such as
first peer discovery or node discovery are classified as
mandatory. Since P2P multicast communication is not
always necessary, the ancillary function for P2P
multicast is optional..
3.1. 4. P2P Basic Service protocol
In hybrid P2P network environments, the P2P Basic
Service Protocol is used between a P2P node and a
control node, to provide the functions for first peer
discovery, source route discovery toward a destination
node and network topology optimization. In this study,
the functions for participating on hybrid P2P network
are classified as optional. Therefore, the P2P Basic
Service protocol is classified into as optional protocol.
3.1. 5. P2P Multicast Communication protocol
The P2P Multicast Communication Protocol
constructs a multicast distribution tree for multicast
member nodes and forwards multicast messages along
it. A node finds a member node of a multicast group,
and sends a Join message to it, and a multicast routing
table is generated at each node along the path toward it
at the same time. When a node wants to send a
multicast message, it sends the message toward the
adjacent member nodes based on the multicast routing
table. The multicast messages are forwarded along the
multicast distribution tree using the bi-directional
shared tree mechanism. When the node leaves the
multicast group, it sends a Leave message to the
adjacent member nodes.
As described in 3.1.1., the P2P multicast
communication function is classified as optional.
Accordingly, the P2P Multicast Communication
Protocol is classified into an optional protocol.
3.1. 6. P2P Multicast Service protocol
The P2P Multicast Service Protocol is used between
a P2P node and a control node, and provides the
Proceedings of the Fourth Annual IEEE International Conference on Pervasive Computing and Communications Workshops (PERCOMW06)
0-7695-2520-2/06 $20.00 2006 IEEE
functions for member nodes discovery of a multicast
group and source route discovery toward member
nodes in hybrid P2P network environments. This
protocol is classified into an optional protocol since the
multicast communication function and communication
on a hybrid network are classified as optional.
Table1. Protocol functions
Protocols Function Support
Proactive Communication mode
(advertise message)
Must
Reactive Communication mode
(Request/Response message)
Must
Unicast Must
Broadcast Must
P2P Core
Protocol
Multicast Option
Establish the connection between
P2P nodes (Hello message)
Must
Release the connection between
P2P nodes.(Bye message)
Must
Resource information advertise Must
P2P Basic
Communication
Protocol
Resource information exchange Must
Notify the forwarding error (error
report)
Must
Diagnose connectivity between
nodes (diagnose)
Must
Node discovery (diagnose) Must
First peer discovery (Lookfor) Must
P2P Control
Message
Protocol
Multicast group member
discovery
Option
P2P Basic
Service Protocol
Used for the communication with
a control node (Ex. login,
exchange node information, node
discovery)
Option
P2P Multicast
Communication
Protocol
Establish Multicast group (Ex.
Join or leave multicast group)
Option
P2P Multicast
Service Protocol
Used for the communication with
a control node regarding multicast
communication ( management for
multicast group)
Option
3.2. Example of Protocol Sequence
Figure3 shows a basic sequence when a P2P node
participates in a P2P network and exchanges resource
information with another node in pure P2P network
environments. At first, Node A sends a Lookfor
message using network specific broadcast or multicast
mechanisms (e.g. IP multicast) and receives the
corresponding LookforResponse messages from
several nodes. Then, Node A sends a Hello message to
one of discovered nodes (Node B) to participate in a
P2P network. When a HelloResponse Message from
Node B is received, a P2P session is established
between Node A and Node B. Resource information
will be exchanged using Resource Information
Advertisement messages in the next step.
Node A Node B Node C
Look Por PlrcL
Peer Node
CoooecLlog
PlrcL Peer Node
LxcHaoglog
Pecource
|oformaLloo
Lookfor
Lookfor
Pecpooce
Hello
HelloPecpooce
Peer-Lo-Peer CoooecLloo LcLabllcHmeoL
Pecource
|oformaLloo
AdverLlcemeoL
Pecource
|oformaLloo
AdverLlcemeoL
Figure3. Ex. Message sequence
3.3. Example of P2P Protocol Message
All P2P protocols are defined in XML syntax.
Figure4 shows an example of a "hello" message sent
by a moble phone node. Information on the P2P Core
protocol such as message type, message ID, destination
node ID and source node ID is declared inside the
<Core> element. Information on the P2P Basic
Communication protocol is declared inside the
<MsgBody> element. For the compliance with XML
and independency among P2P protocols, each P2P
protocol has its own namespace.
Figure4. An example of message
4. Implementation
In this section, we describe the prototype
implementation of the P2P protocol and application on
a mobile phone which has a bluetooth interface. This
prototype software realizes P2P communication via
bluetooth.
<Core xmlns=http://www.mml.yrp.nttdocomo.
co.jp/ED/2004/03/p2p_core>
<ComType>Unicast</Comtype>
<MsgID>123456-200402021600-nd1</MsgID>
<MsgType>Request</MsgType>
<CommunityID>p2p</CommunityID>
<Source> source node ID </Source>
<Destination> <target>destination node ID </Target>
</Destination>
<MsgBody protocol="http://www.mml.yrp.nttdocomo.
co.jp/ED/2004/03/p2p_basic_com">
<Hello xmlns="http://www.mml.yrp.nttdocomo.
co.jp/ED/2004/03/p2p_basic_com"/>
</MsgBody>
</Core>
Proceedings of the Fourth Annual IEEE International Conference on Pervasive Computing and Communications Workshops (PERCOMW06)
0-7695-2520-2/06 $20.00 2006 IEEE
4.1. System components
Software architecture of the prototype is shown in
Figure5. The mobile phone supports JAVA API for
bluetooth communication in addition to DoJa2.0 which
is JAVA API for NTT DoCoMo's mobile phones. The
software is implemented as a JAVA application. The
Bluetooth Personal Area Network (PAN) profile,
which supports TCP or UDP, is used for underlying
networks. This prototype software is compiled as one
JAVA application and installed on the mobile phone.
The size of the prototype software which includes the
P2P platform and the P2P application is about 200KB.
In this study, we use 4 mobile phones and each mobile
phone is connected, as shown in Figure6. PAN User
(PANU) and Group ad-hoc Network (GN) are roles
defined in the Bluetooth PAN profile. A GN can only
connect with a PANU, and also a PANU can only
connect with a GN. Therefore, 3 PANU nodes connect
with a GN node in this case. Since a P2P network is
constructed over a Bluetooth network, the connections
between P2P nodes are independent of the Bluetooth
connections.
: Implemented software
KVM/CLDC
CLDC1.0+DoJa2.0 Bluetooth PAN module
i-Appli (JAVA Application)
P2P Application (Instant Message)
CLDC1.0+Doja2.0 API Java API for Bluetooth
P2P Node
manager
P2P Protocol
Adapter for Bluetooth PAN
KVM/CLDC
CLDC1.0+DoJa2.0 Bluetooth PAN module
i-Appli (JAVA Application)
P2P Application (Instant Message)
CLDC1.0+Doja2.0 API Java API for Bluetooth
P2P Node
manager
P2P Protocol
Adapter for Bluetooth PAN
Figure5. Prototype software architecture
P2P connection
P2P node
(PANU)
P2P node
(PANU)
P2P node
(PANU)
P2P node
(GN)
Bluetooth connection
Figure6. Communication with Prototype
4.2. Application
We have implemented an instant messaging
application over mobile phones. The instant messaging
application includes a messaging service and a
presence service. In the messaging service, users are
able to send their messages by broadcast or unicast.
The presence service is used to announce each user's
presence information when its presence information
changes. The user interface of this application is
shown in Figure7. When the node receives a message,
it is displayed sequentially on this screen.
Figure7. IM application user Interface
4.3. Operation
Figure8 shows the message sequence of the instant
messaging application. First, a mobile phone user starts
the P2P node manager software on the mobile phone,
and then it searches other mobile phones that can setup
the connection via bluetooth communication link. Next,
the user starts the P2P instant message application.
When the application starts, the mobile phone tries to
establish P2P connection with other mobile phone. The
mobile phone sends a Lookfor message by broadcast to
find mobile phones on which a P2P node is running,
and establish P2P connection with the node which
sends back a Lookfor response message. The P2P
connection is established by exchanging a Hello
message and a Hello response message. After
establishing the P2P connection, each node sends a
Resource information advertise message to exchange
its resource information. In our experiment, it takes
about 5 seconds to setup the Bluetooth link, 10
seconds to search nodes with Lookfor massages, and 5
seconds to establish a P2P connection by exchanging
Hello and Resource information messages.
Proceedings of the Fourth Annual IEEE International Conference on Pervasive Computing and Communications Workshops (PERCOMW06)
0-7695-2520-2/06 $20.00 2006 IEEE
After establishing a P2P connection, messages for the
instant message application on a mobile phone can be
exchanged. First, the application sends a presence
information message to notify its presence information.
Then, instant messages are exchanged among mobile
phones. It takes about 0.5 seconds to send a message to
the neighbor node. However, the time changes
according to the condition of the wireless channel.
When the distance between mobile phones was 10 m,
it took more than 10 seconds.
When the application ends, it sends a presence
information message which indicates "good bye" and
closes the P2P connection by sending a bye message of
the P2P Basic communication protocol.
Mobile Phone 2
(GN)
Establish
P2P
connection
Setup Bluetooth
Mobile Phone 3
(PANU)
Mobile Phone 1
(PANU)
Presence lnformation
bye
Hello
Hello Response
connected
Lookfor
Lookfor Response
Start lM
Application
Stop lM
Application
Presence lnformation (leaved)
close Bluetooth connection
Application
Messages
lnstant Message
Resource lnformation
Resource lnformation
Mobile Phone 2
(GN)
Establish
P2P
connection
Setup Bluetooth
Mobile Phone 3
(PANU)
Mobile Phone 1
(PANU)
Presence lnformation
bye
Hello
Hello Response
connected
Lookfor
Lookfor Response
Start lM
Application
Stop lM
Application
Presence lnformation (leaved)
close Bluetooth connection
Application
Messages
lnstant Message
Resource lnformation
Resource lnformation
Figure8. Message sequence
5. Conclusion
We have designed a P2P protocol for mobile
phones that provides P2P communication environment
for various mobile applications. Seamless
interconnection between various devices including
mobile phones across various networks such as the
Internet, home networks and wireless sensor networks
could be achieved using our P2P architecture and
protocols. We also described the prototype
implementation of the P2P protocol and its application
on a mobile phone via bluetooth.
P2P security and privacy are important topics that
we will investigate in the near future. Additionally, we
will continue to develop new P2P applications over
mobile phones and will evaluate scalability and
performance of our P2P architecture and protocols in
more depth.
6. References
[1] Skype, http://www.skype.com
[2] IEEE 1394 http://www.1394ta.org/
[3] Bluetooth http://www.bluetooth.com/
[4] Java J2SE 1.3.1 http://java.sun.com/j2se/1.3/
[5] Norihiro Ishikawa, at el, Jupiter: Peer-to-Peer
Networking Platform over Heterogeneous Networks, The
3rd International Conference on Computing,
Communications and Control Technologies (CCCT2005)
[6] Hiromitsu Sumino, at el, Design and Implementation of
a Multicast Instant Messaging System on the Mobile P2P
Network, First International Conference on Mobile
Computing and Ubiquitous Networking (ICMU), Yokosuka,
Japan. 8-9, January, 2004
[7] Hiromitsu Sumino, at el, A Mobile Multimedia Content
Search using RDF, MDM2003 4th International Conference
on Mobile Data Management, Melbourne, Australia. 21-24,
January, 2003.
Proceedings of the Fourth Annual IEEE International Conference on Pervasive Computing and Communications Workshops (PERCOMW06)
0-7695-2520-2/06 $20.00 2006 IEEE