An Algorithm for Prediction of Overhead Messages

0 downloads 0 Views 106KB Size Report
Abstract. Discrete math has countless applications in computer science. This paper also identifies another application in computer networks by developing the.
An Algorithm for Prediction of Overhead Messages in Client-Server Based Wireless Networks Azeem Irshad, Muddesar Iqbal, Amjad Ali, and Muhammad Shafiq University of Gujrat, Pakistan {irshadazeem,m.iqbal,amjad.ali,shafiq}@uog.edu.pk

Abstract. Discrete math has countless applications in computer science. This paper also identifies another application in computer networks by developing the possible sequences of interaction among nodes from different platforms. The mobile nodes scattered across the network need to communicate and exchange messages either directly or through servers. The more dynamic the mobile nodes, the more diffusion or high turnover of nodes leaving and entering different servers or platforms and hence, higher the overhead. This paper proposed an algorithm that indicates and predicts the overhead in different scenarios of grouping of nodes under different servers. On the basis of this prediction and information about the geographical distribution, the nodes can foresee and arrange for resources or the requisites for establishing communication sessions among nodes of different servers. Keywords: Discrete math, mobile nodes, Geographical distribution, Grouping, Servers.

1 Introduction This paper identifies an application of discrete math [12], [13], [14] in computer networks. This paper studies the impact of nodes dynamically joining or leaving the servers. This dynamism leads to switching among different combination of sequences or strings [1]. Every sequence has its own overhead. The switching might lead to an increased or decreased overhead sequence. We have proposed an algorithm that generates all sorts of sequences that might help the stakeholders to foresee the resources required. The numbers in a sequence lead to the output of interaction messages that will help the end users i.e., nodes to prepare for the exchange of maximum number of messages to cover the whole network. In networks there might be many servers operating and comprising some nodes under each of them. The nodes under a single server can be termed as a single group. For the proper functioning of the network the nodes need to be prepared for communication in terms of resources. Hence, the node might also want to know about the maximum number of interaction messages [5] for communication among the nodes of diverse groups. As the nodes might need to communicate and elicit information from the nodes of other groups of different servers. We assume that there B. Murgante et al. (Eds.): ICCSA 2011, Part IV, LNCS 6785, pp. 412–423, 2011. © Springer-Verlag Berlin Heidelberg 2011

An Algorithm for Prediction of Overhead Messages in Client-Server

413

is no need for communication among the nodes of a single server. As they already know about their own servers but they might be unknown about the nodes of other servers. For the nodes of a group, the server broadcasts its own information to all nodes frequently. Thus no interaction messages might be needed to place internally, however, they remain ignorant of other servers. Hence, the external messages are crucial and will be exchanged in this scenario among the nodes to reveal their identities and particulars about the origin of servers. These external messages are said to be interaction messages in the context of this paper. The nodes are generally mobile in the state of the art networks, the random entry and exit of nodes from groups leaves the strength of nodes in a group quite dynamic. If the node comes to know about the current or recent distribution of nodes among groups, it anticipates whether its possible interaction messages are going to increase or decrease with the time in the near future, and if so, then by how much amount. If we assume that for a specific short time period the geographic division can be predictable, the nodes can foresee overhead for such time period and can arrange the resources accordingly, like battery power or alternative energy resources etc., to maintain the communicating sessions. A group looses its identity if all of its nodes move to other groups; however, its server or docking station might remain there to serve. Any node in the future might be present in its domain and can join it anytime. Here we have shown the hierarchy of increasing or decreasing number of messages. Different sequence patterns might also lead to similar number of interaction messages. The sum of each pattern or sequence remains constant, as the number of nodes is assumed constant. The number of nodes entering the network is taken as a variable and the calculation overhead will increase with the increasing number of nodes and vice-versa. However, for a specific time period the strength of nodes will be assumed as constant. In that time period the nodes would be managing their resources according to a single calculated output of a sequence. The requirements for a node might be changed in another time period due to the change in the sequence. The provision of updated calculations to each node becomes a challenge with growing mobility on the part of nodes. In this paper different organized sequences are used from which the users come to know about how many messages would be required for the whole network. Different groups having varying strength of nodes represent the values of a sequence. If they know about the geographical division of nodes among different groups, they can calculate the overall number of interactions required to cover the whole network. It may also be calculated by the server and broadcasted in the network. So the burden of calculation can be put on the server and the nodes as well. It would be more optimal if the algorithms are applied on the server and the generated output is provided to the nodes. Some algorithms have been presented for generating sequences and analysis in the proposed model. The paper has been organized into three sections. The section 2 describes about the previous related work. The section 3 describes the proposed model. The section 4 concludes the findings.

