Abstract
In this work, we present a distributed event-based awareness approach for P2P groupware systems. We present two fuzzy-based systems for improving peer Awareness and Group Synchronization according to four parameters: Activity Awareness (AA), Sustained Communication Time (SCT), Group Synchronization (GS) and Number of Failed Tasks (NFT). Then, we use fuzzy-based model to decide Peer Coordition Quality (PCQ).We call the proposed systems: FPCQS1 and FPCQS2. We make a comparison study between FPCQS1 and FPCQS2. From the simulations results, we conclude that with increasing of the NFT, the PCQ is decreased. When AA, GS and SCT are high, the PCQ is high. The proposed systems can choose reliable peers with good peer coordination quality in mobilePeerDroid mobile system. Comparing the complexity, the FPCQS2 is more complex than FPCQS1. However, FPCQS2 considers also the NFT, which makes the system more reliable.
Introduction
Peer to Peer technologies has been among most disruptive technologies after Internet. Indeed, the emergence of the P2P technologies changed drastically the concepts, paradigms and protocols of sharing and communication in large scale distributed systems. As pointed out since early 2000 years [2,6,15,20,22], the nature of the sharing and the direct communication among peers in the system, being these machines or people, makes possible to overcome the limitations of the flat communications through email, newsgroups and other forum-based communication forms [1]. Various consistency maintenance strategies of content sharing in pure peer-to-peer (P2P) networks have been researched recently. Meanwhile, the increasing size of resources and users in large-scale distributed systems has lead to a scalability problem. The self-organising, fault tolerance and decentralised nature of P2P technology, which helps to reduce the management cost of grid infrastructure, is a good basis for resolving both aforementioned problems [3]. However, the ones applied in hybrid P2P networks have not been investigated enough. In hybrid P2P networks, when an update of a content item happens on a peer, it is necessary to propagate the update to all the peers which have obsolete replicas of the same content item [26].
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, we are seeing how P2P concepts and paradigms again 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 [10]. We briefly introduce below some common application scenarios that can benefit from P2P communications.
Awareness is a key feature of groupware systems. In its simplest terms, awareness can be defined as the system’s ability to notify the members of a group of changes occurring in the group’s workspace. Awareness systems for online collaborative work have been proposed since in early stages of Web technology. Such proposals started by approaching workspace awareness, aiming to inform users about changes occurring in the shared workspace. More recently, research has focused on using new paradigms, such as P2P systems, to achieve fully decentralized, ubiquitous groupware systems and awareness in such systems. In P2P groupware systems group processes may be more efficient because peers can be aware of the status of other peers in the group, and can interact directly and share resources with peers in order to provide additional scaffolding or social support. Moreover, P2P systems are pervasive and ubiquitous in nature, thus enabling contextualized awareness.
Fuzzy Logic (FL) is the logic underlying modes of reasoning which are approximate rather then exact. The importance of FL derives from the fact that most modes of human reasoning and especially common sense reasoning are approximate in nature . FL uses linguistic variables to describe the control parameters. By using relatively simple linguistic expressions it is possible to describe and grasp very complex problems. A very important property of the linguistic variables is the capability of describing imprecise parameters.
The concept of a fuzzy set deals with the representation of classes whose boundaries are not determined. It uses a characteristic function, taking values usually in the interval [0, 1]. The fuzzy sets are used for representing linguistic labels. This can be viewed as expressing an uncertainty about the clear-cut meaning of the label. But important point is that the valuation set is supposed to be common to the various linguistic labels that are involved in the given problem.
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 [7,23].
In this paper, we propose a fuzzy-based system for MobilePeerDroid Mobile System (FPCQS1) considering three parameters: Activity Awareness (AA), Group Synchronization (GS), Sustained Communication Time (SCT) to decide the Peer Coordination Quality (PCQ). We also implement another FPCQS (FPCQS2) considering Number of Failed Tasks (NFT) 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 system that can use the proposed parameters.
The structure of this paper is as follows. In Section 2, we introduce the scenarios of collaborative teamwork. In Section 3, we introduce the group activity awareness model. In Section 4, we introduce FL used for control. In Section 5, we present the proposed fuzzy-based systems. In Section 6, we discuss the simulation results. Finally, conclusions and future work are given in Section 7.
Scenarios of collaborative teamwork
In this section, we describe and analyse some main scenarios of collaborative teamwork for which P2P technologies can support efficient system design.
Collaborative teamwork and virtual campuses
Collaborative work through virtual teams is a significant way of collaborating in modern businesses, online learning, etc. Collaboration in virtual teams requires efficient sharing of information (both data sharing among the group members as well as sharing of group processes) and efficient communication among members of the team. Additionally, coordination and interaction are crucial for accomplishing common tasks through a shared workspace environment. P2P systems can enable fully decentralized collaborative systems by efficiently supporting different forms of collaboration [13,25]. One such form is using P2P networks, with super-peer structure as show in Fig. 1.

