CP4101 B.COMP DISSERTATION

advertisement
SPONTANEOUS SOCIAL-NETWORKING
ON SMARTPHONES USING
DELAY-TOLERANT NETWORKS
CP4101 B.COMP DISSERTATION (H101850 )
CHEN JUNCHENG
SUPERVISOR: PROF CHAN MUN CHOON
AGENDA
•
•
•
•
•
•
Motivation
Application Description
Challenges Faced (and Solutions)
Evaluation
Testing
Demo
2
RISE IN SMARTPHONE SALES
• Sale of smartphones has overtaken personal
computers in the year 2010
Source: International Data Corporation 3
RISE OF SOCIAL PROXIMITY APPS
• Applications where users discover others nearby
and interact with them
Application
Description
Downloads
Rating
Badoo
Chatting, dating, making
friends with people nearby
10m+
4.5
Skout
Discovering and meeting
new people around
10m+
4.1
Circle
Finding people nearby
with mutual interests
5m+
4.4
Sonar
Connect with friends and
like-minded people
nearby
1m+
4.1
As of: 2nd November 2013
4
Millions of dollars
RISE OF SOCIAL PROXIMITY APPS
Projected Growth:
$1.9 billion
Market for social proximity apps
5
SOCIAL PROXIMITY APPS
IMPLEMENTATION
• Location (typically GPS) data uploaded to a central
server
• Server determines who/what is nearby
• Client downloads the list of neighbors
• Client displays the neighbors to the user
6
PROBLEMS
• Battery consumption: Use of 3G + GPS is heavy on
battery
• Server-Reliance: Fails to function in absence of
internet connectivity
• Bandwidth consumption: 3G consume user’s data
bandwidth
• Network congestion: Cell towers are overloaded
with small packets in network
7
THE FLITBY APPLICATION
• Build a Facebook-like application that is server-less
• Works without internet connectivity
• Use peer-to-peer communication in order to
exchange social data
• Saves battery by eliminating 3G and GPS usage
• Vision: people flit by one another and
spontaneously sharing social data using the
application, therefore it is called Flitby
8
P2P COMMUNICATION
• Phone-to-phone communications such as WifiDirect and Bluetooth
• Proximity is inherent – if I can contact you, you must
be nearby
• Shortcoming: only support one-hop transfers which
is very limited
• Solution: Use Mobile Delay-Tolerant Network (DTN)
9
MOBILE DELAY-TOLERANT NETWORK
• Network of all mobile users
• Topology changes rapidly because of high user mobility
• Users exchange data when they are within range of
one another
• These connections are intermittent and short-lived in nature
• No direct paths may exist between any two nodes
• Messages are stored and forwarded opportunistically for
multi-hop communication
A
B
C
10
EXAMPLE OF HOW FLITBY WORKS
Functionality #2:
Guys! Free ice cream
sandwich
Functionality
#1:here
Propagate social
at the Ice Cream
Store!
Post a status
data
11
EXAMPLE OF HOW FLITBY WORKS
Functionality #4:
Functionality #5:
#3:
View status post
Oh my with
god! Really?
Log
encounters
Make
comments
associated
with
other
users
and
like
them!
encounter
12
CHALLENGE #1
• State Inconsistencies
• In a decentralized network, it takes time for social data to
propagate through the network
• Therefore, it is usually the case that clients have a subset of
the global state and this can be inconsistent.
• Merging of subsets during chance encounters can warp the
meaning of messages
13
CHALLENGE #1
Juncheng
Dora
Bill
Tom
Does anyone know if
there’s a lecture next
Monday?
Most recent first
J
D
B
T
14
CHALLENGE #1
Juncheng
Dora
Bill
Tom
Does anyone know if
there’s a lecture next
Monday?
J
D
B
T
15
CHALLENGE #1
Juncheng
Dora
Bill
Tom
Does anyone know if
there’s a lecture next
Monday?
Yes, there’s school on
Monday. Deepavali is
on Saturday.
J
D
B
T
16
CHALLENGE #1
Juncheng
Dora
Bill
Tom
Does anyone know if
there’s a lecture next
Monday?
Yes, there’s school on
Monday. Deepavali is
on Saturday.
Nope, it’s supposed to
be a public holiday in
lieu of Deepavali being
on Sunday
J
D
B
T
17
CHALLENGE #1
Juncheng
Dora
Bill
Tom
Does anyone know if
there’s a lecture next
Monday?
Yes, there’s school on
Monday. Deepavali is
on Saturday.
Nope, it’s supposed to
be a public holiday in
lieu of Deepavali being
on Sunday
I agree!
J
D
B
T
18
CHALLENGE #1
Juncheng
Dora
Bill
Tom
Does anyone know if
there’s a lecture next
Monday?
Yes, there’s school on
Monday. Deepavali is
on Saturday.
Nope, it’s supposed to
be a public holiday in
lieu of Deepavali being
on Sunday
I agree!
J
D
B
T
19
CHALLENGE #1
Juncheng
Dora
Bill
Tom
Does anyone know if
there’s a lecture next
Monday?
Yes, there’s school on
Monday. Deepavali is
on Saturday.
Nope, it’s supposed to
be a public holiday in
lieu of Deepavali being
on Sunday
I agree!
Uhm… So which is it?
J
D
B
T
20
CHALLENGE #1
Juncheng
Dora
Bill
Tom
Does anyone know if
there’s a lecture next
Monday?
Yes, there’s school on
Monday. Deepavali is
on Saturday.
Nope, it’s supposed to
be a public holiday in
lieu of Deepavali being
on Sunday
I agree!
Uhm… So which is it?
The problem is that we did not capture the context of the comments!
21
CHALLENGE #1
• Solution
• Present information in a coherent manner to the user
• Tapping on a particular comment should show the context in
which that comment was made
22
CHALLENGE #1
Juncheng
Dora
Bill
Tom
Does anyone know if
there’s a lecture next
Monday?
Yes, there’s school on
Monday. Deepavali is
on Saturday.
Nope, it’s supposed to
be a public holiday in
lieu of Deepavali being
on Sunday
I agree!
Uhm… So which is it?
23
CHALLENGE #1
Juncheng
Dora
Bill
Tom
Does anyone know if
there’s a lecture next
Monday?
Yes, there’s school on
Monday. Deepavali is
on Saturday.
Nope, it’s supposed to
be a public holiday in
lieu of Deepavali being
on Sunday
I agree!
Uhm… So which is it?
24
CHALLENGE #1
Juncheng
Dora
Bill
Tom
Does anyone know if
there’s a lecture next
Monday?
Yes, there’s school on
Monday. Deepavali is
on Saturday.
Nope, it’s supposed to
be a public holiday in
lieu of Deepavali being
on Sunday
I agree!
Uhm… So which is it?
25
CHALLENGE #1
Juncheng
Dora
Bill
Tom
Does anyone know if
there’s a lecture next
Monday?
Yes, there’s school on
Monday. Deepavali is
on Saturday.
Nope, it’s supposed to
be a public holiday in
lieu of Deepavali being
on Sunday
I agree!
Uhm… So which is it?
26
CHALLENGE #2
• Communication Challenges
• Exchange of information relies upon often brief contacts
with other users
• Not enough time to exchange all data
• Social network data is monotonically increasing
• Infeasible to exchange all data with users
27
CHALLENGE #2
• Solution
• Given that connection time is short-lived
• Exchange of information should be prioritized based on one’s
interest (friends or otherwise)
• Reduce redundancy and only send new information in form of
deltas
• Any connection/encounters with any other clients is purely
opportunistic
• Spread other non-priority data once priority data is exchanged
• Mobility patterns of users may also be used to prioritize
exchanges but this topic itself is its own research topic
28
CHALLENGE #2
Client A
Client B
send friends list,
status IDs with last modified time,
comment IDs with last modified time
loop
[while there are updates for A's friends' statuses/comments]
send status delta
Priority Data
acknowledgement
loop
[while there are status/comment updates to be sent]
send status delta
Non-priority Data
acknowledgement
close connection
29
CHALLENGE #3
• Facebook Synchronization
• Good idea to synchronize social networking data back to
Facebook periodically
• However, Facebook doesn’t allow arbitrary timestamps on
status/comment posts.
• It is difficult to coordinate the clients to preserve the order of
comments
30
CHALLENGE #3
. ..
Aggregates and syncs
Flitby Proxy
Facebook Servers
Solution: Use a proxy server to store
social networking data from clients and
commit to Facebook periodically.
(Unimplemented)
31
CHALLENGE #4
• Privacy
• Flitby uses opportunistic routing through intermediate nodes
• Intermediate nodes can access other people’s data
• Negotiating cryptographic keys is difficult due to large
delay.
• Solution
• Use a server to negotiate/distribute cryptographic keys.
(Unimplemented)
32
FLITBY ARCHITECTURE
Flitby Android Application
User Activities
(GUI)
Facebook Android
SDK API
Syncher
User
Data
User
Discovery
DTN
Middleware
API
Facebook Servers
33
DATABASE
•
•
•
•
•
User Table
Group Table
Status Table
Comment Table
Encounter Table
34
EVALUATION
• Devices used:
• Samsung Galaxy SII (v4.3.1)
• Samsung Galaxy SIII (v4.1.2)
• Nexus 4 (v4.3)
• Wi-Fi used:
• IEEE 802.11g
• Development Environment:
• Android Developer Tools v22.0.5-757759
35
EVALUATION
• Time taken for DTN messages of varying sizes to be
sent from node to node. (Using TCP over Wi-Fi)
5000
y = 0.9841x + 420.21
R² = 0.9993
time taken (ms)
4500
4000
3500
3000
2500
2000
1500
1000
500
0
0
500
1000
1500
2000
2500
Data size (kB)
3000
3500
4000
4500
36
EVALUATION
• Throughput of DTN based on previous data
• For comparison: In the US, 3G has a data bandwidth of
3.84Mbps/1.44Mbps (practical download/upload rate)
Data Size (kB)
Throughput (Kbps)
256
3046.973048
512
4432.532912
1024
5736.91607
2048
6726.659592
4096
7361.685488
37
EVALUATION
• Using Samsung Galaxy S2 and 3G network
• 10 trials were conducted
• Time recorded was time taken for the first screen to
completely load
First startup
Subsequent
startup
Flitby
5.97s
1.11s
Facebook
9.89s
6.63s
38
TESTING
• Android Strict Mode
Client A
• option in the application
that would detect & log
undesirable practices
Client B
Client C
Client D
Make a
status post
synchronize post
synchronize post
synchronize post
Key:
Application open
Make
comment c1
• Manual Testing
synchronize c1
• 1 phone test case
• 2 phones test case
• Systems Testing
synchronize c1
Make
comment c2
Make
comment c3
synchronize c3
synchronize c3
loop
[not synchronized]
synchronize
synchronize
synchronize
synchronize
synchronize
Make
comment c4
loop
[not synchronized]
synchronize
39
WHAT FLITBY LOOKS LIKE
This is your profile information
These are the people you
have encountered with
40
WHAT FLITBY LOOKS LIKE
This is your profile information
Type in a new status here
41
WHAT FLITBY LOOKS LIKE
Status Post Owner
Status Post
Write a response here
Comments
42
DEMO
43
CONCLUSION
• We were able to develop Flitby as a decentralized
social application that functions with DTN
• We tackled 2 of the problems presented in this
presentation
• Communication Challenges (Application Routing Protocol)
• State Inconsistencies (View Hierarchy)
• Future work could involve:
• Expanding the social network feature sets
• Improving Privacy
• Synchronization of social data back to Facebook
44
END
• Thank you for your attention!
• Questions?
45
Download