414

A. Irshad et al.

2 Related Work The overhead analysis in the context of geographical distribution of nodes has not been found in the literature, as far as I researched. The literature review has been stated with reference to networks that can modeled in the frame of network servers. Such type of networks can be MANETs, Mesh based networks, persuasive networks, WIFI, WIMAX particularly based on hierarchical architecture. The MANETs [3] are mobile ad hoc networks and function in a peer-to-peer and decentralized manner. There might be several Group Representatives (GR) [2] under which the nodes may operate. For security reasons and optimal mobility management, the ad hoc networks cease to function purely on peer-2-peer and there must be some authority, be it local or external. There might be hierarchy of levels for GRs and Fixed Gateways in a MANET and can be called as servers. The nodes needs to authenticate themselves, belonging to different servers or establish communicating sessions, directly or indirectly through GRs. Being on different platforms, a relatively higher number of messages would be required to authenticate or establish communicating sessions. The MANETs lack the analysis of overhead for establishing the sessions among the nodes belonging to various groups. In WIFI 802.11 [6], different Access Points act as the key authority for handling the traffic among different nodes. These APs might be operating at different hierarchical levels. The first level APs could be having fixed infrastructure as a backbone. The second level APs could be wireless-based and mobile. The third level hierarchy will be having end user nodes. These APs might be called as servers in the context of our model. The WIFI networks are deficient in the analysis of overhead for the nodes belonging to various groups. Wireless Mesh Networks [4] consists of many stationary wireless routers that will act as multihop wireless backbone. The mobile clients route their messages through these wireless routers. Like MANETs these networks can also be randomly deployed. There might be many nodes operating under a single wireless router. The mobile clients can use any available wireless router to send their messages to IP backbone. WMN can support a number of online applications like gaming, conferencing, multimedia streaming and broadcasting. There might also be different servers in WMN acting as different groups for various nodes. Like the earlier two networks WMN networks also lack of overhead analysis with respect to inter-group node communication. The WIMAX networks [7], [10] provide the last mile access with the hotspot size of 48km. The nodes are scattered in the form of different groups under various servers in these networks. These networks also lack the overhead analysis when the nodes from different servers interact and try to establish communicating sessions. The Bluetooth [9] and Pervasive networks [11], though operate in the limited area, can also fall short of overhead analysis procedures for client-server applications.

3 Proposed Model In proposed model we assume that the nodes need to contact every other node belonging to a different server. The strength of nodes can be assumed as constant or

An Algorithm for Prediction of Overhead Messages in Client-Server

415

