Cache Based Distributed Query Processing in Mobile Ad hoc Networks

: Problem statement: In the last few years, the evolution of the mobile networks leads to the query processing in mobile computing an impressive research area. The mobile computing technology needs to offer more and different innovative services as the number of users of the mobiles were increasing. In this regard, this study proposed a new algorithm which increased the performance of the query processing system in mobile computing. Approach: We employed different servers for different job processing. The buffer was maintained in the mobile node and the cache is maintained in the query server as well as mobile server. Prioritization was given to the queries based on different parameters like priority given by the user, required bandwidth. Results and Conclusion: The parameters considered for performance measure are query efficiency, delivery ratio and average power consumption and the results show that the proposed algorithm performs better than the existing systems. The query efficiency is increased by 13%, delivery ratio is increased by 26% and average power consumption is reduced by 35% on an average.


INTRODUCTION
A Mobile Ad hoc Network (MANET) is an autonomous system of mobile nodes connected by wireless links. Each node operates not only as an endsystem but also as a router to forward packets. The nodes are free to move about and organize themselves into a network. MANET does not require any fixed infrastructure such as base stations; therefore, it is an attractive networking option for connecting mobile devices quickly and spontaneously. Most existent protocols, applications and services for Mobile Ad Hoc Networks (MANETs) assume a cooperative and friendly network environment and do not accommodate security. Therefore, the number of attacks in this environment is more and we aim to address the problem of attacks on mobile nodes. Here we presented some popular methods used to detect attacks on mobile nodes (Andamuthu and Balasubramine, 2010;Arnold and Miller, 2007).
Millions of users around the world today regularly access several wireless devices like Personal digital assistants, cellular phones and laptop computers. Mobile devices or mobile computers and network of computers in conventional wired mode are the two aspects to be considered in the general environment of mobile computing. In the scenario of mobile database, the data base client is located in the mobile devices while the corresponding data base and the server are situated in the wired network of computers. Intense use of mobile devices for the purpose of voice and data transmission in modern times has prompted large scale focus and research in the field of networking and mobile communications.
Facilitating ubiquitous data access at any point of time to the user is the thrust area of all such researches. Critical restrictions like limitations in connectivity, undependable communication, low battery and memory, slow pace of processing, moderate storage and limited display size stand as challenges in data management to the mobile computing, in spite of its privileges and advantages. These factors require a precondition of adaptability of the mobile devices to the current available network environment. Location dependant accessing of data by the user when the devices are on the move to some location, is a prominent feature of the applications of mobile computing. The distributed query processing systems assume an 'always-on' situation in network, which can seriously be affected and modified by the intermittent connectivity. A fault in the present systems is the absence of network connectivity. At times, the instantaneous transmission of accumulated data available since the last upload, using the available connection may not be feasible. The undesirable possibility of inconsequential information taking priority over vital information cannot be ruled out. Data prioritization for transmission becomes essential for the mobile nodes for advantageous utilization of connectivity in the constraining context of restricted and uneven bandwidth. Connectivity of the nodes (servers) to MANET is not forever. The minimum requirement of the node to stay connected to the network is, it must have enough power to function and the ability to hear the transmission of one other node on the network at least. Network nodes (servers) can operate in one of the three power reduction modes designed namely, 'transmit', 'receive' and 'standby'. In 'transmit' mode more power is utilized for transmitting and receiving messages. 'Receive' mode allows data process and reception of messages while no processing, transmitting or receiving happen in CPU in 'standby' mode.
The whole geographical area is divided into cells. These cells are roughly circular in shape. At the center of each cell is a Base Station (BS), also referred to as a server, which communicates with the mobile devices in its cell area through the wireless channel. Each BS serves an area and those areas are connected via a wired network as referred to earlier (Saha and Chowdhury, 2007). When a mobile device moves from one cell to another it begins communicating with the new BS in the new cell. In a centralized mobile database the database resides in the central server or BS. A mobile user can get data from the server in two methods: pull-based and push-based. In a pull-based method there are two channels namely an uplink channel and a downlink channel, which is also called the pull channel. A mobile device sends the query to the server via the uplink channel and the query results come to the device via the downlink channel. The downlink channels are private to each mobile device. In a push-based method the server broadcasts the data on a broadcast channel and the mobile devices tune to that channel to retrieve their necessary information (Acharya et al., 1995). In this case the server has to periodically broadcast information to the clients. In a hybrid model, the push-based method is extended by using an uplink channel via which clients can send explicit requests (Acharya et al., 1997).
In this study, we propose the system with different servers for different job processing like one server for processing location based queries and another server for processing data queries. The queries are prioritized based on different parameters like the preference given by the user, size of the result to be transmitted, bandwidth requirement, time to transmit and finally time of request. The more important issue is the bandwidth is reused based on the reusability concept. The nodes in the system are distinguished as mobile node, mobile server and the query server. The parameters considered for performance evaluation are query efficiency, delivery ratio and average power consumption.
This paper is organized into sections as Materials and methods, proposed work, performance analysis, results, discussion and references.

