An Architecture For Video Surveillance Service Based On P2P and Cloud Computing

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

2012 9th International Conference on Ubiquitous Intelligence and Computing and 9th International Conference on Autonomic

and Trusted Computing

An Architecture for Video Surveillance Service based on P2P and Cloud Computing

Yu-Sheng Wu Yue-Shan Chang Tong-Ying Juang Jing-Shyang Yen


Dept. of CSIEĭġ Dept. of CSIE, Dept. of CSIE Criminal Investigation Bureau
National Taipei University , National Taipei University National Taipei University Taipei City, Taiwan
New Taipei City, Taiwan New Taipei City, Taiwan New Taipei City, Taiwan
t123t23@gmail.com ysc@mail.ntpu.edu.tw juang@mail.ntpu.edu.tw

Abstract- Video Surveillance Services is increasingly becoming dispatch. The communication of surveillance system is the
important part in daily live. For traditional distributed Video important problem. Currently, the SS is a distributed
Surveillance Services, each video catcher will store its
streaming data to server. It will create a great volume of data architecture, every client stores front-end device’s video
daily. The approach obviously incurs some problems in data into a centralized server [1]. Such scheme naturally has
keeping daily data into the data center (DC), such as limited its advantage on management and use. But, it also has some
bandwidth to DC, limited space of DC, overloading to DC, inferiority on other aspect, such as scalability, reliability,
reliability, scalability, and so on. In this paper, we propose a and efficiency.
novel architecture based on well-developed peer to peer
technology and emerging cloud computing for solving the For the scalability aspect, while the number of front-
issues. The architecture exploits inherent characteristics of P2P end device (FE) increasing, obviously, there are some
and Cloud computing to provide an economic, scalable, problems will be risen. For example, the required bandwidth
reliable and efficient approach to store video data. We present and access speed on the server side will be considerable
the architecture, components, its operation flow, and depict the increasing with positive proportional to the number of FE.
implementation issue in this paper. We believe that the
architecture can improve significantly issues. This will limit the number of FE in the system. For the
reliability aspect, the data center in the centralized server
Keywords- P2PCloud, Video Surveillance, P2P streaming, will be a critical component. Whole system cannot work
Hadoop, HDFS well crash while the data center crash. For the efficiency
problem, the data center is the bottleneck of the system
I. INTRODUCTION
while multiple clients currently access to the system.
Surveillance System (SS) is an important application Therefore, proposing an approach to solve the above
around our life environment. It is very useful to problems is an important issue.
governments and law enforcement to maintain social control,
recognize and monitor threats, and prevent/investigate
criminal activity. It may be applied to observation from a
distance by means of electronic equipment (such as CCTV
cameras), or interception of electronically transmitted
information. There are increasingly deployed in the recent
year.
SS have evolved to third generation [7ĭġ 8], which all
applied digital device and storing the video in the pure data
stream. They are converted and stored into digital and then
delivered over networks. At first, the surveillance system
adopted analog devices, such like CCT and closed-circuit
TV, to capture the continuous scene and transmitted the
video signal to other place. In the second generation, the Figure 1: Macro view of the proposed architecture
system begins to apply digital technologies to deal with
each video, such as automatic event detection and alarm. In this paper, we propose a novel architecture for
Nowadays, the SS can compass the video stream to save the surveillance system based on well-known peer to peer
bandwidth for applied the communication networks. technology and emerging cloud computing, as shown in
A video surveillance system is composed of three parts: Figure 2. The architecture we adopt Hadoop file system 1
front-end video capture device, the central control platform (that is similar to Google file system) design philosophy and
and user client. The front-end video contains the digital
video recorder and the control to deal with the video 1
http://hadoop.apache.org/

978-0-7695-4843-2/12 $26.00 © 2012 IEEE 661


