{'fraction_non_alphanumeric': 0.03934415434761136, 'fraction_numerical': 0.008626082375794292, 'mean_word_length': 4.18416111964499, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An Efficient Two-Tier Causal Protocol for Mobile Distributed Systems

Causal ordering is a useful tool for mobile distributed systems (MDS) to reduce the non-determinism induced by three main aspects: host mobility, asynchronous execution, and unpredictable communication delays. Several causal protocols for MDS exist. Most of them, in order to reduce the overhead and the computational cost over wireless channels and mobile hosts (MH), ensure causal ordering at and according to the causal view of the Base Stations. Nevertheless, these protocols introduce certain disadvantage, such as unnecessary inhibition at the delivery of messages. In this paper, we present an efficient causal protocol for groupware that satisfies the MDS's constraints, avoiding unnecessary inhibitions and ensuring the causal delivery based on the view of the MHs. One interesting aspect of our protocol is that it dynamically adapts the causal information attached to each message based on the number of messages with immediate dependency relation, and this is not directly proportional to the number of MHs.


Introduction
The deployment of mobile distributed systems (MDS), in conjunction with wireless communication technologies and Internet, enables portable computing devices (referred in this paper as mobile hosts), such as smart phones and personal digital assistants (PDAs), to communicate from anywhere and at anytime. The MDS deal with new characteristics and constraints such as host mobility implying changeable physical network connections, limited processing and storage capabilities in mobile hosts compared with desktop computers and limited bandwidth on wireless communication channels.
For mobile distributed systems, causal ordering algorithms are an essential tool to exchange information. The use of causal ordering provides built-in message synchronization and reduces the non-determinism induced by three main aspects: host mobility, asynchronous execution, and unpredictable communication delays. Causal ordering guarantees that actions, like requests or questions, are received before their corresponding reactions, results or responses. The concept of causal ordering has been of considerable interest in several domains, such as ubiquitous agents systems [1], context-aware systems [2] and multimedia synchronization protocols [3].
In this paper, we consider the problem of causal ordering message delivery among mobile hosts in the context of group communication. Recently, some protocols have been proposed to implement causal message ordering for mobile distributed systems [4], [5], [6], [7], [8], [9]. Nevertheless, most of these protocols, in order to reduce computational cost and communication loads on mobile hosts, ensure causal ordering at and according to the Base Stations (BSs). These methods give rise to two main problems. First, the causal order seen by the MHs (referenced in this paper as mobile causal view) greatly differs from the causal orders of messages in which they were originally sent. Secondly, these methods introduce unnecessary inhibition at the message delivery.
Other important aspect concerning the design of causal protocols for a MDS is mobility management. When a mobile host moves from a cell (source) to another cell (target), these protocols must continue to ensure the causal order of messages. To achieve this, they execute a handoff module. This module mainly consists on sending the main structures used between the source and target cells. However, most of them stop the sending of new messages among all mobile hosts during the execution of this procedure.
In this work, we propose a new protocol that ensures the causal ordering according to the causal view that the mobile hosts perceive in the MDS, avoiding the unnecessary inhibition at the message delivery, while maintaining a low overhead and computational cost. To achieve this, our causal protocol works at two communication levels according to the connection type: intra-base communication level and inter-base communication level. At the intra-base communication level (wireless connection), we only send as causal overhead timestamped per message, between a BS and the MHs, a structure of bits denoted by h(m). The h(m) is dynamically determined based on the immediate dependency relation, IDR [10]. In the best case, the size of h(m) is equal to 1 bit; and in the worst case, it is equal to n bits, (1#|h(m)|#n), where n is the number of MHs in the system. At the inter-base communication level (wired connection) the causal overhead H(m) sent per message between BSs is composed of entries of the form (p, t), which are message identifiers, where p is the mobile host identifier, and t is the logical local clock of mobile host p. The size of the causal overhead H(m) is also dynamically determined by the IDR (1#|H(m)|#n). On the other hand, we propose a handoff management process that is characterized by allowing an asynchronous transfer of the mobile hosts among the cells of the system. This handoff management process does not interrupt the communication at any moment. This paper is organized as follows. Section 2 presents the preliminaries (system model, background and definitions). The mobile causal protocol is provided in Section 3. In Section 4, we compare our protocol with the related works. Finally, conclusions are presented in Section 5.

The System Model
We consider that a MDS runs over a wireless network infrastructure, which consists of two kinds of entities: base stations (BSs) and mobile hosts (MHs). A BS communicates with mobile hosts through wireless communication channels. The geographic area covered by a BS is called a cell, and it is depicted in Figure 1. At any given time, a MH is assumed to be within the cell of at most one BS, which is called its local BS. A MH can communicate with other MHs and BSs only through its local BS.
The base stations are connected among themselves using wired channels. The BSs and the wired channels constitute the static network. We assume that the wired channels are reliable, with an arbitrary but finite amount of time to deliver messages. Due to system asynchrony and unpredictable communication delays, the messages on a MDS from MH to MH can arrive in a different order as they were sent. In a mobile distributed system, a mobile host can move from one BS to another. In this case, a handoff procedure is performed to transfer the communication responsibilities of a MH to the new BS.

Background and Definitions
Causal ordering delivery is based on the happened-before relation (HBR) defined by Lamport [11]. This relation establishes causal precedence dependencies over a set of events without using physical clocks. It is a partial order defined as follows: Definition 1. The causal relation ''R'' is the least partial order relation on a set of events satisfying the following properties: N If a and b are events belonging to the same process, and a was originated before b, then a?b.
N If a is the sent message of a process, and b is the reception of the same message in another process, then a?b.
N If a?b and b?c, then a?c.
By using Definition 1, we say that a pair of events is concurrently related ''ajjb'' only if : a?b _ b?a ð Þ . The precedence relation on messages denoted by m?m 0 is induced by the precedence relation of events send m ð Þ?send m 0 ð Þ. The Immediate Dependency Relation. The Immediate Dependency Relation (IDR) [10] is the transitive reduction of the HBR. We denote it by Q, and it is defined as follows:

Protocol composition
From a logical point of view, we consider that the entities of the MDS are structured into two main communication groups, one conformed by the base stations (GBS = {BS 1 , BS 2 ,…, BS s }), and the other integrated by mobile hosts (GMH = {p 1 , p 2 ,…, p n }), where s and n are the number of base stations and mobile hosts, respectively. The GMH is subdivided into subgroups (G l ); one for each BS (see Figure 2).
The BSs in the GBS and the mobile hosts in a G l communicate by reliable asynchronous message passing. We consider a finite set of messages M with mMM, identified by a tuple m = (p, t), where p is the sender mobile host, such that pMGMH and t is the logical clock for messages of p when m is sent. When we need to refer to a  specific process with its respective identifier, we write p i . The set of destinations of a message m is always a GMH.
In our work, the GBS carries out the causal delivery of messages according to the order in which messages were observed by the mobile hosts. To achieve this, each mobile host p uses a structure of bits W(p) in order to establish an immediate dependency relation (Definition 2) among messages. The content of W(p) is the only control information attached per message in the wireless channel (1#|W(p)|#n). Each bit in W(p) identifies a causal message m that has a potential IDR with the next message to be sent by p. The base stations keep the main structures of causal control information of the mobile distributed system, such as the vector clock VT introduced by Mattern [12]. Through the control information and the structure of bits h(m)rW(p) sent in the system, the base stations can determine the immediate dependency relation among the messages sent by MHs on different BSs.

Data Structures
Each mobile host p uses and stores the following data structures: N mes_received(p) is a counter, which is incremented each time a message is received by the mobile host p.
N mes_sent(p) is a counter, which is incremented each time a message is sent by the mobile host p.
N W(p) is a structure of bits. Each bit in W(p) identifies a message m in the causal past of p that has a potential IDR with the next message to be sent by p. The size of W(p) fluctuates between 1#|W(p)|#n.
Each base station BS uses and stores the following data structures: N CI(BS) is a control information structure. It is a set of entries (i, t, d, ip). The entry (i, t, d, ip) represents a message sent by the mobile host p i with logical local clock t = VT(BS)[i] and d = mes_sent(BS). Finally, ip is a Boolean variable. The BS sets ip to true when it detects that a recently message received has an immediately dependency relation with the message m = (i, t, d, ip). In Section protocol description we present a detailed description of how this procedure is carried out.
Message structures. The following message structures are used in the MDS by the mobile hosts and base stations (see Figure 3). N The messages sent in the wireless communication channels by mobile hosts to their base station are identified by m, and have the following form: m;(i, t, mes_received(p), data, h(m)), where the structures i, t, and mes_received(p) have been previously described and: # h(m) is a structure of bits. Each bit in h(m) identifies a message in the causal past of p i that has IDR with m.
N A message m sent among base stations BSs is denoted by bs(m), and it is composed by a quadruplets bs(m) ; (i, t, data, H(m)), where the structures i, t have been previously described and: # data is the content of the message, and # H(m) is composed of a set of elements (i, t), which represent messages that have an IDR with m.
N A message m received by a BS l from a mobile host pMG l and which has been resent by such BS l in its cell, consists of a quintuplet that we call intra(m) ; (i, t, data, h'(m)).
# h'(m) is a structure of bits. Each bit in h'(m) identifies a message in the causal past of p i that has an IDR with m and that the BS l has not ensured its causal delivery.
N A message bs(m) received by a BS l and which has been resent within its cell, consists of a quintuplet that we call inter(m) ; (i, t, data, h'(m)).

Specification of the MOKA Protocol
Structures and variables at mobile host p i are initialized as follows: Structures and variables at BS r are initialized as follows: Next, we present in Tables 1-4 our causal protocol for groupware which satisfies the MDS's constraints, avoiding unnecessary inhibitions and ensuring the causal delivery based on the view of the MHs.

Protocol Description
The main contribution of the present paper is to ensure causal ordering according to the causal view at the GMH. In this section, we focus on how our protocol performs that causal ordering at the wireless network level. A description of the causal ordering algorithm for the wired network i.e. the group of base stations level is presented in [10].
In this Section we will refer to Figure 4 in order to explain how our protocol ensures causal ordering. In this scenario, the group of mobile hosts is composed by GMH = {p 1 , p 2 , p 3 , p 4 } and the group of base stations is integrated by GBS = {BS 1 , BS 2 } where p 1 , p 2 M BS 1 and p 3 , p 4 M BS 2 . In order to show how our protocol ensures the causal order, we focus on the message m 5 sent by p 3 and its delivery to the mobile hosts at BS 1 .
Prior to the delivery of m 5 to BS 2 , the control information at  Tables 1-4; see Section specification of the Moka protocol. According to our algorithm, the delivery process is described as follows.
When message m 5 is received at BS 2, the FIFO delivery condition is verified (Line 3, 2). From our scenario, this condition is satisfied. Then the message m 5 is delivered to BS 2 and the VT(BS 2 ) vector is increased by one at the position p3, VT(BS 2 ) = (1, 1, 2, 1). Later on, the BS 2 sends message m 5 to BS 1 . This is done through the diffusion of message bs(m 5 ) by BS 2 .
The message bs(m 5 ) is constructed by BS 2 as follows. According to h(m 5 ) structure, there are two messages that immediately precede m 5 . In order to identify these messages, (Lines 3, 7-15), BS 2 determines if there are some elements in CI(BS 2 ) with d equal to variable mes_received(p 3 ) of m 5 . In this case, there is an element at CI(BS 2 ) related to p 2 with d = 4 (Line 3, 11). Afterwards, the variable mes_received(p 3 ) is decremented by one (Line 3, 13). In the next iteration of the algorithm, BS 2 found another element at CI(BS 2 ) with respect to p 4 with d = 3 (Line 3, 11). Therefore, the only control information attached to bs(m 5 ) in order to ensure a causal order relates to m 3 and m 4 , which are the only messages that have an immediate dependency relation with bs(m 5 ), see Figure 4. Hence, the message sent from BS 2 to BS 1 is bs(m 5 ) = (p 3 , 2, data, H(m 5 ) = ({p 2 ,1}, {p 4 ,1})) (Line 3, 17).
When message bs(m 5 ) is received at base station BS 1 , see Figure 4, The delivery of message inter(m 4 ) by mobile host p 1 is as follows, (Lines 2, 1-8). The mobile host p 1 updates W(p 1 ) with the attached information of message inter(m 4 ) (Lines 2, 6-8). The structure of bits after updating the data structures at p 1 is W(p 1 ) = 11. Afterwards, the variable mes_received(p 1 ) is increased by one, mes_received(p 1 ) = 4.
Finally, after the delivery of message bs(m 4 ) to mobile host p 1 , BS 1 verifies if message bs(m 5 ) satisfies the causal delivery condition (Line 4, 2). Now, message bs(m 5 ) satisfies the causal delivery condition, 1#VT(BS 1 )[p4] = 1, because of message m 4 has been received by mobile hosts within the cell covered by BS 1 . Therefore, the message bs(m 5 ) can be delivered causally. BS 1 must send the message bs(m 5 ) to its local mobile hosts. The message sent by BS 1 to local mobile hosts is inter(m 5 ) = (p3, 5, data, 11), (Line 4, 12). When message inter(m 5 ) is received by mobile host p 1 , (Lines 2, 1-8), its delivery is done in the same way as it was previously described for inter(m 4 ).

Handoff Management Process
When a mobile host p in a cell covered by BS r moves to a cell covered by BS s , the responsibility of maintaining its causal dependencies shifts from the base station BS r to BS s . In order to ensure a causal ordering of messages in a mobile distributed system, the handoff module described in this Section is executed. In our case, we send only a control message with causal information about p in order to ensure a causal ordering of messages at the group of mobile hosts (GMH). The steps carried out by the handoff management process are depicted in Figure 5.
Assume that a mobile host p located in the cell covered by the source base station BS r moves to a cell covered by the base station BS s (see Figure 5). The first step established by p is to send the message handoff_begin = (p, t, BSs, h(handoff_begin) = W(p)) to its BS r ( Figure 5). Upon receiving this message, BSr informs BSs and other base stations in the GBS that p is switching from base station BS r to BS s by sending the message handoff_transfer = (p, t, H(handoff_begin)), Table 3. Reception of message m = (i,t,mes_received(p i ),data,h(m)) and sending of intra(m) by a base station BS.  Table 4. Reception of message bs(m) ; (i, t, data, H(m)) and sending of inter(m) by a base station BS r , such that i 1 BS r . where H(handoff_begin) is the causal history of mobile host p, see Figure 5. The structure H(handoff_begin) contains the identifiers of the last messages received by p, when it was over the cell covered by BS r . In order to ensure the causal order, when the target BS s receives the message handoff_transfer = (p, t, H(handoff_begin), it verifies that this message satisfies the causal delivery condition. If the message satisfies the causal delivery condition, then it is delivered and BS s makes the registration of p as a new mobile host in its cell, see Figure 5. Otherwise, the message is delayed until the causal condition is satisfied. The ending of the handoff procedure is identified by the diffusion of message handoff_end(p) by BS s to the other base stations, see Figure 5. After this message, BSs takes care of maintaining the causal ordering of messages sent to p.
In our handoff management process, we attach causal information about p to message handoff_transfer sent by the BS r . This causal information is used by the target base station (BS s ) in order to determine if the mobile host served by BS s has received the messages observed by the mobile host p when it was over the cell covered by the source base station (BS r ). If the message handoff_transfer satisfies the causal delivery condition, the mobile host p can be registered by the target base station because the messages observed by p have been received by the mobile hosts served by BS s . Otherwise, the mobile host p cannot be registered by the target base station because the messages observed by mobile host p when it was in the source base station can be received again by it, violating the causal order.
In our case, we do not attach data structures, such as vector clock (VT(BS)), to the messages sent during the handoff management process in order to maintain the causal ordering. Instead, we attach to the messages the causal information that includes the messages with immediate dependency relation. This allows us to continue with the system execution without waiting for the handoff procedure to end. Therefore, the handoff management process that we propose is characterized by allowing an asynchronous transfer of the mobile hosts among the cells of the system. Moreover, this handoff management process does not interrupt the communication at any moment. Therefore, our handoff management process is asynchronous.

Correctness Proof
To show that our algorithm ensures the causal delivery (correctness), we provide a correctness proof. In order to do the proof as simple as possible, we focus on the novel part for the wireless channels, which is the information (bits) attached to the messages and the causal information stored at the base stations. We show that with this information we ensure the causal order.
Let two messages m k = (p i , a, event, h(m k )) and m l = (p j , b, event, h(m l )), where p i and p j are the sender mobile hosts of m k and m l , respectively, a and b are the sequential ordered logical clocks for messages of p i and p j when m k and m l are sent, respectively, and finally h(m k ) and h(m l ) are the structures of bits when the messages m k and m l are sent, respectively. N Proposition 1 shows that through the bits structure (h(m)) attached to sent messages and the causal information at the base stations, we ensure the causal order (theorem 1).
The proof is by contrapositive, we proof that bit k [ =h m l ð Þ[Am r such that m k ?m r ?m l ; thus, the message m k has not an immediate independency relation with message m l , see Section background and definitions. We assume that bit k [ =h m l ð Þ. Only two events can delete bit k of W(p j ) before sending m l (send(p j , m l )), these are: N By Lines 2, 6-7, bit k is removed from W(p j ) when the delivery of message m r is carried out with bit k [h m r ð Þ at p j (delivery(p j , m r )). Lemma 1 shows that in this casem k ?m r . Moreover, delivery p j ,m r À Á ?send p j ,m l À Á implies that m r ?m l and then m k ?m r ?m l . Therefore, m k does not directly precede message m l .
N By Line 1, 5, the sending of m r at p j empty W(p j ). In addition, the event of send( p j , m r ) takes place such that delivery p j ,m k À Á ?send p j ,m r À Á ?send p j ,m l À Á . Therefore, m k does not directly precede message m l .
If neither of these two events occur, we have that bit k [W p j À Á when the send(p j ,m l ) is carried out and by Line 1, 2, we have that bit k [h m l ð Þ.
Step 2: The proof is by contradiction. By lemma 1, we know that if bit k [h m l ð Þ then m k ?m l with p i ? p j . We suppose that there is a message m r such thatsend p i ,m k ð Þ?send p r ,m r ð Þ?send p j ,m l À Á , and in addition that m k ;m r . The proof considers two cases: p r ?p j and p r = p j .
N We consider the case where p r ?p j and the delivery m k causally precedes to m r (delivery p j ,m k À Á ?delivery p j ,m r À Á ) at p j . By the step 1, we know that bit k [h m r ð Þ. Hence, on the delivery m r (delivery(p j , m r )) at mobile host p j , bit k is deleted by Lines 2, 6-7. When performing the sending of m l (send(p j , m l )) and because of send p r ,m r ð Þ?send p j ,m l À Á [delivery p j ,m r À Á ?send p j ,m l À Á , thenbit k [ =W p j À Á and therefore, bit k [ =h m l ð Þ, which is a contradiction.
N In the case where p r = p j , we have that delivery p j ,m k À Á ?delivery p j ,m r À Á ?send p j ,m l À Á , because the sending of m r (send(p j, m r )) takes place, bit k is deleted from W(p j ) by Line 1, 5 (W p ð Þ/ ). Therefore, we have thatbit k [ =h m l ð Þ, which is a contradiction.
Finally, the following proposition shows that through the bits attached to the sent messages and the causal information stored at the base stations, we ensure the causal order in the mobile distributed system.

Discussion
We compare our protocol with the related work according to four aspects: message overhead sent over wireless/wired communication channels, storage overhead, unnecessary inhibition in the message delivery, and handoff complexity (see Table 5 and 6).

Message and storage overhead and unnecessary inhibition in the message delivery
In order to reduce the overhead sent over wireless communication channels, the protocols AV-2 [13], AV-3 [13], YHH [14], LH [5], and KHC [7], ensure causal ordering at and according to the Base Stations. However, these protocols give rise to two main problems. First, the causal order seen by the MHs greatly differ from the causal orders of messages in which they were originally sent. Secondly, they introduce unnecessary inhibition at the message delivery. This unnecessary inhibition is due to the serialization of messages at the BSs level, since a base station is unable to detect mutual concurrency between messages occurring at different MHs within a single cell.
The communication and storage overhead for these protocols is as follows. AV-1 attaches a matrix of size n Ã n to messages sent over the wired network. Therefore, the protocol AV-1 generates a constant communication overhead over the wired network of size c Ã n 2 bytes where c is the number of bytes used to represent an integer value and n is the number of mobile hosts; and in order to achieve the causal ordering AV-1 needs a storage overhead of size c Ã n Ã n 2 zn À Á À Á bytes. For the PRS, the communication overhead in the wired channel is dynamic having a worst case of size c Ã n 2 bytes. We note that, in this protocol, the updating process of the control structures considers the acknowledgement by the mobile hosts for each message received to its local base station which increases the delay in the communication. Moreover, the storage overhead of PRS in the worst case at base station is of size c Ã n 2 zn 3 zn Ã s À Á bytes where s is the number of base stations.
The work of Dependency Sequences attach per messages in the wired network an overhead of size c Ã s Ã e ð Þ bytes, where e is the length of the longest dependency sequence for a MH, see Table 5. In order to bound the size of e, Praskash and Singhal [4] propose periodically using global checkpoints; however the global checkpoint is an expensive operation. In addition, the storage overhead of DS at base station is of size c Ã n Ã s Ã e ð Þ ð Þbytes, see Table 5. Next, for Mobi_causal the overhead sent over the wired communication channels is equal to c Ã X s i~1 l i bytes, where l i represents the number of messages sent by BS i and for which the delivery is not yet confirmed. In the worst case, this number can be equal to n. Another drawback of Mobi_causal is the unbounded growth of control information stored (LastRcv) on each BS in order to achieve the causal ordering. The work of Hierarchical clocks only sends overhead over the wired communication channels of size c Ã sbytes; nevertheless, the identification of causal predecessors of an event involves the evaluation of a recurrence relation which imposes high communication and computation overheads. This protocol uses a hierarchical clock, Q, which is composed by a vector Q m and a bits vector Q i of a variable length, where the size of Q i is not bounded, see Table 5. The author as for the work of Dependency Where n = number of MHs, s = number of BSs, c is the number of bytes used to represent a integer value, b is the number of bits used to represent a byte, k is a predetermined integer parameter, e is the length of the longest dependency sequence for a MH, l i represents the number of messages sent by base station BS i and for which the delivery is not yet confirmed and LastRcv is a control information structure that stores identifiers of messages received by a MH. doi:10.1371/journal.pone.0059904.t005 Sequences proposes the use of global checkpoints in order to bound the size of the bits vectors. In our proposal, the MOKA protocol, the size of the control information over the wired network depends on the number of concurrent messages that immediately precede a message m. Since H(m) has only the most recent messages that precede a message m, the overhead per message in the MOKA protocol to ensure causal ordering is given by the cardinality of H(m), which can fluctuate between 0 and n. Therefore, the communication overhead in the wired channel is dynamic having a worst case of size c Ã 2nbytes. On the other hand, in our protocol, the control information attached to messages sent over the wireless network and stored at a mobile host is given by the cardinality of h(m), where h(m) is a structure of bits. Again, the size of h(m) depends on the number of concurrent messages that immediately precede to a message. Therefore, the communication overhead in the wireless channel is in the worst case of size n=b bytes, where b is the number of bits used to represent a byte.
On the other hand, in our protocol the storage overhead at MH is of size n=b bytes and at base station is in the worst case of size c Ã 2nbytes. We notice that in our protocol, as for the minimal causal algorithm in [10], the likelihood that the worst case will occur approaches zero as the number of participants in the group grows. This is because the likelihood that k concurrent messages occur decreases inversely proportional to the size of the communication group. This behavior has been shown in [10].

Handoff complexity
Handoff complexity indicates the amount of causal information exchanged between base stations during the handoff module execution [7], see Table 6. Here we only analyze the handoff module of the works that do not have unnecessary inhibition at the message delivery. The handoff complexity is determined by two aspects: 1) the number of sent messages between BS's and 2) the size of messages. Thus, AV-1 needs to send a message of size c Ã n 2 bytes when a MH moves to its new cell, see Table 6.
The handoff module proposed by the Dependency sequences, the Hierarchical clocks and the Mobi_causal needs a message of size c Ã s Ã e ð Þ, c Ã sand c Ã n bytes, respectively, where e is the length of longest dependency sequence for a MH, see Table 6. The main drawback of all these protocols is that during the handoff module execution, the other MHs cannot send messages until the handoff process concludes which inhibits the system execution and degrades the application performance.
Our protocol MOKA is the only asynchronous, and it only needs to send one message in the worst case of size c Ã n bytes. This is because the control message sent is ensured to be causally delivery along the causal messages of the MDS.

Conclusions
The MOKA protocol has been presented. This protocol ensures the causal ordering according to the causal view of the mobile host, eliminating the inhibition effect in the message delivery. The causal protocol presented satisfies the MDS requirements since at the mobile hosts a low computational cost is needed because only binary operations and simple sums are used. Moreover, low memory buffer is used since only a structure of bits is stored. In addition the MOKA protocol is efficient in the overhead attached per message at the wired and the wireless communication channels. The overhead sent per message is characterized by being dynamically adapted according to the behavior of the concurrent messages. Finally, the handoff management process presented is characterized by an asynchronous execution, which allows for the transfer of a MH from one cell to another without the need to suspend the sending or delivery of new causal messages.