MATERIALS AND METHODS
A method for secure query processing in mobile databases has been presented in (Saha and Chowdhury, 2007). Queries are sent to the server through point-topoint channels by the mobile devices. Computation of the superset of results of many such queries is made by the mobile database server for broadcasting through a channel of larger bandwidth. The mobile devices can retrieve the required information by tuning in to that channel. Senders of the queries can view the results of both their queries and those of others in the same group. The undesirable aspect in this is, malicious users have access to the results f the queries sent by some other users. Saha and Chowdhury (2007) proposal of a method is made that denies any user doing so even when the results of multiple queries are broadcasted through the same channel and are accessible to all users. Tabassum et al. (2010), the authors discussed the various challenges in distributed processing of location dependent continuous queries in a mobile environment by studying the different scenarios in which both the querying unit and the object being queried are in motion. The authors discussed a classification of different s categories of location dependent queries and various solutions to such complex queries. Caching techniques enable faster access to data, minimizing the huge network traffic created because of the processing of location dependent queries in a wireless environment. The query results are cached for a further reduction of the data transfer and reusability of the results. The thrust area in this is the methods of processing and application of such location dependent queries (Tabassum et al., 2010). The study presents and classifies various methods of processing of different location dependent queries and data management problems in evaluation of such queries.
A continuous query processing system for intermittently connected mobile networks that comprises of a delay-tolerant continuous query processor distributed across the mobile hosts has been proposed in (Andamuthu and Balasubramine, 2010). In addition, a mechanism for prioritizing query results has been designed that guarantees enhanced accuracy and reduced delay. The conventional continuous query processors send the results of continuous queries instantaneously over the network, whereas the query processor in (Andamuthu and Balasubramine, 2010) stores them in an output buffer. Hash based mining methods are useful in design of effective query models (Zubair Rahman et al., 2009) Arnold and Miller (2007) (Stojanovic et al., 2006;Tabassum et al., 2010;Zubair Rahman et al., 2009). Stojanovic et al. (2006) address the problem of processing continuous range queries over mobile objects, whose motion is constrained by a spatial network. The query range represents the user-selected area, the map window, the polygonal feature, or the area specified by the distance from a reference point of interest. In contrast to regular queries that are evaluated only once, a continuous query remains active over a period of time. A major challenge for this problem is how to provide efficient processing of continuous queries with respect of CPU time, I/O time and main memory utilization. Ku (2007) proposed two novel algorithms for processing k nearest neighbor queries and range queries on spatial networks with privacy protection. The main idea is to hide the exact mobile user location with a cloaked region. The cloaked region covers the query requester and at least K-1 other users based on the K-anonymity concept. The spatial queries are executed based on both the cloaked region and the underlying networks. Amato et al. (2007) proposed approach the WSN can be programmed using a query language (MW-SQL), which offers constructs, specialized for sensor networks. The query language is offered by a JDBC driver which is encapsulated within the OSGi framework.
System design: System model: In the proposed system, we have mobile nodes, mobile servers and centralized query servers. The whole geographical area is divided into cells and the cell shape is assumed to be hexagonal. Mobile nodes are the nodes that belong to a particular cell of the network. Mobile server is similar to the Base station of the cellular network. Mobile users directly communicate with the mobile servers. Query servers are similar to the MSC in the cellular network. Mobile servers directly communicate with query servers. Buffer is maintained in the mobile node. Mobile servers and query servers maintain the cache. The queries are classified as location based queries and data queries. Location based queries are the queries related to the location of the mobile node, about the traffic or about the information in the specified location to get the particular object. Data queries are the queries to retrieve some information from the mobile nodes.
Distributed query processing based on caching algorithm: When the mobile nodes require a piece of information, the query is sent to the mobile server which is in its same cell. The queries at that instant of time are prioritized based on the user specification. If some queries are given the same priority by the users, then they are sorted according to the time of request. Even then if some queries are equally prioritized, they are sorted based on the estimated bandwidth requirement which depends on the size of the result to be transmitted. Finally if any collision occurs in prioritization random method is used. After the queries are prioritized, queries are optimized and processed in the mobile server if possible. The queries can be processed in the mobile server if the required information is fully available in the server. Otherwise the query is forwarded to the query server based on the type of the query. If the query is location based, it is sent to location query server otherwise it is sent to the data query server. The query is processed by the corresponding query server and cached. The output is sent to the mobile server. The mobile server also caches this information and sends the output to the required mobile node. The importance of the cache here, data will be ready if similar queries occur. This improves the performance of the system to maximize the delivery rate. The queries also need not be sent to the query server one at a time. More number of queries can be sent at a time to the query server by the mobile server by maintaining the buffering system. This is again done based on the priority. If the query is highly prioritized, the processing takes place immediately otherwise it is buffered for a bit of time period. This process reduces the power consumption as the number of times to transmit and receive data will be reduced.
Distributed query processing based on caching algorithm: 1. Mobile node sends a query to mobile server 2. Mobile server categorize the query 3. Buffer the query based on the category 4. Is data (location based) buffer?
i. prioritize the queries in the buffer ii. If (can be processed in the mobile server?) then a) queries are processed b) cache the results c) broad cast the results iii. else a) queries are forwarded to the data (location) b) query b) server c) queries are processed d) cache the results e) sent to the mobile server f) Mobile server broadcasts the results Performance analysis: Experimental evaluation of our DQPC architecture through simulations is presented here. In order to test our protocol, The NS2 simulation software is used. NS2 is a general-purpose simulation tool that provides discrete event simulation of user defined networks. The network nodes were placed uniformly at random within a square of 1000 meters. We varied the average speed of the mobiles from 10, 20, …, 50 in order to study the impact of server mobility. The data broadcast size is varied from 1000, 2000… 5000. In all the experiments, we used the following evaluation criteria.