DOI 10.1109/UIC-ATC.2012.43
Peer to Peer (P2P) architecture to solve the mentioned Ńį Surveillance System
problems. Due to the inherent characteristics of P2P and In the [14], authors presented a layered generic
Hadoop file system, the proposed can naturally solve the organizational suite for the development of Sensor
problems mentioned above. We present the architecture, Management Framework (SMF) based on the service-
components, its operation flow, and depict the oriented architecture. The sensor management system is
implementation issue in this paper. We believe that the studied from a layered perspective and the functional tasks
architecture can improve significantly issues. carried by the SMF are categorized into three categories;
The remainder of the paper is organized as follows. sensor management, network management, and system
Section 2 surveys related works, especially on Hadoop, management.
including its architecture and HDFS, and some surveillance In the [15], authors proposed a design of large scale
system related works. Section 3 describes the proposed video surveillance system client based on p2p streaming.
architecture, including Video Recording and Video Given the particularity of video surveillance, such as high
Monitoring, as well as explaining the operation flow. churn and the heterogeneity of user access network and
Section 4 describes its implement issues. Finally we give a delay-tolerant, authors also constructed the end-hosts into
brief concluding remarks and feature work in Section 6. mesh application layer topology and adopt pull-push mode
II. BACKGROUND AND RELATED WORK to deliver the data. Authors also designed the architecture of
PPClient and gave details of its components. Through
łį Hadoop simulation and real system test it shows it is feasibility.
The Apache Hadoop [3][4] is a framework that allows PPClient conquered traditional server/client mode, which
distributed processing for large data sets across clusters of needs large number of infrastructure to support tens of
computers using a simple programming model. Hadoop is thousands users. By using p2p streaming technology, users
built up by two important parts, Mapreduce and Hadoop act as consumers and at the same time they provide service
File System (HDFS) [5]. to other users. Then the system’s scalability is enhanced.
In the Hadoop File System (HDFS), it provides global In the [10], authors proposed an overlay network
access to files in the cluster and is implemented by two architecture by application layer multicast with load
kinds of node; the Name Node and the Data Node. The balancing scheme to effectively provide ubiquitous video
Name Node manages the all metadata of file system, while surveillance service. The proposed approach can provide
Data Node stores actual data. HDFS uses commodity Internet users with scalable and stable surveillance video
hardware to distribute the system loading with streaming, since the simulations and results demonstrate that
characteristics of fault tolerance scalability and our improved optimization of load balancing via both
expandability. In the HDFS, the NameNode is responsible averaging bandwidth and life time has better performance in
for maintaining the HDFS directory tree, and is a centralized overhead of control message, service disruption, and tree
service. The NameNode execute the base system operation, depth than the other optimization criterion.
just like renaming, opening, closing and others. NameNode In this paper, we apply the data placement concept of
also determines the mapping table for each block in the ʼnadoop file system to provide fault tolerant and efficient
DataNode. The DataNode directly accesses the file. It can video access and apply P2P technology to improve the
serve reading and writing requests from the client. scalability, reliability, robust, and server cost. Therefore,
HDFS is designed to maintain and store large file data. integrating both ʼnadoop concept and P2P technology can
In HDFS, each file will be split into one or more small solve many issues of surveillance system.
blocks, and those blocks are allowed to store in a set of
III. SYSTEM DESIGN
DataNodes [6]. That means it will store each file as a
sequence of blocks, which are expectedly split as the same This section will depict the design philosophy of the
size but not the last one. For the fault tolerance, each blocks proposed architecture and explain how it can solve the
of a file are replicated and by default, two backups of each problems mentioned in Section 1.
block are stored by different DataNodes in the same rack łį System Architecture
and a third one is stored on a DataNode in a different rack.
We exploit Hadoop concept to design our system. The
The NameNode decides the location of replication. The
proposed system has two kinds of node. One is Directory
placement chosen for replica is to improve the reliability
Node (DN) which is responsible for managing all FEs, but
and performance.
does not keep all video data. The whole system can have
multiple DNs. To simplify system architecture and its
explanation, we assume the system only has one DN and it
is deployed in administration department. The other is Peer
Node (PN) which is responsible for storing the video data

