Abstract
Peer-to-peer (P2P) networks are a technology that makes two or more peers to communicate randomly in a network by using appropriate data and communication systems without the help of any central administration. P2P networks are very dynamic, where the peers join and leave the network freely. There are many issues in P2P networks, such as security, peers heterogeneity and the quality of coordination between peers. In this work, we have considered the latter and present a distributed event-based awareness approach for P2P groupware systems. We propose two Fuzzy-based Peer Coordination Quality Systems (FPCQS) for improving peer Awareness and Group Synchronization in mobile P2P networks according to four input parameters: Group Synchronization (GS), Peer Communication Cost (PCC), Peer Mobility (PM) and Time for Finishing the Required Task (TFRT). The output of our systems is Peer Coordination Quality (PCQ). We make a comparison study between FPCQS1 and FPCQS2. The simulation results show that when GS is increased, the PCQ is increased. But, by increasing PCC, the PCQ is decreased. When the PM is 50 units, the PCQ is the best. Considering the effect of TFRT parameter, we found that when TFRT is increased, the PCQ is decreased. Comparing the complexity, the FPCQS2 is more complex than FPCQS1. However, FPCQS2 considers also the TFRT, which makes the system more reliable.
Introduction
P2P technologies has been among most innovative technologies after Internet. P2P networks became widely adopted due to their wide ranging applications, such as: multimedia sharing, video/voice communications, data sharing [2,5,13,19,21]. In P2P networks, different from traditional client/server architectures, each node acts as a client and as a server requesting and providing data from/to other peers. Dynamic properties of peers bring heterogeneity to the network, which makes it challenging for peers to self organize.
In traditional client/server topologies, the performance of the network is affected by the number of clients requesting services from the server. However, in P2P networks peers organize and share bandwidth with each other so the overall performance of the network improves with the increase of the peers number. Also these type of networks will not be affected when faulted peers get disconnected. The decentralised, self-organising and fault tolerance nature of P2P systems, reduces the management cost [1].
The usefulness of P2P technologies on one hand has been shown for the development of stand alone applications. On the other hand, P2P technologies, paradigms and protocols have penetrated other large scale distributed systems such as Mobile Ad-hoc Networks (MANETs), Groupware systems, Mobile Systems to achieve efficient sharing, communication, coordination, replication, awareness and synchronization. In fact, for every new form of Internet-based distributed systems, P2P concepts and paradigms play an important role to enhance the efficiency and effectiveness of such systems or to enhance information sharing and online collaborative activities of groups of people. Mobile computing has many application domains. One important domain is that of mobile applications supporting collaborative work. In a collaborative work, the members of the team have to take decision or solve conflicts in project development and therefore members have to vote [25].
Awareness is an important characteristic in communication systems. It is the system’s property to notify the peers in the network for the changes that occur during the communication.
For groupware collaborative work new awareness systems have been proposed since the early days of Web technologies. These systems started to inform users in their workspace about changes that occur in the network. Recently, research has been using new standards such as P2P systems to achieve fully decentralized, ubiquitous groupware systems and awareness in these systems. In P2P systems, due to peer awareness and the ability to interact directly with other peers, group processes may be more efficient. Moreover, P2P networks are pervasive and ubiquitous in nature, thus enabling contextualized awareness.
The Fuzzy Logic (FL) is a unique approach that is able to simultaneously handle numerical data and linguistic knowledge. The FL works on the levels of possibilities of input to achieve the definite output. Fuzzy set theory and FL establish the specifics of the nonlinear mapping.
For a decision making system, one of the problems is to represent the vagueness and uncertainty that usually affects the data, which cannot be computed with traditional (crisp) mathematical models. This paradigm takes into consideration vagueness and uncertainty by means of fuzzy sets and simulates the decision process of an administrative tool based on the rule base. A basic fuzzy controller is composed of four components: a fuzzifier, a rule base, an inference engine and a defuzzifier.
Fuzzifier: The fuzzifier maps crisp numbers into fuzzy sets. It is needed in order to activate rules which are in terms of linguistic variables, which have fuzzy sets associated with them.
Rule Base: The inference rules, expressed in the form of IF-THEN rules, provide the necessary connection between the controller input and output fuzzy sets.
Inference Engine: The inference engine maps a given input set to a fuzzy set. It handles the way in which rules are combined just as humans use many different types of inferential procedures to understand things or to make decisions. There are many different FL inferential procedures.
Defuzzifier: Defuzzification is the process of transforming the result of the inference engine into a crisp output for further processing.
The fuzzy set theory uses the membership function to encode a preference among the possible interpretations of the corresponding label. A fuzzy set can be defined by examplification, ranking elements according to their typicality with respect to the concept underlying the fuzzy set [6–10,12,16–18,22,27,28].
In this paper, we propose a Fuzzy-based system to decide Peer Coordination Quality in P2P mobile system. We call the proposed system FPCQS. We implemented two Fuzzy-based systems: FPCQS1 and FPCQS2. For FPCQS1, we consider three parameters: Group Synchronization (GS), Peer Communication Cost (PCC) and Peer Mobility (PM) to decide the Peer Coordination Quality (PCQ). We also implement another FPCQS (FPCQS2) considering Time for Finishing the Required Task (TFRT) as a new parameter. We evaluated the proposed systems by simulations. It should be noted that the proposed systems can be applied in any P2P networks that can use the proposed parameters.
The structure of this paper is as follows. The scenarios of collaborative teamwork is introduced in Section 2. We introduce the group activity awareness model in Section 3. In Section 4, we introduce FL used for control. The proposed fuzzy-based systems are presented in Section 5. In Section 6, we discuss the simulation results. Finally, conclusions and future work are given in Section 7.

