Grds conferences icst and icbelsh (10)

30
A Caching Scheme for Nearest-Neighbor Queries in Mobile Database 1 Presented By : Sandi Winn Aye

description

This presentation was done in June 2014 by one of our participants in ICST and ICBELSH conferences.

Transcript of Grds conferences icst and icbelsh (10)

Page 1: Grds conferences icst and icbelsh (10)

A Caching Scheme for Nearest-Neighbor

Queries in Mobile Database

1

Presented By : Sandi Winn Aye

Page 2: Grds conferences icst and icbelsh (10)

Outline

Abstract

Objectives

Introduction

Proposed System

System Flow Chart

Server Side

Client Side

Implementation

Limitations of Proposed System

Conclusion

2

Page 3: Grds conferences icst and icbelsh (10)

Abstract

As the geographical position of a mobile user is becoming

more traceable, users need to pull data which are related to

their location.

It is strongly recommended to minimize number of

connections and volume of data transmission from the servers.

Caching data that are frequently accessed by mobile user in the

client side is an appropriate technique.

3

Page 4: Grds conferences icst and icbelsh (10)

Cont’d (Abstract)

Most of the existing location services providers give more than

one nearest-neighbour queries results.

In this system, a new caching scheme which is based on hybrid

and semantic caching is proposed.

In server side, the kd-tree partition method is used to answer

nearest-neighbor queries.

4

Page 5: Grds conferences icst and icbelsh (10)

Objectives

To get one only result nearest to the user current location

To reduce the cache size by using hybrid caching

To save the trips to the server by using semantic caching

To minimize the search space by using kd-tree partition method in the

server side

To get nearest neighbour result quickly and effectively by this partition

method

5

Page 6: Grds conferences icst and icbelsh (10)

Introduction

The advances in wireless and mobile computing allow a

mobile user to perform a wide range of application although

there are some limitations in non-mobile hard wired

computing environments.

Database applications are of special interest to us in mobile

computing environment.

Database model in wireless devices are different from regular

client-server database.

6

Page 7: Grds conferences icst and icbelsh (10)

Cont’d (Introduction)

There are many limitations such as frequent disconnection to

server, low power capabilities of these devices, etc. in the mobile

environment.

Caching some of data which are frequently accessed by the user

in the client cache is a suitable solution.

Resource-consuming caused by upstream queries and number of

trips made to the server can be reduced in this way.

7

Page 8: Grds conferences icst and icbelsh (10)

Proposed System

Taking the advantages of caching scheme, this system offers the

query result to the users based on their current location quickly.

Moreover, the connection and data transmission from the Database

server to the client can be reduced.

The proposed system consists of two sides: sever side and client

side.

As the pre-processing, the region for each data object is defined by

using adaptive-partition method in the server side.

8

Page 9: Grds conferences icst and icbelsh (10)

Cont’d (Proposed System)

In the client side, the hybrid caching is combined with

semantic caching.

The previous query answers are cached in the client system’s

cache according to the proposed caching’s policy.

If there is a suitable answer corresponding to the user’s query

in the client’s cache, this query can be answered from that

cache without connecting to the server.

9

Page 10: Grds conferences icst and icbelsh (10)

Flow Chart of Proposed System

User’s location and

Query?

Start

Is there query

cache?

Display Result

End

Cache’s

DB

Retrieving Data From

Client’ cache

Nearest Neighbor

data object

Processing in Server Server’s DB

Storing query result

in Cache’s DB

no

yes

Checking to Cache’s

DB for query result

result in client’s

Client

Side

Server

Side

10

Page 11: Grds conferences icst and icbelsh (10)

Server Side

In the server side, the search space is divided by using kd-

tree partition method.

It recursively partitions the search space into two

complementary subspace such that the number of objects

associated with the two subspaces is nearly the same.

The space is partitioned horizontally or vertically.

11

Page 12: Grds conferences icst and icbelsh (10)

Cont’d (Server Side)

Split the point set alternatingly by x-coordinate and by y-

coordinate.

split by x-coordinate: split by a vertical line that has half the points

left and half right.

split by y-coordinate: split by a horizontal line that has half the

points below and half above.

Each internal node stores the splitting node along x (or y).

12

Page 13: Grds conferences icst and icbelsh (10)

Cont’d (Server Side)

13

Page 14: Grds conferences icst and icbelsh (10)

Cont’d(Server Side)

Nearest-Neighbor Search

Starting with the root node, the algorithm moves down the tree

recursively.

(i.e. it goes right or left depending on whether the point is

greater or less than the current node in the split dimension).

Once the algorithm reaches a leaf node, it saves that node

point as the "current best“.

The algorithm unwinds the recursion of the tree, performing

the following steps at each node.

14

Page 15: Grds conferences icst and icbelsh (10)