662
using P2P technology. In the Hadoop concept, a piece of proper S-PNs for a P-PN according to P2P
data generally has three replicas. Therefore, each FE’s video technology. It will search for S-PNs. Directory Node
data in the architecture can be stored into three PNs; one is Database is to keep the information of every peer
called Primary PN (P-PN) that of course is the node FE tied node.
up, and another two nodes are called Secondary PN (S-PN) • Primary Peer Node (P-PN): The Primary Peer Node
that are selected by DN using distributed hashing table gets video data from FE directly. Therefore, it consists
(DHT), as shown in Figure 2. In other words, the video data of an FE (Camera or CCD), persistent storage, and
of the FE in the P-PN is replicated to two S-PNs that are three extra components: Video Dispatcher, Replica
selected and managed by the DN. The three nodes naturally Manager and Authentication Module, respectively.
form a replication group (RG). Video Dispatcher is responsible for transmitting and
The concept of RG can be represented as Figure 2. The storing video data into its RG currently. In other
video data of a PN (P-PN) can be replicated to any two PNs words, The Video Dispatcher will store the caught
(S-PN). The two S-PNs are selected by the DN using P2P video into local storage and deliver it to two replicas
technology. (S-PNs). The operation is similar with the write
operation of Hadoop file system. The RM is to
communicate with the RM of DN and other PNs for
authentication and getting associated information of S-
PN. For example, it will get the location associated to
S-PN from the DN, and try to build communication
channel with them. AM stores all keys obtained from
DN and private information of its associated RGs.

Figure 2: Replication Group

Ńį Components and Functionality


As well known, a surveillance system can be divided
into two operation modes; one is Video Recording, and the
other mode is Video Monitoring. We depict the components Figure 3: System Architecture
and their functionality according to the two modes.
Video Recording is responsible for handling the video • Secondary Peer Node (S-PN): Undoubtedly, an S-PN
data storing. The architecture is shown in Figure 3. of a RG is also a P-PN of another RG. Therefore, all
• Directory Node (DN): The node provides the components and their functionality are identical to the
centralized directory services. It contains following P-PN excepting for the operation flows. We will
components: Authenticator Module (AM), Replica explain their operations in next subsection.
Manager (RM), Replica Scheduler (RS), and a DN Such design obviously can have following advantages.
Database for the directory of whole system. In the First, the scalability can be improved because the data
DN, a RM manages each PN and selects properly center is not a bottleneck yet. All video data of the system
replicas for each FE of PN through RS. Every PN can are stored into each PN and required bandwidth of data
directly communicate with Replica Manager of DN. center can be significantly reduced. Secondly, the reliability
The Authentication Module is responsible for can be enhanced due to replication mechanism used in the
checking the authentication of any PN as well as design (every video data is stored into a RG; one P-PN and
assigning authentication key to both P-PN and two S-PNs). While the P-PN or a replicated S-PN failed, the
associated S-PNs. The Replica Scheduler selects two DN can select another PN to take over the fail. Thirdly, the
cost of data center also can be reduced. Although it will also

663
increase the cost of individual PN, we think that is trivial The DN will check the states of all PNs to find available
comparing with expensive data center. Besides, the PNs for replicating video data. The peer node states contain
robustness of the system can be guaranteed because a PN peer node’s Replica state, its bandwidth, connection stability
failure will not affect the service of the system. and peer node group. If available PN can be found and the
The other operation mode- Video Monitoring, is number is enough, the DN will select suitable S-PN using
designed for client to retrieve video data. The operation can DHT function. And then the DN generates an authentication
be initiated by a client, namely Client Monitoring (CM), key and sends it to chosen S-PN for the request and for
who is assumed that is a special PN has the same future request messages from P-PN (PN of initiating the
components; Video Dispatcher, Replica Manager and request).
Authentication Module. These components can be run on Next, the DN replys the P-PN the node’s information
desktop or PC. While the CM wants to retrieve desired of S-PNs; so that the P-PN can create communication
video, it can retrieve from all replicas in parallel, which like channel to S-PNs according to the node’s information and
P2P approach or [12]. Such design can be more efficiently authentication key. Finally the P-PN can store video data to
retrieving video than from a centralized data center. local storage and deliver the to the S-PNs.
In summary, the proposed architecture can naturally In the design, we hope that the client can be any device
solve the problems mentioned in Section 1. and at any where. Therefore, a client need to get the
authentication key in each video monitoring request.
ńį Operation Flow
Following describes the steps of video monitoring, the
This section presents the operation flow for video details are shown as in Figure 5.
recording and monitoring. First the video recording is
presented and the details are shown in Figure 4.
In general, an activatied PN needs to register itself to DN
for future management. The registration message is sent by
RM to the RM of DN. The message includes some private
data about the node, such as Node ID, address, hardware
information, authentication key, and so on; and it will be
stored into AM of DN. While the registration is completed,
the DN will reply the registration back to the PN. The PN
can then send a request for find suitable S-PNs from DN for
delivering replicated video data.