variable, it depends. We assume it here as variable. We also assume that the nodes place the messages to each node in other server’s domain to cover the whole network. The nodes do not contact nodes belonging to the same server using external messages. They use internal messages with light overhead for this and hence negligible. We have presented two algorithms for generating and analyzing sequences in this model. The first algorithm named as Sequencing_Algorithm_for_grouping_nodes is for the calculation of every possible sequence and on the basis of those sequences, the resulting interaction messages are generated through another algorithm named as Algorithm_MNPS. The latter algorithm takes every sequence as input and provides with the output of interaction messages. The administrator or master server can not only calculate all possible sequences to consider all options for its ease of operation but also calculate number of messages through Algorithm_MNPS for that sequence calculated in the previous algorithm. The patterns or sequences are organized in the order of increasing number of messages. An end user node might wish to know about the current sequence pattern, as there are several patterns, in order to analyze number of interactive messages, if the end node is computing those messages. However, in most cases the server is likely to compute them for less overhead. A resourceful server might predict the number of nodes and calculate the number of sequence and messages accordingly. Due to the random entry and exit of the nodes in network, the total number of nodes remains uncontrolled, which requires computing an absolutely different range of sequences and messages? This task lies with the server rather than end nodes. The hierarchical of order of sequences can be helpful for the administrator to control the number of overhead messages for the whole network. The overhead messages tend to rise if the nodes are increasing in the network and scattered as well among different groups. On the other hand, though it might also not serve the purpose, if all nodes get clustered in a single group. The mobility for the nodes is vital and in many sort of networks the nodes are highly dynamic and cannot be restricted to a single platform or server. The abnormal mobility factor also leads to dispersion of nodes and too much clustering factor restricts the functioning of network, so there must be a tradeoff. Different servers, geographically distributed serve as docking stations or platforms. The mobile nodes might join them while finding themselves in the domain of respective servers. A single master server might maintain the position of nodes and carry out the accounting of overheads. It might also furnish the information to other servers and the nodes come to know about the geographical distribution and physical topology of nodes this way. As far as algorithm has been concerned, we assume that no group members can interact themselves. However the members can only interact across the groups so the nodes can only interact if divided among various groups. Here, for groups having smaller number of nodes or members and hence large number of groups, the interactive messages for the network grows. The number of interactive messages across various groups tends to be smaller with the increasing number of nodes in a group and hence small number of groups. The size of a group increases at the cost of

416

A. Irshad et al.

reduction in the size of other group by one node/member/unit. The number of interaction messages for a network would be the most if each group comprises only a single member, while the least if there is a single group comprising all of the nodes. For the later scenario, the number of interactive messages can as less as zero. Table 1. All possible Sequences for total 10 nodes

S/#

Sequences

Total Interaction messages

1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42.

10………………………0 9 1………………..…….9 8 2…………………….16 8 1 1 …………..……...17 7 3.……………..……..21 7 2 1………………......23 7 1 1 1 ………………..24 6 4……………….……24 5 5……..………….…..25 6 3 1……………….….27 6 2 2 ………………….28 6 2 1 1………………...29 5 4 1……………..……29 6 1 1 1 1………..……..30 5 3 2…………………..31 5 3 1 1………….……..32 4 4 2…………………..32 4 4 1 1………………...33 4 3 3……………….….33 5 2 2 1………………...33 5 2 1 1 1………………34 5 1 1 1 1 1………….…35 4 3 2 1………………...35 4 2 2 2……………..….36 4 3 1 1 1…………..…..36 3 3 3 1…………….…..36 4 2 2 1 1……………....37 3 3 2 2………………...37 4 2 1 1 1 1………….…38 3 3 2 1 1……………....38 3 3 1 1 1 1………….....39 4 1 1 1 1 1 1…………..39 3 2 2 2 1…………..…..39 3 2 2 1 1 1………..…...40 2 2 2 2 2……………....40 3 2 1 1 1 1 1…………..41 2 2 2 2 1 1…………….41 3 1 1 1 1 1 1 1………...42 2 2 2 1 1 1 1…….…….42 2 2 1 1 1 1 1 1………...43 2 1 1 1 1 1 1 1 1………44 1 1 1 1 1 1 1 1 1 1….…45

An Algorithm for Prediction of Overhead Messages in Client-Server

417