Simulation parameters:
Average power consumption The average power consumed by clients and the average power consumed by servers are calculated.
Query efficiency The data pull section will rely on the measurement of query efficiency. This is a measure of the percentage of data queries that get served during an entire simulation.
Delivery ratio which is the ratio of results received by the clients and the no. of queries sent.

RESULTS
In Fig 1, when the server load increases, the average power consumption for server decreases as less time is spent for transmitting. The results in Fig. 2 shows that the proposed algorithm DQPC performs better than the FDQP (Fault-tolerant distributed query processor) because of caching. Figure 3 shows that the performance of FDQP and DQPC increases as the system load or broadcast size increases and it also shows that the proposed algorithm DQPC increases the efficiency of the query processing when compared to the FDQP.
The delivery ratio of the client in FDQP is compared with delivery ratio of the mobile server as the role of client and mobile host server in FDQP is played by the mobile server in DQPC. The results in Fig. 4 show that the delivery ratio is increased with the proposed algorithm.

DISCUSSION
It can be observed from the Fig. 2 that the Avg. Power consumption decreases as the load increases. This is because of the caching property. As the number of accesses increases, the cache hits occur then the performance increases. So, the results are mostly dependent on the cache performance. The DQPC decreases the average power consumption by 35% when compared to the FDQP algorithm. Figure 3 shows that the proposed algorithm DQPC increases the query efficiency by 13% compared to the FDQP algorithm. The delivery ratio of the client in FDQP is compared with delivery ratio of the mobile server as the role of client and mobile host server in FDQP is played by the mobile server in DQPC and is shown that delivery ratio is increased by 26%.

CONCLUSION
An approach for detecting and analyzing various attacks on MANET has been studied and performance is analyzed. These attacks have been performed using My-Aodv agent in ns-2 simulator. This My-Aodv agent is used to introduce attacks in the network topology. The particular node dropping the packets, diverting the route and consuming more resources have been detected by the proposed system. Also, a recovery procedure is discussed for the MANET under various attacks. The recovery has been provided by finding the attacker node and isolating that particular node from the network topology. It was shown that the performance of the proposed system increases significantly by measuring packet drops for various attacks.
In the future enhancement, simulation can be performed for some complicated attacks. The attacks such as Denial Of Service (DOS) Man in the Middle could be performed using some security based cryptographic algorithms. Also as the future work, the recovery phase can be more concentrated. Recovery can be shown in the different way without isolation the attacker node, the action of attack can be reduced by using some sophisticated algorithmic techniques.
Also Mobile devices have less battery power and memory. In Addition the wireless environment is less secured, anyone can intercept the message and hence they require more security. The security of any system depends on its key management. If key is large, more secure. An Elliptic Curve Cryptography provides the same level of security for far less key sizes as compared to the traditional cryptosystems, but it is ideal for MANNET to provide security using ECC. An ECC approach reduces the node's limited resource utilization.