final presentation

40
A new revolutionary software for EETAC’s students and teachers. This App comes with localization, routing mechanisms, social network and much more! EETAC App

Upload: didac-montero

Post on 26-Jun-2015

238 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Final presentation

A new revolutionary software for EETAC’s students and teachers.

This App comes with localization, routing mechanisms, social network and much more!

EETAC App

Page 2: Final presentation

Tab

le o

f C

on

ten

ts

1. Concept 2. How it works? Stories 3. Workflow

4. Entity-Relashionship 5. Technologies

6. Ericsson Maps 7. Security 8. Rest Client Pattern 9. Cache mechanism

10. Traffic Analisys

11. Summary & Conclusions

Introduction to the application and user experience

Diagrams with different aspects of the architecture of the application.

Most important technical aspects, explained in detail.

2

Page 3: Final presentation

Explaining what offers our App

3

Page 4: Final presentation

Β» Offers orientation service inside the campus, where the user can explore the buildings and find the best route to go to any room.

Β» Follows web 2.0 Users can enrich the App sending comments and P.O.I

Β» Userful tool designed for Eetac students and teachers but also for visitors which don’t know the campus.

Β» What is the difference with Foursquare and other similar apps? Indoor positioning and routing.

Concept 4

Page 5: Final presentation

Giving an example of how the App works

5

Page 6: Final presentation

Β» This Monday was about to start badly for Bob. Just landing from

London at 13:17 am, he could definitively not remember the

explications about how to reach the conference room. Luckily, he

downloaded EetacApp before leaving, following his colleague’s

advice. Within a few moments, the application gave him the

quickest way to the place.

Β» After the presentation of Urbanization in room V-212, the group

was very pleased to see their friends have already taken pictures

and upload them with the EETAC App, creating several threads

about the main debated issues. Now, other students can see the

gallery pictures and add some comments.

Story 6

Page 7: Final presentation

Explaining the Flow Diagram of the layouts of our App

7

Page 8: Final presentation

Flow Diagram for Authentication

Starting Point Login (general) Tw

itter lo

gin

Local re

gistration

8

Page 9: Final presentation

Flow Diagram for general use

Starting Point

Map

Explore Sites Site Site P.O.interest

Pro

file (eve

rywh

ere

)

ActionBar

9

Page 10: Final presentation

Understanding the Entity-Relationship diagram

10

Page 11: Final presentation

Entity-Relationship Diagram

6 entities

Β» Location: Where is the user

(dynamic)?

Where is a Site (static)?

Β» User: User information.

Β» Site: Site information.

Β» Check-in: Relates a User with

a Site (dynamic).

Β» Picture: P.O.I related with a

Site and a User.

Β» Comment: Comment related

with a Site and a User.

-id

-username

-password

-surname

-description

-email

-set<Checkin>

-set<Comment>

-set<Picture>

User

-id

-author

-route_image

-user

-date

-set<Comment>

Picture

-id

-name

-description

-num_checkins

-num_comments

-floor

-building

-checkin_id

-route_image

-set<Picture>

-set<Checkin>

Site

-id

-date

-site

-user

Check-in

-id

-text

-author

-date

-user

-picture

Comment

Location

1 0..*

10..*

0..*

1 1

1

0..*

1

0..* 1

Table: user_checkin

(user_id | checkin_id)

Table: site_checkin

(site_id | checkin_id)

1

0..*

1

0..*

Table: site_picture

(site_id | picture_id)

Table: user_picture

(user_id | picture_id)

Table: picture_comment

(picture_id | comment_id)

Table: user_comment

(user_id | comment_id)

11

Page 12: Final presentation

Citing all the Technologies used for the project

12

Page 13: Final presentation

Technologies Diagram

Indoor possitioning Show maps Route calc.

Database

We

b S

erv

er

Mo

bile

Ap

p

HTTP/JSON

TCP/IP

HT

TP/J

SON

OA

UTH

REST

13

Page 14: Final presentation