Client Side

As there are limitations in the wireless environment, it is strongly

recommended to save the trip to the server.

Caching seems to be profitable in such situations.

Caching the previous nearest object in client system’s cache will be

applicable for the forthcoming queries.

15

Page 16: Grds conferences icst and icbelsh (10)

Cont’d (Client Side)

All previous nearest objects can’t be cached in client’s cache

because of limited size of the cache.

It needs to cache some of the objects that are frequently accessed

by database applications.

In the proposed caching scheme, there are two types of caching:

hybrid caching and semantic caching.

16

Page 17: Grds conferences icst and icbelsh (10)

Hybrid Caching

Hybrid caching is a mix of object caching and attribute

caching.

In object caching, it stores an object that is frequently

requested by the mobile user.

All attributes of this object are cached in the client side.

17

Page 18: Grds conferences icst and icbelsh (10)

Cont’d (Hybrid Caching)

This not only wastes the transmission bandwidth, but also

occupies storage for caching other more frequently

accessed attributes.

In the attribute caching, it cache attributes of this object

that is mostly accessed.

18

Page 19: Grds conferences icst and icbelsh (10)

Semantic Caching

The semantic description and results of previous query results are

stored in the mobile client cache.

By using semantic caching, a query can be partially answered from

the client cache if a query isn’t an exact match.

Then the original query is trimmed and the trimmed part is sent to

the server and processed there.

The amount of connection and data transmission to the server can

be reduced by processing queries according to this caching.

19

Page 20: Grds conferences icst and icbelsh (10)

Cont’d (Semantic Caching)

The semantic description contains object name, attribute set, the

location of client that is described by x, y coordinate as

<SO,SA,PX,PY>.

This semantic description is as shown in the table.

20

SO SA PX PY

hotel street 10 30

hotel street,tel 20 40

restaurant street 50 60

restaurant cuisine 70 80

hotel tel 55 66

Page 21: Grds conferences icst and icbelsh (10)

Cont’d (Semantic Caching)

By trimming queries, previous results in the client cache

can be partially used if the query is not an exact match.

The communication cost from client to server can be

reduced.

Only select and project queries can be applied.

21

Page 22: Grds conferences icst and icbelsh (10)

Implementation

There are possible conditions according to user current location.

• If a new query is totally answered from the client cache,

communication to the server is unnecessary.

• If a new query doesn’t exactly match the one from the client cache,

it needs to connect with the server.

• By using semantic caching, a query can be partially answered from

the client cache in above condition.

• The original query is trimmed and the trimmed part is sent to the

server and processed there.

22

Page 23: Grds conferences icst and icbelsh (10)

Cont’d(Implementation)

• The amount of data transmission to the server can be

reduced by processing queries according to this caching.

• Main advantage of semantic caching is that by trimming

queries, previous results in the client cache can be used if

the query is not an exact match.

• Moreover, the communication from client to server can

be reduced.

23

Page 24: Grds conferences icst and icbelsh (10)

Cont’d(Implementation)

The user can get her current location which is shown as latitude

and longitude from GPS.

There are seven services in this proposed system.

Moreover, there are some attributes related to each service.

Firstly, one service and some attributes which she wants to find

nearest one to her current location can be chosen.

After getting her location and choosing one service and its

attributes, the system checks the client’s cache base on her current

position to see whether the query answer is available.

If there is a suitable cache record corresponding to the location of

the user, the most appropriate answer is retrieved from the cache

and this answer can be returned to the mobile user quickly.

24

Page 25: Grds conferences icst and icbelsh (10)

Cont’d(Implementation)

25

Page 26: Grds conferences icst and icbelsh (10)

Cont’d(Implementation)

Otherwise, the current

location of the user and

query are transmitted to

the server.

The server finds one

nearest neighbor object

and its attributes

according to the user’s

current location and

sends back one nearest

neighbor object to the

user. 26

Page 27: Grds conferences icst and icbelsh (10)

Cont’d(Implementation)

• When data is sent by the client, only one nearest-neighbor

result is computed in the server as follows:

27

Page 28: Grds conferences icst and icbelsh (10)

Conclusion

In this system, the location-based application that

provides only one nearest neighbour based on user

current location has been proposed.

To overcome limitations in the mobile environment, this

system presents that data caching is a profitable solution.

A new caching scheme is proposed to find only one

nearest neighbour result and its related attributes based on

user current position.

28

Page 29: Grds conferences icst and icbelsh (10)

Cont’d (Conclusion)

Hybrid caching and semantic caching are used by the proposed

system for reducing wireless data transmission and cache size.

KD-tree partition index is used in the server side to answer

queries for finding the nearest services facilities based on

mobile client’s locations more accurately.

29

Page 30: Grds conferences icst and icbelsh (10)

30