Super-peer P2P group network.
During the last two decades, online learning has become very popular and there is a widespread of virtual campuses or combinations of face-to-face with semi-open teaching and learning. Virtual campuses are now looking at ways to effectively support learners, especially for online courses implemented as PBL-Project Based Learning or SBL Scenario Based Learning there is an increasing need to develop mobile applications that support these online groupwork learning paradigms [24]. In such setting, P2P technologies offer interesting solutions for (a) decentralizing the virtual campuses, which tend to grow and get further centralized with the increase of number of students enrolled, new degrees, and increase in academic activity; (b) in taking advantage of resources of students and developing volunteerbased computing systems as part of virtual campuses and (c) alleviating the communication burden for efficient collaborative teamwork. The use of P2P libraries such as JXTA have been investigated to design P2P middleware for P2P eLearning applications . Also, the use of P2P technologies in such setting is used for P2P video synchronization in a collaborative virtual environment [4]. Recently, virtual campuses are also introducing social networking among their students to enhance the learning activities through social support and scaffolding. Again the P2P solutions are sought in this context [11] in combination with social networking features to enhance especially the interaction among learners sharing similar objectives and interest or accomplishing a common project.
Mobile ad-hoc networks are among most interesting infrastructureless network of mobile devices connected by wireless having self-configuring properties. The lack of fixed infrastructure and of a centralized administration makes the building and operation in MANETs challenging. P2P networks and mobile ad hoc networks (MANETs) follow the same idea of creating a network without a central entity. All nodes (peers) must collaborate together to make possible the proper functioning of the network by forwarding information on behalf of others in the network [19,21]. P2P and MANETs share many key characteristics such as self-organization and decentralization due to the common nature of their distributed components. Both MANETs and P2P networks follow a P2P paradigm characterized by the lack of a central node or peer acting as a managing server, all participants having therefore to collaborate in order for the whole system to work. A key issue in both networks is the process of discovering the requested data or route efficiently in a decentralized manner. 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 [16,17].
Group activity awareness model
The awareness model considered here focuses on supporting group activities so to accomplish a common group project, although it can also be used in a broader scope of teamwork. The main building blocks of our model(see also [5,27] in the context of web-based groupware) are described below.
Activity awareness: Activity awareness refers to awareness information about the project-related activities of group members. Project-based work is one of the most common methods of group working. Activity awareness aims to provide information about progress on the accomplishment of tasks by both individuals and the group as a whole. It comprises knowing about actions taken by members of the group according to the project schedule, and synchronization of activities with the project schedule. Activity awareness should therefore enable members to know about recent and past actions on the project’s work by the group. As part of activity awareness, we also consider information on group artifacts such as documents and actions upon them (uploads, downloads, modifications, reading). Activity awareness is one of most important, and most complex, types of awareness. As well as the direct link to monitoring a group’s progress on the work relating to a project, it also supports group communication and coordination processes.
Process awareness: In project-based work, a project typically requires the enactment of a workflow. In such a case, the objective of the awareness is to track the state of the workflow and to inform users accordingly. We term this process awareness. The workflow is defined through a set of tasks and precedence relationships relating to their order of completion. 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 peer-to-peer 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 peer-to-peer 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.
FC
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.
Linguistic variables
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 [8].
The same effect can be achieved by conventional quantization, but in the case of quantization, the values are intervals, whereas in the case of granulation the values are overlapping fuzzy sets. The advantages of granulation over quantization are as follows:
it is more general; it mimics the way in which humans interpret linguistic values; the transition from one linguistic value to a contiguous linguistic value is gradual rather than abrupt, resulting in continuity and robustness.
FC rules
FC describes the algorithm for process control as a fuzzy relation between information about the conditions of the process to be controlled, x and y, and the output for the process z. The control algorithm is given in “if …then …” expression, such as: If x is small and y is big, then z is medium;
If x is big and y is medium, then z is big.
These rules are called FC rules. The “if” clause of the rules is called the antecedent and the “then” clause is called consequent. In general, variables x and y are called the input and z the output. The “small” and “big” are fuzzy values for x and y, and they are expressed by fuzzy sets.
Fuzzy controllers are constructed of groups of these FC rules, and when an actual input is given, the output is calculated by means of fuzzy inference.
Control knowledge base
There are two main tasks in designing the control knowledge base. First, a set of linguistic variables must be selected which describe the values of the main control parameters of the process. Both the input and output parameters must be linguistically defined in this stage using proper term sets. The selection of the level of granularity of a term set for an input variable or an output variable plays an important role in the smoothness of control. Second, a control knowledge base must be developed which uses the above linguistic description of the input and output parameters. Four methods [12,18,28,29] have been suggested for doing this:
expert’s experience and knowledge;
modelling the operator’s control action;
modelling a process;
self organization.
Among the above methods, the first one is the most widely used. In the modeling of the human expert operator’s knowledge, fuzzy rules of the form “If Error is small and Change-in-error is small then the Force is small” have been used in several studies [9,14]. This method is effective when expert human operators can express the heuristics or the knowledge that they use in controlling a process in terms of rules of the above form.
Defuzzification methods
The defuzzification operation produces a non-FC action that best represent the membership function of an inferred FC action. Several defuzzification methods have been suggested in literature. Among them, four methods which have been applied most often are:
Tsukamoto’s Defuzzification Method; The Center of Area (COA) Method; The Mean of Maximum (MOM) Method; Defuzzification when Output of Rules are Function of Their Inputs.
Proposed fuzzy-based peer coordination quality system
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.
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.