Explaining what the App do with Ericsson Maps API

14

Page 15: Final presentation

Β» Create maps using bulging plan and XML tags.

Ericsson Maps API 15

Β» Indoor localization and navigation using predefined routes, Wi-Fi Aps localization and XML tags as elevators or stairs.

Page 16: Final presentation

Β» Add information using over lays

Β» Room labels

Β» Finish flag

Β» Google Maps to Ericsson Indoor Maps by Zoom

Ericsson Maps API 16

Page 17: Final presentation

Adding Security to the App

17

Page 18: Final presentation

Β» Challenge Implemented (SHA)

Β» Unique token generation.

Β» Token expires in 30min.

Β» For registering purposes, HTTPS

should be used

Security for Authentication

GET /date

Eetac_challenge: 63fe6da0...

200 OK

date=”2020134…”

date=”yyyyMMddHHmmssSS”Eetac_challenge=63fe6da0...

Eetac_challenge=long ID

POST /user/login

Eetac_challenge: 63fe6da0…

user

token=password=hash(date +

hash(password))=42D11GP...

token=password=hash(date +

hash(password))200 OK or 403 FORBIDDEN

user_id=2

Eetac_token=token

GET /site

Eetac_token: 42D11GP...

If (server_token == client_token) return 200;

else return 403;

18

Page 19: Final presentation

Communicating with the server through a REST Client Pattern

19

Page 20: Final presentation

The operating system may shut down the process.

Β» The processor could be destroyed in the middle of an operation.

The UI is frozen by the Processor (not interactive).

No memory or Database storage == bandwidth waste.

Wrong REST Client Pattern 20

Page 21: Final presentation

Good REST Client Pattern 21

Page 22: Final presentation

Adding Cache mechanism to the App

22

Page 23: Final presentation

Β» Only image caching mechanism implemented

1. Download the image (write the outputstream of HTTP GET).

2. Save in the SSDcard (cache).

3. Save in memory (SoftReference HashMap)

Β» Before retrieving all data, retrieve a hashCode of it (no changes = no hashcode changes = no retrieving all data)

Β» Save each request in the Content Provider

Β» Good performance under 1MB of data on the Cursor Persistence == Requests == Battery consumtion

Cache 23

Page 24: Final presentation

Dimensioning our App, through a Traffic Analisys 10

24

Page 25: Final presentation

Traffic Analisys 25

OFF state

Get ALL Sites

User’s activity

Get Site Z

User’s activity on site Z

πœ‡0

πœ‡1 πœ‡2

πœ‡3

πœ‡4

𝛿4 𝛿2

𝛼1

𝛼2 𝛼3 𝛽1

𝛽3

Ξ“

Ξ³

Page 26: Final presentation

Β» Several equations can be gotten from this Markov chain.

Β» 𝑃𝑖 = 1 = 𝑃𝑂𝐹𝐹 + 𝑃𝑔𝑒𝑑𝐴𝐿𝐿 + π‘ƒπ‘ˆπ΄ + 𝑃𝑔𝑒𝑑𝑍 + π‘ƒπ‘ˆπ΄π‘π‘– πœ– π‘†π‘‘π‘Žπ‘‘π‘’π‘  𝑃𝑂𝐹𝐹 = πœ‡0 βˆ— 𝑃𝑂𝐹𝐹 + 𝛿2 βˆ— π‘ƒπ‘ˆπ΄ + 𝛿2 βˆ— π‘ƒπ‘ˆπ΄π‘

𝑃𝑔𝑒𝑑𝐴𝐿𝐿 = 𝛾 βˆ— 𝑃𝑂𝐹𝐹 + πœ‡1 βˆ— 𝑃𝑔𝑒𝑑𝐴𝐿𝐿 + 𝛽1 βˆ— π‘ƒπ‘ˆπ΄ + Ξ“ βˆ— π‘ƒπ‘ˆπ΄π‘ π‘ƒπ‘ˆπ΄ = 𝛼1 βˆ— 𝑃𝑔𝑒𝑑𝐴𝐿𝐿 + πœ‡2 βˆ— π‘ƒπ‘ˆπ΄

