/
3-Tiered Airport Lookup Service 3-Tiered Airport Lookup Service

3-Tiered Airport Lookup Service - PowerPoint Presentation

lois-ondreau
lois-ondreau . @lois-ondreau
Follow
342 views
Uploaded On 2019-06-23

3-Tiered Airport Lookup Service - PPT Presentation

Team members and contributions Jeffrey Wong xterase2001gmailcom Highlevel design parsing of places data Tilak Paija Pun paijapunseattleuedu Highlevel design design of IDLs and Makefile and implementation of PlacesLookup ID: 760110

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "3-Tiered Airport Lookup Service" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

3-Tiered Airport Lookup Service

Team members and contributions:

Jeffrey Wong (xterase2001@gmail.com)

High-level design, parsing of places data

Tilak Paija Pun (paijapun@seattleu.edu)

High-level design, design of IDLs and Makefile and implementation of PlacesLookup

Yan Yang (yangy2@seattleu.edu)

High-level design, parsing of airport data, and implementation of AirportSearch

Slide2

Topics of Presentation

Startup

3-Tier Design

Client

Place Server

Airport Server

What we learned

Future Work

Summary

Questions

Slide3

Server Startup

Read in files from text document

PlacesServer

AirportServer

Slide4

3-Tiered Design

Interaction between servers

client

place_server

airport_server

Slide5

Client Formatting

Sends a

struct

to

place_server

Contains City and State Abbreviation

Expects a

struct

returned from

place_server

Contains a

struct

with original query and associated latitude and longitude

Contains an array of

structs

with each

struct

containing the closest 5 airports relative to associated latitude and longitude

Slide6

Place Server Formatting

Receives query

struct

from

client

Creates a new query

struct

adds latitude and longitude in addition to the received query

struct

from client and forwards to

airport_server

Expects a

struct

from

airport_server

Extracts all

struct

data and creates a new

struct

to return to

client

all data received from

airport_server

Adds no new data, unless empty return

Slide7

Place Server Design

In-memory data structure to provide fast longitude and latitude lookup for a query

tuple

(“state code”, “place name prefix”)

Builds a map<

statecode

, sorted places> upon start-up

For a user query of state code and a prefix of place name, first do a lookup based on a state code with constant cost O(1) and

binary_search

O(m log n) for prefix match where m is the length of the input value

Slide8

Place Server Design Limitations

Lookup cost of O(m log n) may not be adequate for large dataset

Data not evenly partitioned, for example, Texas has over 1500 places while Rhode Island has less than 30.

Slide9

Challenges for airport server

Need to handle duplicated inputs in airport data

Design and implement efficient sort algorithm to return the nearest airports

Slide10

Airport Server Formatting

Expects a

struct

from

place_server

Contains City and State Abbreviation

Contains latitude and longitude of above city

Returns a

struct

to

place_server

Contains all data received from

place_server

Contains nearest 5 airports relative to latitude and longitude

Stored as an array of

structs

One

struct

for each airport

Slide11

Airport server design

Store airport data in memory for efficient closest airports search

Airport data storage:

map<string,

struct

AirportPos

>

Key: airport code

Value: airport physical information

Struct

AirportPos

{

double latitude;

double

longtitude

;

string city;

string state;};

Slide12

Airport search algorithm

Pseudo code

Procedure findNearest5

A[n] <- List of all airports and their distances to the given place

for (

i

= 0;

i

< 5;

i

++) {

for ( k = n – 1; k >

i

; k--) {

if A[k].distance < A[k-1].distance

swap (A[k], A[k-1])

}

}

Pseudo bubble sort to find the 5 nearest airports

O(n * 5)

It is more efficient than

quicksort

(

nlogn

)

Code design is very small relative to other search algorithms

Slide13

What we learned?

Further understanding of designing

Makefile

Further understanding of distributed system based on RPC

Implementing efficient lookup algorithms

Slide14

Future Work

Perhaps separate out the servers to work on remote systems, currently only works on same

localhost

Handle load balancing in case of multiple available servers that fulfill the request

Need better quality of service for handling remote server failure

Try another server

Retry

Slide15

Summary/Conclusion

3-Tier Airport Lookup service is possible with RPC

Search algorithm of data for each server is dependent on the data stored and purpose of the server

Data structure used is dependent on the type of data stored and the purpose of the data

Slide16

Questions?