Super-peer P2P group network.
We analyse and describe in this section the main scenarios of collaborative groupwork for which P2P technologies can support efficient system design.
Collaborative teamwork and virtual campuses
Modern businesses have increased their work efficiency by adopting P2P approach for collaborative works via virtual teams. A good coordination and data sharing between peers in a groupwork is accomplished through a shared workspace environment. P2P networks can enable fully decentralized collaborative systems by efficiently supporting different forms of collaboration [11,24]. One such form is using P2P networks, with super-peer structure as shown in Fig. 1.
One of the most common application of P2P networks is virtual learning. Recently, it has become popular as it supports learners and engages students to develop applications for groupwork. To aid the need of students unable to attend real campuses, one way to support them is virtual learning approach. New projects such as PBL-Project Based Learning, SBL-Scenario Based Learning are developed to support online learning [23].
Virtual Campuses are becoming larger every day with the increase of students enrolled, so P2P networks are offering solutions for decentralizing virtual campuses which tend to get further centralized. The use of P2P libraries such as JXTA have been investigated to design P2P middleware for P2P e-Learning applications. Also, the use of P2P technologies in such setting is used for P2P video synchronization in a collaborative virtual environment [3]. Recently, virtual campuses are also introducing social networking among their students to enhance the learning activities through social support and scaffolding.
Mobile ad hoc networks (MANETs)
Mobile ad-hoc networks are self-configuring mobile devices connected wireless with each-other. They have a decentralized administration similar to P2P networks. All peers communicate with each-other to make a proper functioning network by forwarding on behalf of other peers/nodes in the network. P2P and MANETs share many characteristics such as decentralization and self-organization. Recently, new P2P applications which uses wireless communication and integrates mobile devices such as PDA and mobile phones is emerging. Several P2P-based protocols can be used for MANETs such as Mobile P2P Protocol (MPP), which is based on Dynamic Source Routing (DSR), JXTA protocols, and MANET Anonymous Peer-to-peer Communication Protocol (MAPCP), which serves as an efficient anonymous communication protocol for P2P applications over MANET [14,15,20].
Group activity awareness model
The awareness model that we consider supports group activities. We will describe the main building blocks of our model (see also [4,26] in the context of web-based groupware).
Activity awareness: Activity awareness is the awareness of information about the activities of peers. The objective of activity awareness is to provide information on the accomplishment of tasks progress, by both individuals and the group as a whole. Activity awareness should inform members to know about recent and past activities on the project’s work by the group. As part of activity awareness, we also consider information on group stocks such as documents and actions upon them (modifications, reading, uploads, downloads). Activity awareness being most important and most complex types of awareness, also supports group communication and coordination processes.
Process awareness: Process awareness targets the information flow of the project, providing individuals and the group with a partial view (what they are each doing individually) and a complete view (what they are doing as a group), thus enabling the identification of past, current and next states of the workflow in order to move the collaboration process forward.
Communication awareness: Another type of awareness considered in this work is that of communication awareness. We consider awareness information relating to message exchange, and synchronous and asynchronous discussion forums. The first is intended to support awareness of P2P communication (when some peer wants to establish a direct communication with another peer); the second is aimed at supporting awareness about chat room creation and lifetime (so that other peers can be aware of, and possibly eventually join, the chat room); the third refers to awareness of new messages posted at the discussion forum, replies, etc.
Availability awareness: Availability awareness is useful for provide individuals and the group with information on members’ and resources’ availability. The former is necessary for establishing synchronous collaboration either in P2P mode or (sub)group mode. The later is useful for supporting members’ tasks requiring available resources (e.g. a machine for running a software program). Groupware applications usually monitor availability of group members by simply looking at group workspaces. However, availability awareness encompasses not only knowing who is in the workspace at any given moment but also who is available when, via members’ profiles (which include also personal calendars) and information explicitly provided by members. In the case of resources, awareness is achieved via the schedules of resources. Thus, both explicit and implicit forms of gathering availability awareness information should be supported.
Application of fuzzy logic for control
The ability of fuzzy sets and possibility theory to model gradual properties or soft constraints whose satisfaction is matter of degree, as well as information pervaded with imprecision and uncertainty, makes them useful in a great variety of applications.
The most popular area of application is Fuzzy Control (FC), since the appearance, especially in Japan, of industrial applications in domestic appliances, process control, and automotive systems, among many other fields.
In the FC systems, expert knowledge is encoded in the form of fuzzy rules, which describe recommended actions for different classes of situations represented by fuzzy sets.
In fact, any kind of control law can be modeled by the FC methodology, provided that this law is expressible in terms of “if … then …” rules, just like in the case of expert systems. However, FL diverges from the standard expert system approach by providing an interpolation mechanism from several rules. In the contents of complex processes, it may turn out to be more practical to get knowledge from an expert operator than to calculate an optimal control, due to modeling costs or because a model is out of reach.
A concept that plays a central role in the application of FL is that of a linguistic variable. The linguistic variables may be viewed as a form of data compression. One linguistic variable may represent many numerical variables. It is suggestive to refer to this form of data compression as granulation [7].
Proposed fuzzy-based peer coordination quality systems
To complete a certain task in P2P mobile collaborative team work, peers often have to interact with unknown peers. Thus, it is important that group members must select reliable peers to interact.