𝑃𝑔𝑒𝑑𝑍 = 𝛼2 βˆ— π‘ƒπ‘ˆπ΄ + πœ‡3 βˆ— 𝑃𝑔𝑒𝑑𝑍 + 𝛽3 βˆ— π‘ƒπ‘ˆπ΄π‘ π‘ƒπ‘ˆπ΄π‘ = 𝛼3 βˆ— 𝑃𝑔𝑒𝑑𝑍 + πœ‡4 βˆ— π‘ƒπ‘ˆπ΄π‘

6 equations, 19 unknown. Get experimental values to solve the problem. Discrete time analysis of a Markov Chain.

Traffic Analisys 26

Page 27: Final presentation

π‘ƒπ‘ˆπ΄π‘ =

𝛼31 βˆ’ πœ‡4

βˆ— 𝑃𝑔𝑒𝑑𝑍

𝑃𝑔𝑒𝑑𝑍 =

𝛼2

1 βˆ’ πœ‡3 βˆ’ 𝛽3 βˆ—π›Ό3

1 βˆ’ πœ‡4

βˆ— π‘ƒπ‘ˆπ΄ = 𝐴 βˆ— π‘ƒπ‘ˆπ΄

π‘ƒπ‘ˆπ΄ =𝛼1

1 βˆ’ πœ‡2βˆ— 𝑃𝑔𝑒𝑑𝐴𝐿𝐿

𝑃𝑔𝑒𝑑𝐴𝐿𝐿 βˆ— 1 βˆ’ πœ‡1 βˆ’π›Ό1

1 βˆ’ πœ‡2βˆ— 𝛽1 βˆ’ Ξ“ βˆ—

𝛼31 βˆ’ πœ‡4

βˆ— 𝐴 = 𝛾𝑃𝑂𝐹𝐹

𝑃𝑔𝑒𝑑𝐴𝐿𝐿 =𝛾

π΅βˆ— 𝑃𝑂𝐹𝐹

Traffic Analisys 27

Page 28: Final presentation

Traffic Analisys 28

What we know: β€’ Get All Size is a packet of

length: 3988 + 86 = 4074 bytes.

β€’ Minimum packet size for Get Site Z: 158 + 86 = 244 bytes.

β€’ Estimated velocity at server output: 1Mbyte/s getALL Transmission time

β‰ˆ 4ms <35ms get Z Transmission time

β‰ˆ0,25ms << 35ms β€’ Ping between mobile device

at the Eetac and the server:

70ms Latency for downlink β‰ˆ35ms.

β€’ Unitary discrete time = 10ms.

Page 29: Final presentation

Traffic Analisys 29

Page 30: Final presentation

Traffic Analisys 30

Page 31: Final presentation

Traffic Analisys 31

0

1000

2000

3000

4000

5000

1

10

19

28

37

46

55

64

73

82

91

10

0

10

9

11

8

12

7

13

6

14

5

15

4

16

3

17

2

18

1

19

0

19

9

JSON Packet size

Series1

Page 32: Final presentation

Traffic Analisys 32

State getALL User's activity getZ User's Activity

site Z

Time (ms) 39 18 116 35 23 291 + Time slot = 10ms

Probability to stay in one state and to leave it

Exhaustive Analysis of the logs: Get the probability to go toward each state.

π‘ƒπ‘ˆπ΄β†’π‘”π‘’π‘‘π΄πΏπΏ =221

π‘ƒπ‘ˆπ΄β†’π‘”π‘’π‘‘π‘ =14

21

π‘ƒπ‘ˆπ΄β†’π‘‚πΉπΉ = 521

π‘ƒπ‘ˆπ΄π‘β†’π‘”π‘’π‘‘π΄πΏπΏ =949