The table 1 shows all sequences for the strength of nodes as 10 in the network. There are 42 numbers of sequences possible with this strength and hence 42 interaction messages. A sequence is composed of a number of groups. The number of values represents the number of groups. These values represent the number of nodes in each group. This range of sequences has been generated by applying algorithm as mentioned below. This is rather a description based approach of defining algorithm pseudocode. As our pseudocode is not the code based algorithm so we have not assumed any data structure like arrays or linked list and this algorithm just helps us display those sequences. The figure 1 shows the algorithm for sequencing of grouping nodes. This algorithm is self-descriptive form of pseudocode and is composed of 6 steps. The figure 1 shows the how the next sequence will be generated. We can generate the sequences by this algorithm and display them. However, the output of those sequences might not be in order. So we can also sort the sequences on the basis of output in the end so it depends upon the user’s requirement. It is already sorted to a large extent. Sorting is only required at few places. The communication can be maintained among different servers and they may exchange the status of distribution of nodes after a specific time period. At a time only one of the sequences would be enabled. The algorithm gives the complete and every possible range of the sequences within the given number of nodes. The final output messages can be computed at each server. The servers will broadcast the beacon signals and the nodes, if there, will respond to the beacon messages. This will enable the server to compute the number of nodes in its domain. This number will be reciprocated with other servers and all the servers can generate the overall picture of geographical distribution of nodes which will be communicated to nodes after all. There are possibilities that a node is not part of any of the group and is lying at a position with no signals or without any contact with the server. So the overall number of nodes in a network might change any time and we cannot fix a number. For a specific time period, the strength the strength of nodes will be assumed as constant. There should be a reasonable time period. As the greater time period will cease the server tables to be updated and show the right picture of nodes distribution in network. Smaller time period creates a lot of overhead, so it should be a trade off. The hierarchy of interaction messages shows that the number of these messages is somehow predictable. So the servers can predict that the total messages, will remain around at such and such figure, in case there occurs some change of a single node movement. If there is more dynamism then prediction might be difficult and in some cases might also prove wrong. On the basis of this prediction, the nodes can be notified to arrange or equip their resources in this proportion. There might be some other types of resources besides battery power. We, though, focus on battery power.

418

A. Irshad et al.

Sequencing_Algorithm_for_grouping_nodes { Step 1. Start checking the sequence shown at Eq (1) from right to left, if there is any value greater than 1 at any position, take it and note down its position. X1, X2, X3, X4,……….Xn

----- Eq (1)

In the sequence shown at Eq (1), say that position is X3. Step 2. Take the sum of all of the values from X3 up to Xn (inclusive of X3). Like Xs = X3 + X4 + X5 + ……….. + Xn

------Eq (2)

The sum of those values in that sequence is Xs as shown in Eq (2). Suppose the value at X3 is P. Now, how you would make the next sequence. Step 3. In the next sequence write the values of X1 and X2 as it is in the previous sequence. Step 4. Subtract a 1 from X3 of previous sequence and write the result Q, i.e., (Q = P – 1), in the position of X3 in the new sequence and subtract it from Xs. Xs = Xs – Q Step 5. Keep repeating this process, by writing Q repeatedly in the next positions and subtracting Q from Xs, till the Xs is greater than Q. If the resultant Xs is smaller than Q then write the remainder value in Xs at the respective position of the new sequence. Step 6. In the end the Xs comes to null value and the sequence becomes complete. The value at the position Xn might be the same Q or some other value less than Q as remainder (Xs – Q). } Consider the sequence No. 34 of table 1. 34.

3 2 2 1 1 1 X1 X2 X3 X4 X5 X6 P = 2 at position X3 While, Xn = X6 Xs = 2 + 1 + 1 + 1 =5 Q=2–1 Q=1

Fig. 1. Showing generation of next sequence

The table 2 shows all possible sequences with 6 nodes in the first group for all sequences, assuming 10 nodes in the network. The table 2 is a sub-part of table 1. The algorithm Sequencing_Algorithm_for_grouping_nodes generates the sequences in this manner. We can get all these sequences in increasing order by applying sorting algorithm on the output of Algorithm_MNPS. The table 1 has been displayed in the same manner.

An Algorithm for Prediction of Overhead Messages in Client-Server

419

Table 2. All Possible Sequences for total 10 nodes with 6 nodes in the first group

S/#

Sequences

