SenSocial: A Middleware for Integrating Online Social Networks and Mobile Sensing Data Streams Abhinav Mehrotra , Veljko Pejovic, Mirco Musolesi School of Computer Science University of Birmingham
Transcript
Slide 1
SenSocial: A Middleware for Integrating Online Social Networks
and Mobile Sensing Data Streams Abhinav Mehrotra, Veljko Pejovic,
Mirco Musolesi School of Computer Science University of
Birmingham
Slide 2
Context-aware Systems Physical ContextMobile Sensors Social
Context Emotional Context Online Social Networks 2
Slide 3
Context-aware Systems Richer Contextual Information How to
integrate? App 1 App 2 Integration Real Time Integration 3
Slide 4
Sensor Data Notification Online Social Network Internet Server
Notification Notice of friends arrival to Paris Sensor Data Social
Links Application Scenarios 4
Slide 5
Facebooks emotional contagion experiment, Kramer et al. (2014)
EmotionSense, Rachuri et al. (2010) 5 How these can be improved
?
Slide 6
SenSocial Richer Contextual Information 6 Online Social Network
Data Mobile Sensor Data
Publish-Subscribe Interaction Paradigm Subscription Types -
Topic-based (e.g., get users location). - Content-based (e.g., get
users location when the user posts about football on his/her
Facebook wall). onDataSensed() Subscribe subscribe() Context Data
SenSocial Application 9
Slide 10
Streams Types of Stream Continuous (e.g., get users location
when the user is not moving). Social event-based (e.g., get users
location when the user performs an action on Facebook). 10
Slide 11
Stream Filters A condition comprises of a modality, a
comparison operator, and a value. Example: get location only when a
user is not moving. Condition c = new
Condition(ModalityType.physical_activity, Operator.equals,
ModalityValue.still); Refined Information Conditions Data Streams
11
Slide 12
Stream Aggregator It wraps multiple streams received by the
server into a single aggregated stream. Data from individual
streams is multiplexed to the same join stream. It works similarly
to a normal stream. 12
Slide 13
Multicast Stream It creates duplicate streams on multiple
clients. Clients are selected based on the OSN connectivity and
geographic location of the users. OSN ConnectivityGeographic
Location 13 Multicast
Slide 14
Other Features Remote Stream Management Streams can be created,
modified, or destroyed remotely on the mobile clients. Privacy
Control By specifying the allowed data type (context modality) and
the level of granularity (raw or classified). 14
Slide 15
Evaluation 15 Energy Management
Slide 16
OSN actions1234567 Charge consumed
[AH]51.797.1142.5187.8233.2278.5324.3 Average battery consumption
with varying number of OSN actions Note: the above OSN actions
occurred within 20 minute time period and each triggered remote
sampling of all five supported sensor modalities. CPU consumption
with varying number streams Evaluation 16
Facebook Sensor Map: Code Snippet /*----------- Create
streams----------------*/ SenSocialManager manager =
SenSocialManager.getSenSocialManager(getApplicationContext());
String uid = manager.getUserId(); User user = manager.getUser(uid);
Stream s1 =
user.getDevice().getStream(SensorUtils.Sensor_Type_Accelerometer,
"classified"); Stream s2 =
user.getDevice().getStream(SensorUtils.Sensor_Type_Microphone,
"classified"); Stream s3 =
user.getDevice().getStream(SensorUtils.Sensor_Type_Location,
"raw"); /*----------- Create list of filter condition(s)
----------------*/ ArrayList conditions = new ArrayList ();
Condition c = new Condition(ModalityType.facebook_activity,
Operator.equals, ModalityValue.active); conditions.add(c);
/*----------- Add condition list to the filter -----------*/ Filter
filter = new Filter(conditions); /*----------- Set filter to the
streams -----------*/ s1 = s1.setFilter(filter); s2 =
s2.setFilter(filter); s3 = s3.setFilter(filter); /*-----------
Register streams -----------*/ manager.registerListener(this,
stream1.getId()); manager.registerListener(this, stream2.getId());
manager.registerListener(this, stream3.getId()); /*-----------
Start streams -----------*/ stream1.start(); stream2.start();
stream3.start(); 19
Slide 20
Programming Effort Evaluation Application NameNumber of
filesLines of code Facebook Sensor Map (M) (with SenSocial)8103
Facebook Sensor Map (S) (with SenSocial)2213 Facebook Sensor Map
(M) (without SenSocial)682419 Facebook Sensor Map (S) (without
SenSocial)421004 ConWeb (M) (with SenSocial)323 ConWeb (S) (with
SenSocial)1107 ConWeb (M) (without SenSocial)612278 ConWeb (S)
(without SenSocial)38945 Facebook Sensor Map : lines of code
reduced by nine times (from 3423 to 316). ConWeb : lines of code
reduced by twenty four times (from 3223 to 130). 20
Slide 21
Summary We argue that the integration of OSNs and mobile sensor
data streams can benefit in obtaining richer contextual
information. We propose SenSocial to simplify the implementation of
such ubiquitous computing applications. SenSocial is released as an
open-source project. Available at:
https://github.com/AbhinavMehrotra/SenSocial-Library 21