π‘ƒπ‘ˆπ΄π‘β†’π‘”π‘’π‘‘π‘ =33

49

π‘ƒπ‘ˆπ΄π‘β†’π‘‚πΉπΉ = 749

Page 33: Final presentation

Traffic Analisys 33

With this, we get all the transition probabilities, except Ξ³ and ΞΌ0.

From 19 to 7 unknowns: more hypothesis are needed Hypothesis: A session (ON) happens every 24 hours.

β€’ 24 hours <-> 8,64.10^7 ms Average Session Time = AST

𝐴𝑆𝑇 = 187450 +5

12βˆ— π‘ˆπ΄π‘‡π‘–π‘šπ‘’ +

7

12βˆ— π‘ˆπ΄π‘œπ‘ π‘ = 208 585 π‘šπ‘ 

𝑃𝑂𝐹𝐹 = 0,997586

β€’ Using 𝑇𝑂𝐹𝐹 , 𝛾 = 1,16 βˆ— 10βˆ’8 and πœ‡0 β‰ˆ 1

State getALL User's activity getZ User's Activity site Z OFF

Probability 8,790000E-08 4,000000E-05 5,130000E-08 1,050000E-04 9,975860E-01

Probability 0,00000879% 0,00400000% 0,00000513% 0,01050000% 99,75860000%

Page 34: Final presentation

Traffic Analisys 34

0

0,5

1

1,5

2

2,5

3

3,5

40 80 120 160 200 240 280 320 360 400 440 480 520 560 600

PDF Session

PDF Session

𝑃𝑂𝐹𝐹= 0,997586

𝑃𝑂𝑁 =0,002414

𝑃 𝑛 π‘ π‘–π‘šπ‘’π‘™π‘‘π‘Žπ‘›π‘’π‘œπ‘’π‘  π‘’π‘ π‘’π‘Ÿπ‘  = 𝑃𝑂𝑁𝑛 βˆ— 𝑃𝑂𝐹𝐹

π‘βˆ’π‘›

Page 35: Final presentation

Traffic Analisys 35

𝔼 π‘π‘Ÿπ‘œπ‘π‘Žπ‘π‘–π‘™π‘–π‘‘π‘¦ = 0, 000 089 then Number of user: 𝔼[𝑛] = 1,14629 π΅π‘Šπ‘›π‘’π‘’π‘‘π‘’π‘‘ = 1𝑀𝑏𝑦𝑑𝑒/𝑠 because 𝑃𝑂𝑁_π‘œπ‘› β‰ͺ 𝑃𝑂𝑁: support peaks.

Page 36: Final presentation

Explain the tasks done; the tasks to be performed and the conclusions

11 36

Page 37: Final presentation

Tasks Performed

Β» Show EETAC Map (Ericsson)

Β» Indoor Positioning (Ericsson)

Β» Route to a Site (Ericsson)

Β» Twitter Integration (OAuth)

Β» Server persistence (Postgree + Hibernate)

Β» REST client and Server communication (Spring and Jersey)

Β» GET/PUT images from/to the server

Β» GET/PUT/DELETE comments from/to the server

Β» PUT/DELETE checkin from/to the server

Tasks performed summary 37

Page 38: Final presentation

Tasks to be performed summary

Tasks to be Performed

Β» Interaction between users

Β» View users profile and comments

Β» Integration with Facebook

Β» Add dynamically a Site

Β» Improve the β€œGo to” guide

Β» Use more the Local Cache (Content Provider)

Β» Integration with Google Maps

38

Page 39: Final presentation

Conclusions

Indoor positioning & routing

Β» Bad precission because of the Aps power. Some brands offer

better precission with their own hard&soft.

Android (Client)

Β» Since the life cycle of an Activity is managed by Android; the

programmer should be careful.

Β» Limitted memory space also should be taken into account.

Β» Battery consumption should be taken into account.

Rest Client Server

Β» Difficulty to integrate Hibernate (learning curve).

39

Page 40: Final presentation

? Questions?

40