Total Interaction messages

1. 2. 3. 4. 5.

6 4……………….……24 6 3 1……………….….27 6 2 2 ………………….28 6 2 1 1………………...29 6 1 1 1 1………..……..30

In the same manner, the table 3 shows the generation of all possible sequences for total 10 nodes with 5 nodes in the first group. This is also the sub-part of table 1. The figure 2 displays how the next sequence has been generated. A node switches its place from one group to another which impacts the distribution and hence the sequence gets disturbed. The algorithm would be run after a specific time period to generate the new sequence on the basis of this movement and finally the total number of output interaction messages will be calculated. The nodes after getting this calculated output may predict their future needs in terms of required resources. Table 3. All possible Sequences for total 10 nodes with 5 nodes in the first group

S/#

Sequences

Total Interaction messages

1. 2. 3. 4. 5. 6. 7.

5 5……..………….…..25 5 4 1……………..……29 5 3 2…………………..31 5 3 1 1………….……..32 5 2 2 1………………...33 5 2 1 1 1………………34 5 1 1 1 1 1………….…35

The table 4 shows all possible sequences for a total of 6 nodes to clear the conception about sequences. The figure 2 is also elaborated by taking table 4 as a reference. Table 4. All Possible Sequences for total 6 nodes

S/#

Sequences

Total Interaction messages

1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11.

6……..………….…..0 5 1……………..……5 4 2…………………..8 4 1 1………….……..9 3 3…………………..9 3 2 1………………..11 2 2 2…………….….12 3 1 1 1……………...12 2 2 1 1…………...…13 2 1 1 1 1……………14 1 1 1 1 1 1………….15

420

A. Irshad et al.

A B C D E

A B C D

F

E

5 15

4 28

A B C

A B C

A B C D

F

E

F

4 1 19

E D

E

3 39

F

E

F

3 2 1  11

Fig. 2. Showing generation of next sequence