Figure 5: Operation flow of video monitoring

While a client wants to access his/her own video data,


he/she can send a request with account and password to DN.
The DN will check its legality by inquiring AM for the
request. If the client is authorized, the DN first reply client
the request and then later send an authentication key for
access video data from RG. In the meantime, the RM of DN
will get the authentication key from AM and all states of the
PNs in the RG. After client receives the authentication key,
Figure 4: Operation Flow of Video Recording it can create communication channels with authentication
key to all nodes of the RG. If the request is authorized by all

664
nodes, he/she can get the desired video data from all nodes replicas. Therefore, we utilize this algorithm to select two S-
(three replicas) of the RG in parallel. Obviously, the design PNs for a certain P-PN.
can improve the performance of video access.
Of course, client can get equally video data size from
each replica. Due to the bandwidth variance of PNs, each
replica’s bandwidth may be difference. Therefore, we can
apply adaptive algorithm [12] to dynamically adjust video
data size form each replica according to some criteria, such
as bandwidth, connection stability, distance, and PN’s
computing capability etc.
IV. IMPLEMENTATION ISSUES
According to the design, we depict some
implementation issues in this section. In general, a PN node
can be implemented using an embedded system with
embedded Linux OS.
łį Peer Node State
Here, we present some information and states inside a
PN used for PN selection and video data access. The
information comprises of peer node state contains the
Unique ID, the peer node group, bandwidth, peer node’s
Figure 6: PN scheduling algorithm
replica state, authentication key and authorized state, as
follows: The algorithm of the Replica Scheduler can be found
• Unique ID (UID): Every PN has a unique ID in the in Figure 6. The algorithm firstly executes unFullPNList()
System, and they are recoded in the database of to get a PNList (PeerNode List) that maintains the registered
DN. PN which is available for replicating other video data in the
• Group ID (GID) of Peer Node: It is the ID of RG, system. And then sorts the list by executing
which identifies the group of replication. The Peer ReplicaStateSort() to sort the list according to the storage
Nodes have the same replica will be grouped in the space of PN. The part of the same storage space in the list,
same group; so that they have the same GID. If a we will sort again by executing BandwidthSort() according
PN has N replicas, it will maintain N GIDs for to the bandwidth of PN.
each group. In order to balance the load, we first try to find an S-
• Bandwidth: Each peer node may have different PN from the member of PNlist (PeerNode List). If we
bandwidth in different situation. It can be used for cannot find any PN to serve the replication, we then try the
calculating the transmitting size of video data next peer node in the list.
while client asks for his own video.
• Peer Node’s Replica State: The state indicates the TABLE 1: SYSTEM ANALYSIS
PN is available for replicating other PN’s video. If
“Yes”, it means that it has room for doing so.
• Authorized State: The peer node will store the
Authorized Key from DN. Each key is mapped to
a PN for further access, and it also recodes the
relationship with the peer node. DN will check this
state for the stability of connection between the
same replicas.
Ńį The PNs Scheduler in Video Recording According to the different design for the system, they
We utilize the same replication scheme with Hadoop- have different advantage. We compare the SMF [14],
like file system to store video data. When a PN registers PPClient [15], UVS [10] and our P2PCloud. SMF is hard to
itself into the DN, it will be grouped together with other PNs join new sensor node into the system, but it robustness is
(replicas) using our PN scheduling algorithm that provides a strong. PPClinet has higher scalability, but the video of each
lookup service which according to the Peer Node’s storage space Media Distribution Subsystem doesn’t make any replicas to
state and bandwidth. In the Hadoop, a file will have three avoid the error occur. UVS utilize UVSMON tree rotate

