final presentation
TRANSCRIPT
A new revolutionary software for EETACβs students and teachers.
This App comes with localization, routing mechanisms, social network and much more!
EETAC App
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
Explaining what offers our App
3
Β» 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
Giving an example of how the App works
5
Β» 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
Explaining the Flow Diagram of the layouts of our App
7
Flow Diagram for Authentication
Starting Point Login (general) Tw
itter lo
gin
Local re
gistration
8
Flow Diagram for general use
Starting Point
Map
Explore Sites Site Site P.O.interest
Pro
file (eve
rywh
ere
)
ActionBar
9
Understanding the Entity-Relationship diagram
10
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
-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
Citing all the Technologies used for the project
12
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
Explaining what the App do with Ericsson Maps API
14
Β» 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.
Β» Add information using over lays
Β» Room labels
Β» Finish flag
Β» Google Maps to Ericsson Indoor Maps by Zoom
Ericsson Maps API 16
Adding Security to the App
17
Β» 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
Communicating with the server through a REST Client Pattern
19
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
Good REST Client Pattern 21
Adding Cache mechanism to the App
22
Β» 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
Dimensioning our App, through a Traffic Analisys 10
24
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
Ξ
Ξ³
Β» 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
πππ΄π =
πΌ31 β π4
β ππππ‘π
ππππ‘π =
πΌ2
1 β π3 β π½3 βπΌ3
1 β π4
β πππ΄ = π΄ β πππ΄
πππ΄ =πΌ1
1 β π2β ππππ‘π΄πΏπΏ
ππππ‘π΄πΏπΏ β 1 β π1 βπΌ1
1 β π2β π½1 β Ξ β
πΌ31 β π4
β π΄ = πΎπππΉπΉ
ππππ‘π΄πΏπΏ =πΎ
π΅β πππΉπΉ
Traffic Analisys 27
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.
Traffic Analisys 29
Traffic Analisys 30
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
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
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%
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
π π π πππ’ππ‘πππππ’π π’π πππ = ππππ β πππΉπΉ
πβπ
Traffic Analisys 35
πΌ ππππππππππ‘π¦ = 0, 000 089 then Number of user: πΌ[π] = 1,14629 π΅πππππππ = 1πππ¦π‘π/π because πππ_ππ βͺ πππ: support peaks.
Explain the tasks done; the tasks to be performed and the conclusions
11 36
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
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
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
? Questions?
40