The above algorithm generates the sequences while to calculate the maximum interaction messages or to calculate the cost for establishment of maximum number of sessions among the nodes, another algorithm will be required. The maximum number of interaction messages resulting from the output of sequences, are calculated by an algorithm known as Algorithm_MNPS given as under: INPUT: An Array A storing N node items. OUTPUT: Maximum Number of Possible communicating Sessions S among nodes belonging to different servers Algorithm_MNPS (A, N) { m = 0, M = 0 For i ← 0 to N - 1 { do M ← M + ( m * A [i] ) m ← ( m + A [i] ) }

In the above algorithm, an array ‘A’ shows the number of nodes under each server group. Let’s assume, the nodes in a network belong to three servers. The first server group contains 4; second server contains 5 and the third server as 3 numbers of nodes under them. Then the input to algorithm contains N=3 for three server groups and an array ‘A’ initialized with 3 values of 4, 5 and 3. The total number of interaction messages ‘M’ among the nodes of three server groups is 47 as produced by the Algorithm_MNPS at the end of 3rd iteration. We ignore the value of ‘m’ here. We

An Algorithm for Prediction of Overhead Messages in Client-Server

421

take the sequence no. 34 to calculate the maximum possible number of sessions as shown in figure 3. 34. 3

2

2

1

1

1

(3 * 2) + {(3 + 2) * 2} + {(3 + 2 + 2) * 1} + {(3 + 2 + 2 + 1) * 1} + {(3 + 2 + 2 + 1 + 1) * 1} = 6+10+7+8+9 = 40

Fig. 3. A sequence generating output of 40

The fig. 3 shows the conversion of sequence into the output of total interaction messages and it is for that sequence only. The figure 4 shows the degree of dispersion for 10 nodes. For 10 nodes, there are 45 interaction messages in the worst case. As the number of groups for a given number of nodes increases, the size of bars for range of messages shrink and the bars tend to position them in the upper right side of the graph relative to the lower left side bar. The figure 4 has been drawn on the basis of output messages as shown in table 1. The range of the first bar is from 9 to 25 for the network with 2 groups only. So the messages for such a group will be required as minimum as 9 and for the maximum as 25.

No. of Messages

20

15

10

5

0

1

2

3

4

5

6

No. of Groups

Fig. 4. Graph for Degree of dispersion for 10 nodes

For clarity, the figure 5 has been drawn to exhibit the degree of dispersion for 6 nodes. For 6 nodes, there are 15 interaction messages in the worst case as shown in table 4. The figure 5 is drawn similarly on the basis of the messages shown in table 4.

A. Irshad et al.

No. of Messages

422

15

10

5

0

1

2

3

4

5

6

No. of Groups

Fig. 5. Graph for Degree of dispersion for 6 nodes

The degree of dispersion for the nodes distribution in the network can be observed from these graphs that tend to rise with the increasing number of groups. The number of groups can be increased from new entry of nodes in the network, or it can also be increased for the constant number of nodes in the network but with high mobility or dynamism. So, the degree of dispersion can be observed in both cases of constant or unfixed number of nodes in the network. This proposed study can assist the users in better analyzing the overheads. Further we will find the applications of this algorithm in future.

4 Conclusion This paper signals an application of discrete math towards computer networks. The maximum possible sequences have been generated with the help of algorithm. We can manipulate these sequences to get to the number of total output messages, which can be achieved through another algorithm. In the light of the number of output messages either generated by the nodes or by the servers, the nodes can plan, efficiently utilize their existing resources and foresee the requisite resources that might be needed in the near future.

References [1] Irshad, A., Shafiq, M., Khurram, S., Gilani, S.M., Irshad, E., Asif, M.S.: An algorithm for strings generation for Regular Expression in a controlled manner. In: IEEE ICIIT, UCP Lhr, ISBN: 978-0-387-25282-7 [2] Irshad, E., Noshairwan, W., Irshad, A., Usman, M., Gilani, M.: Group Mobility in Mobile Ad hoc Networks. In: WWW/Internet, October 13-15, pp. 381–385. IADIS, Germany (2008), ISBN: 978-972-8924-68-3

An Algorithm for Prediction of Overhead Messages in Client-Server

423

[3] Buttyan, L., Hubaux, J.-P.: Stimulating Cooperation in Self-Organizing Mobile Ad Hoc Networks, Mobile Network Applications. Special issue on Mobile Ad Hoc Networks, vol. 8(5), pp. 579–592. Kluwer Academic Publishers, Dordrecht (2003) [4] Akyildiz, I.F., Wang, X., Wang, W.: Wireless Mesh Networks: A Survey. Computer Networks 47(4), 445–487 (2005) [5] Irshad, A., Noshairwan, W., Shafiq, M., Khurram, S., Usman, M., Irshad, E.: Security Enhancement in MANET Authentication by checking the CRL Status of Servers. In: DEC 2008, SERSC-IJAST, Korea, vol. 1, pp. 91–98. Springer, Heidelberg (2008) ISSN: 2005-4238 [6] The Wi-Fi Alliance. Website, http://www.wi-fi.org/ [7] TheWiMAX Forum, http://www.wimaxforum.org/home [8] IEEE 802.11 Standard Group Web Site, http://www.ieee802.org/11/ [9] IEEE 802.15 Standard Group Web Site, http://www.ieee802.org/15/ [10] IEEE 802.16 Standard Group Web Site, http://www.ieee802.org/16/ [11] Stajano, F.: Security for Ubiquitous Computing. John Wiley & Sons, Chichester (2002), ISBN 0470844930 [12] http://courses.csail.mit.edu/6.042/spring10/mcs.pdf [13] Rosen, K.H.: Discrete Mathematics and Its Applications, 6th edn. McGraw-Hill, New York, ISBN 0-07-288008-2, http://highered.mcgraw-hill.com/sites/0072880082/ information_center_view0/ [14] http://www.cs.princeton.edu/courses/archive/fall06/cos341/ handouts/mathcs.pdf

Suggest Documents