665
when the new node join or broken, but the system frequently [6] J. Shafer, S. Rixner, and A. L. Cox. “The Hadoop Distributed
revise is not good for robustness. The SMF and UVS are Filesystem: Balancing Portability and Performance”, In Proceedings
centralized storage, but PPClient and P2PCloud are of the 2010 IEEE International Symposium on Performance
distributed storage. P2PCloud has higher scalability, fault Analysis of Systems and Software (ISPASS’10), pp. 122–133, 2010.
tolerant and robustness, but lower bandwidth [7] Michael Bramberger, Andreas Doblander, Arnold Maier, Bernhard
Rinner, Helmut Schwabach, “Distributed Embedded Smart
V. CONCLUSION AND FUTURE WORK Cameras for Surveillance Applications”, Computer, vol. 39, no. 2,
In this paper, we have proposed an architecture for pp. 68-75, Feb. 2006.
video surveillance service by integrating P2P and hadoop- [8] L.F. Marcenaro et al.,“Distributed Architectures and Logical-Task
like file system technology. Adapting P2P is used for Decomposition in Multimedia Surveillance Systems,” Proc. IEEE,
connecting with each PN and storing video data to replicas. pp.1419-1440, Oct. 2001.
It can improve scalability, cost and efficiency, while [9] Y.Hongyun, H.Ruiming, C.Jun. “Design and Implementation of
Hadoop is to improve reliability and efficiency. We Large-scale Distributed Video Surveillance System”, the Third
presented the system design, components and their International Conference on Computer Science & Education
functionality, operation flows, and implementation issues. (ICCSE'2008), Kaifeng, China, May 20,2008.
According to our explanation and analysis, it is obviously [10] Chia-Hui Wang, Haw-Yun Shin, Wu-Hsiao Hsu. “Load-sharing
that such design can improve some issues; such as overlay network design for ubiquitous video surveillance services”,
scalability, reliability, robust, efficiency, and cost. International Conference on Ultra Modern Telecommunications &
In the future, we want to implement the system to
Workshops, 12-14 Oct. 2009, pp. 1-7.
various embedded platform; and turn and evaluate the
[11] Whitman, D. “The need and capability of a Surveillance Data
performance of the system.
Distribution System”, Integrated Communications, Navigation and
ACKNOWLEDGEMENT Surveillance Conference, 2009. ICNS '09, pp. 1 – 6, 13-15 May
2009.
This work was supported by the Nation Science Council
[12] Yue-Shan Chang, Guo-Jie Zou, Ching-lung Chang “RARS: A
of Republic of China under Grant No. NSC 100-2221-
Resource-Aware Replica Selection and co-allocation scheme for
E-305-013.
Mobile Grid,” International Journal of Ad Hoc and Ubiquitous
REFERENCE: Computing, Vol. 6, No. 2, 2010, pp. 99-113.
[13] P. Maymounkov and D. Mazieres, “Kademlia: A peer-to-peer
[1] H. Dias, J. Rocha, P. Silva, C. Leao, and L.P. Reis, “Distributed
information system based on the xor metric”, In Proceedings of
Surveillance System”, Proc. of the Portuguese Conf. on Artificial
IPTPS02, Cambridge, USA, Mar. 2002.
Intelligence, Covilha, Portugal, 5-8 Dec. 2005
[14] A.R. Hilal, A. Khamis, and O. Basir, ”A Service-Oriented
[2] X. Cao, Z. Wang, R. Hu, and J.Chen , “Distributed Video
Architecture Suite for Sensor Management in Distributed
Surveillance System Based on Overlay Network,” In Proc. IEEE
Surveillance Systems,“ 2011 International Conference on Computer
Future Generation Communication and Networking (FGCN’07),
and Management (CAMAN), 2011, pp. 1 – 6.
pp.368-373, 6-8 Dec. 2007
[3] Hadoop. http://hadoop.apache.org/, 2012.
[15] Xun Zhu, Hongtao Deng, Zheng Chen, Hongyun Yang “Design of
Large-Scale Video Surveillance System Based on P2P Streaming,”
[4] D. Borthakur. “The hadoop distributed file system: Architecture and
2011 3rd International Workshop on Intelligent Systems and
design”, Hadoop Project Website, 2007.
Applications (ISA), 28-29 May 2011, pp. 1 – 4.
[5] HDFS (hadoop distributed file system) architecture.
http://hadoop.apache.org/common/docs/r1.0.2/#HDFS, 2012.

666

You might also like