P2P group-based model.

Structure of FPCQS1.

Structure of FPCQS2.

Membership functions of FPCQS1.

Membership functions of FPCQS2.
The structure of FPCQS1 and FPCQS2 are shown in Fig. 3 and Fig. 4, respectively. The membership functions for FPCQS1 and FPCQS2 are shown in Fig. 5 and Fig. 6, respectively. The Fuzzy Rule Base (FRB) of FPCQS1 is shown in Table 1 and consists of 36 rules. For FPCQS2, we consider the NFT as a new parameter together with three parameters to decide the PCQ. In Table 2, we show the FRB of FPCQS2, which consists of 108 rules.
The input parameters are: AA, SCT, GS and NFT the output linguistic parameter is PCQ. The term sets of AA, SCT, GS and NFT are defined respectively as:
FRB of FPCQS1
FRB of FPCQS2
In this section, we present the simulation results for our proposed system. In our system, 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 AA, SCT, and GS in Fig. 7. For the simulation, we consider the GS as a constant parameter. From the simulations results, we conclude that with increasing of AA, SCT and GS, the PCQ is increasing. In Fig. 7(a), when

PCQ for different GS (FPCQS1).

PCQ for different GS when the

PCQ for different GS when the

PCQ for different GS when the
The simulation results of FPCQS2 are show in Fig. 8, Fig. 9 and Fig. 10. In Fig. 8, we show the relation between PCQ and AA, SCT, GS, NFT. The NFT is considered 10. We can see that in Fig. 8(a) for
In Fig. 9 are shown the simulation results for
In this paper, we proposed two fuzzy-based systems to decide the PCQ. We took into consideration four parameters: AA, GS, SCT and NFT. We evaluated the performance of proposed systems by computer simulations. From the simulations results, we conclude that with increasing of the NFT, the PCQ is decreased. When AA, GS and SCT are high, the PCQ is high. The proposed system can choose reliable peers with good peer coordination quality in mobilePeerDroid mobile system. Comparing the complexity, the FPCQS2 is more complex than FPCQS1. However, FPCQS2 considers also have the NFT, which makes the system more reliable.
In the future, we would like to make extensive simulations to evaluate the proposed systems and compare the performance with other conventional systems.