P2P group-based model.
The P2P group-based model considered is that of a superpeer model. In this model, the P2P network is fragmented into several disjoint peergroups (see Fig. 2). The peers of each peergroup are connected to a single superpeer. There is frequent local communication between peers in a peergroup and less frequent global communication between superpeers.

Structure of FPCQS.

Membership functions of FPCQS.
The structure of FPCQS1 and FPCQS2 are shown in Fig. 3. The membership functions for FPCQS1 and FPCQS2 are shown in Fig. 4. The Fuzzy Rule Base (FRB) of FPCQS1 is shown in Table 1 and consists of 27 rules. For FPCQS2, we consider the TFRT as a new parameter together with three parameters to decide the PCQ. In Table 2, we show the FRB of FPCQS2, which consists of 81 rules.
FRB of FPCQS1
FRB of FPCQS2
As shown in Fig. 5, we use triangular and trapezoidal membership functions for FLC, because they are suitable for real-time operation. The
The input parameters are: TFRT, GS, PCC and PM, the output linguistic parameter is PCQ. The term sets of TFRT, GS, PCC and PM are defined respectively as:
The membership functions for input parameters of FLC are defined as:

Triangular and trapezoidal membership functions.
And the term set for the output PCQ is defined as:
The membership functions for the output parameter PCQ are defined as:
In this section, we present the simulation results for our proposed systems. In our systems, we decided the number of term sets by carrying out many simulations. These simulation results were carried out in MATLAB.
For FPCQS1, we show the relation of PCQ with GS, PCC and PM in Fig. 6. For the simulation, we consider the GS as a constant parameter. From the simulations results, we conclude that for

PCQ for different values of GS (FPCQS1).
The simulation results of FPCQS2 are shown in Fig. 7, Fig. 8 and Fig. 9. In Fig. 7, we show the relation between PCQ and TFRT, GS, PCC, PM. The PM is considered 10. We can see that in Fig. 7(a) for

PCQ for different values of PCC when the

PCQ for different values of PCC when the

PCQ for different values of PCC when the
Comparing Fig. 8(b) with Fig. 7(b) and also Fig. 8(b) with Fig. 9(b), we see that PCQ is decreased 15%, respectively. From these results we can see that when PM is 50 units, the PCQ is better.
In Fig. 7(a) when
In this paper, we proposed two fuzzy-based systems to decide the PCQ considering peer awareness and group synchronization. We took into consideration four parameters: GS, PCC, PM and TFRT. We evaluated the performance of proposed systems by computer simulations. The simulation results show that when GS is increased, the PCQ is increased. But, by increasing PCC, the PCQ is decreased. When the PM is 50 units, the PCQ is the best. Considering the effect of TFRT parameter, we found that when TFRT is increased, the PCQ is decreased. However, FPCQS2 considers also have the TFRT, which makes the system more reliable than FPCQS1.
In the future, we would like to make extensive simulations to evaluate the proposed systems and compare the performance with other conventional systems.
