A Peer-to-peer Communication System

A Peer-to-peer Communication System
Yong Li2, Jiang Li1, Keman Yu1, Kaibo Wang3, Shipeng Li1, and Ya-Qin Zhang1
1 Microsoft Research Asia, 3F Sigma Building, 49 Zhichun Road,
Beijing 100080, China
{jiangli, i-kmyu, spli, yzhang}@microsoft.com
2 Department of Computer Science, Zhejiang University
Hangzhou 310027, China
liyong_zju@hotmail.com
3 CIM Institute, Xi’an Jiaotong University,
Shanxi 710049, China
kbwang@msn.com
Abstract. The demand of communicating anywhere, anytime on any device is
growing with the development of modern information technology. Current instant
messaging services enable people to be aware of each other’s presence and
to exchange text information. However, almost all of these services are based
on client/server architecture. If servers crash, all connections are lost. As an alternative,
peer-to-peer architecture basically relies on clients, but existing systems
usually emphasize sharing of computing resources and files. In this paper,
we propose a peer-to-peer communication system, which combines the advantages
of instant messaging services and peer-to-peer networking. In the system,
in addition to being aware of each other’s presence, users can simultaneously
attend multiple multimedia meetings with each meeting allowing multiple attendees.
Users have full control over the exchange of real-time text/voice/video
information in these meetings.
1 Introduction
The ultimate goal of communication technology is to enable people to exchange information
anywhere, anytime, on any device. Currently instant messaging services
such as MSN Messenger, AOL Instant Messaging, ICQ and Yahoo Pager provide
presence awareness and chat functions to users. Some of them also provide audio and
video capabilities. However, their client/server architecture makes them still unreliable
sometimes. For instance, MSN Messenger once crashed for almost one week, and the
buddy list information for about 10% of users were permanently lost. As an alternative,
a peer-to-peer architecture basically relies on clients. It overcomes some drawbacks of
client/server systems though it also has its limitations. While SETI@home and Napster
are used purely for computing resource sharing and music file sharing, Gnutella,
Freenet and Groove also put emphasis on collaborations [1].
Gnutella [2] is a file sharing system that uses architecture quite different from Napster.
Gnutella does not rely on any central servers to organize the network. It is a fully
decentralized pure peer-to-peer system. It uses a message-based, application-level
routing strategy. When sending a query, it uses message broadcasting. Message
broadcasting is perfectly suitable when more than one participant can provide a valid
response to a request. But broadcasting is not a rational method for response. Gnutella
creates temporary routing items for the response to be sent back to the requester. Determining
node connections when a node takes part in the Gnutella network is an interesting
issue. It adopts a hierarchical scheme to reduce links between low-capacity
nodes to diminish the burden of these nodes.
Freenet [3] is a peer-to-peer application which permits the publication, replication,
and retrieval of data. It also gives a mechanism to prevent both authors and readers of
data from being detected by others. In other words, it provides anonymity for users.
Freenet creates a very large and geographically distributed hard drive with anonymous
access. When inserting a file, a Freenet node will distribute the encrypted file data in
several other nodes, and each node saves the file data and creates a routing item for
the future request of this file. After a successful insertion, the owner will publish a
unique file description. A user who wants to retrieve a file only needs to input the file
description. This retrieved message is forwarded until a node which holds the request
data returns it. Each node in the path for returning the requested data also caches the
data in a local routing table. So the quality of the routing should improve over time.
Groove [4] is a system which provides shared spaces for people who have requirements
to collaborate in some work. In Groove, users make immediate and direct connections
with other users. It is a virtual space for small group interactions. These interactions
include communication media, tools for sharing, and activities. In each
shared space, the user can directly invite other members, add new tools, and keep
track of activity and changes. Groove is not a pure peer-to-peer system. It uses a central
directory server named Groove.net to find other users and then creates connections
to them. It also uses a relay service to keep synchronization for each member in a
shared space.
To sum up, existing peer-to-peer systems basically emphasize sharing computing
resources and files. There is usually no real-time requirement in these systems. However,
for communication, the ideal situation is that as soon as a user joins a network,
the user can get a connection to the target people and exchange text/voice/video information
in real-time even if the user does not has a direct link to that people. The
system will take any method to provide links whether intermediate servers are used or
not. The objective of our work is just to realize such kind of system.
The paper is organized as follows. The architecture of the peer-to-peer communication
system will be described in section 2. A real peer-to-peer system will be shown in
section 3. We will conclude the work and indicate future research topics in section 4.
2 System Architecture
How to find other users is a very interesting and challenging issue in pure peer-to-peer
applications. As we know, a social network exhibits a small-world phenomenon
(popularly known as six degrees of separation) [5, 6, 7]. It means any two individuals
in the network are likely to be connected through a short sequence of intermediate
acquaintances. Recent work has suggested that the phenomenon is pervasive in networks
arising in nature and technology. It indicates that through just five or six intermediaries,
you could possibly be linked to millions of others. Small-world phenomenon
provides a theoretic basis for the peer-to-peer communication system.
The peer-to-peer communication system is composed of nodes connected to the
Internet, where each node acts as both a server and a client of the whole system. In
this network, nodes may join the system at any time and may silently leave the system
without warning. So each connection among every two nodes is highly dynamic. Each
time when a node exits from the network, the failure of the current node must be detected
by all his directly connected nodes. At the same time, those routing tables that
use the node as a soft router to relay messages must be rebuilt according to the change.
Both of these processes should be done in a timely manner.
The query and search schemes of the system are designed based on small-world
phenomenon. A client sends request packets to his directly connected buddies, and his
directly connected buddies further forward these packets to their directly connected
buddies. Most probably after a few rounds of forwarding, an expected buddy can be
found.
An efficient routing scheme in the system ensures that users can also exchange
messages with indirectly connected buddies via soft routers. In addition to text information,
users can also exchange voice/video information via indirect connections. To
achieve this, we apply a very low bit rate audio/video codec, namely the portrait video
codec [8], in the system. The bit rate of portrait video is so small that it can even be
transmitted via an HTTP proxy. This guarantees that the communication can be completed
even between two users who are separated by a firewall. Beside this, flexible
meeting controls are also provided in the system. Some key components of the system
are described as follows.
2.1 The identification of a user
It is very easy for a server-based system to identify and manage users. Basically, the
user ID such as an email address and its corresponding password can be stored in a
server. Wherever a user logs on to the server, he can always be identified by his email
address and password. However, it is not so easy for a decentralized system to do this.
In our design, each user is identified by a universally unique identifier (UUID) which
is generated by the system. An algorithm guarantees that the UUID will not be duplicated
even if it is generated in different machines. When a user logs on to the system
for the first time, the user can either ask the system to generate a UUID for him if he is
a new user or imports a file to the system, which records his UUID, his personal information
and his buddy list information. Personal information mainly includes username,
Internet Locator Service (ILS) servers and the user’s ID in these ILS servers.
The user needs to input a password to decrypt the file before importing. Certainly, a
user can also export his information to a file and bring it to another machine. That
allows the user to use different machines to join the peer-to-peer network.
2.2 The joining of the peer-to-peer network
There are several methods to let a user join the peer-to-peer communication network.
(1) A user can input the IP address of a person who is already in the peer-to-peer network.
He will find that person if that person is online. The user then adds that person
to his buddy list. A request will automatically be sent to that person. If that person
accepts, the user is connected to the peer-to-peer network through that person. (2) A
user can also browse in an Internet Locator Service (ILS) server, which other persons
in the peer-to-peer communication network have also logged on to. (3) A user can also
find a person who also belongs to the peer-to-peer communication network through
instant messaging services such as MSN Messenger, AOL Instant Messaging, ICQ or
Yahoo Pager. The purpose of this method is to get another person’s IP address and
send a connection request to him.
If a user receives a request from another user for establishing a buddy relation, he
can either accept or reject the request. If the request is accepted, then the users’ UUID
and other personal information are exchanged. Each user is added to the other one’s
buddy list.
2.3 Query
Each time a user logs on to a peer-to-peer communication system, the system tries to
establish connections with the user’s buddies in the background. The system first uses
the recorded IP addresses of the user’s buddies to connect. For those buddies who use
local area network, this method usually works. However, for dialup network buddies,
since their IP addresses usually change, the method may fail. As a second method, the
system retrieves the recorded ILS server information of the user’s buddies and logs on
to these ILS servers. If the system finds that the buddies are in these ILS servers, then
their IP addresses are gotten. The system then connects these buddies with the new IP
addresses. If all the above methods fail, the system sends query packets to all connected
buddies. The connected buddies further send these query packets to their connected
buddies. If someone is reached, the routing information is sent back to the user
who initiated the query. The system then uses the newly acquired IP address to directly
connect to the person. If no one is reached, information will only be sent via the
acquired routing information in the future.
2.4 Search
The system allows users to search people by certain criteria such as first name, last
name, email address, etc. These items are sent to all connected buddies. The connected
buddies then return their buddies’ information if any to the source node who
sent the search packet and further forward the search packet to their connected buddies.
When a node receives a packet that contains the returned buddies’ information,
he first checks if he is the source who originated the search. If he is, he unpacks the
packet and retrieves the information in it. Otherwise, he forwards the packet to the
former node that sent the search packet to him.
In both query and search operations, we use p(u, t) to denote a packet. The symbol
u denotes the unique message identifier of a packet and the symbol t denotes time-tolive
value of the packet. Here is the transmission process of a packet: (1) The source
node sends p(u, t) to all his directly connected buddies respectively. (2) When a node
receives packet p(u, t), it first looks up in its received message table to see whether the
packet has been received previously. If true, the packet is discarded. Otherwise, the
node records the unique message identifier u of the packet in its received message
table and checks whether the node itself is one of the proper receivers. If true, it saves
the packet and processes. If the current node is the only node left, the packet is
dropped without forwarding. If there are still some other nodes that need to receive
this packet, the node checks whether t > 0. If true, the node forwards the message p(u,
t-1) to all its directly connected neighbors. Otherwise, the node discards the packet
without forwarding.
2.5 Application level routing
Routing is a process of sending data from a source node to a destination node through
a network path. There must be at least one other node to act as an intermediate in the
path. In the traditional routing strategy, the routing process contains two basic steps:
(1) searching a reachable path and (2) forwarding packets to the next router. Because
there may be several different paths from a given source node to a destination node, it
is necessary to find the optimal path. Step (1) is implemented by routing protocols.
Routing protocols must select some metrics to determine optimal routing paths and
routing information must be updated at certain time intervals.
The routing strategy of the peer-to-peer communication system differs from that of
the traditional routers. First, the routing protocol of the system is very simple. Every
node in the system acts as a soft router. Routing information is saved in each node
independently. No frequent routing information exchange is needed. Second, because
a node may leave the peer-to-peer network at any time, it is necessary for those nodes
that use the node as their soft routers to detect the departure and rebuild routing tables.
In detail, we record a routing item in a routing table in the format: (Sender, Receiver) -
(From, To), where Sender is the identifier of the node who sends the packet; Receiver
is the identifier of the node who receives the packet; From is the identifier of the node
who delivers the packet of the sender to the current node; and To is the identifier of
the node who delivers the packet to the receiver from the current node. Please note
routing paths are bidirectional. If either the From or To is detected to be down, all
routing paths that include the From or To are rebuilt.
Fig. 1. A meeting in the peer-to-peer communication system.
3 Implementation
As shown in Fig. 1, the main frame of the real peer-to-peer communication system
is the buddy list window. It displays the peer-to-peer buddies of the user and the MSN
Messenger buddies of the users. We may include AOL Instant Messaging, ICQ and
Yahoo pager buddies in the future. The main frame provides tools for users to manage
their buddy list, launch meetings that multiple people can attend, initialize local video
windows and configure personal and audio/video settings. If a user launches or attends
a meeting, he can then decide whether he listens to or watches each attendee, and
whether he allows each attendee to hear or see him. The control buttons are shown in
the left column of the meeting window. In the bottom of the meeting window, there is
a chat window. Each attendee can type in the chat window and send to all the other
attendees. If a user wants to only send text to a particular buddy, he can use an instant
messaging tool in the system. In the left column of the meeting window, the system
also allows users to invite their other buddies to attend an existing meeting.
4 Conclusions
We develop a peer-to-peer communication system. In this system, users are linked
through either direct computer to computer connections or indirect peer routing. Users
can be aware of each other’s presence and initiate or attend various multimedia meetings
at the same time. In each of these meetings, a user can control whether he listens
to or watches each attendee, and whether he allows each attendee to hear or see him.
The peer-to-peer routing and real-time voice/video function are the main features of
the system. In addition, the system can also utilize Internet Locator Service and instant
messaging services such as MSN Messenger to find buddies. Future research topics
would be how to optimize peer-to-peer routing, how to apply multicast technology to
multimedia meetings, and how to adaptively transmit audio/video in various bandwidth
conditions.
References
1. Andy Oram, Peer-to-Peer:Harnessing the Benefits of a Disruptive Technology, O'Reilly &
Associates, Inc., 2001
2. The Gnutella protocol specification, 2000. http://dss.clip2.com/gnutellaProtocolo4.pdf
3. Freenet, http://freenet.sourceforge.net/
4. Introduction to Groove, http://www.groove.net/pdf/ introducinggroove.pdf
5. Jon Kleinberg, “The Small-World Phenomenon: An Algorithmic Perspective”. Technical
Report, Cornell University Computer Science Department, October 1999
6. D. Watts and S. Strogatz “Collective dynamics of ‘small-world’ networks”. Nature,
393:440-442, June 1998.
7. Robert Matthews, “Six Degrees of Separation” New Scientist Dec 4th 1999.
8. Jiang Li, Gang Chen, Jizheng Xu, Yong Wang, Hanning Zhou, Keman Yu, King To Ng and
Heung-Yeung Shum, “Bi-level Video: Video Communications at Very Low Bit Rates”.
ACM Multimedia Conference 2001, Sep. 30 – Oct. 5, Ottawa, Ontario, Canada, pages 392-
400.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值