SlideShare a Scribd company logo
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
Context-aware Systems 
Physical Context Mobile Sensors 
Emotional Context 
Social Context 
Online Social Networks 
2
Context-aware Systems 
Richer 
Contextual 
Information 
App 1 
Real Time 
Integration 
How to integrate? 
Integration 
App 2 
3
Application Scenarios 
Sensor Data 
Social Links 
Sensor Data 
Notification 
Online Social 
Network 
Internet 
Server 
Notification 
Notice of 
friend’s arrival 
to Paris 
Sensor Data 
4
Application Scenarios 
Facebook’s emotional contagion 
experiment, Kramer et al. (2014) 
EmotionSense, Rachuri et al. 
(2010) 
5 
How these can be improved ?
SenSocial 
Richer 
Contextual 
Information 
6
SenSocial Design 
7
Key Abstractions 
Application 
onDataSensed() 
Subscribe Context Data 
SenSocial 
subscribe() 
8 
Publish-Subscribe 
Interaction Paradigm 
Streams Stream Filters 
Stream Aggregators 
Multicast 
Multicast Streams
Publish-Subscribe 
Interaction Paradigm 
Subscription Types 
- Topic-based (e.g., get user’s 
location). 
- Content-based (e.g., get 
user’s location when the user 
posts about football on his/her 
Facebook wall). 
Application 
onDataSensed() 
Subscribe 
subscribe() 
Context 
Data 
SenSocial 
9
Streams 
Types of Stream 
• Continuous (e.g., get user’s location when the user is not 
moving). 
• Social event-based (e.g., get user’s location when the user 
performs an action on Facebook). 
10
Stream Filters 
Data Streams 
Conditions 
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 
11
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
Multicast Stream 
Multicast 
• It creates duplicate streams on multiple clients. 
• Clients are selected based on the OSN connectivity and geographic 
location of the users. 
OSN Connectivity Geographic Location 13
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
Evaluation 
15 
Energy Management
Evaluation 
CPU consumption with varying number streams 
Average battery consumption with varying number of OSN actions 
OSN actions 1 2 3 4 5 6 7 
Charge consumed [μAH] 51.7 97.1 142.5 187.8 233.2 278.5 324.3 
Note: the above OSN actions occurred within 20 minute time period and 
each triggered remote sampling of all five supported sensor modalities. 
16
Prototype Applications 
Facebook Sensor Map ConWeb 
17
Facebook Sensor Map 
18
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<Condition> conditions = new ArrayList<Condition>(); 
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
Programming Effort Evaluation 
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). 
Application Name Number of files Lines of code 
Facebook Sensor Map (M) (with SenSocial) 8 103 
Facebook Sensor Map (S) (with SenSocial) 2 213 
Facebook Sensor Map (M) (without SenSocial) 68 2419 
Facebook Sensor Map (S) (without SenSocial) 42 1004 
ConWeb (M) (with SenSocial) 3 23 
ConWeb (S) (with SenSocial) 1 107 
ConWeb (M) (without SenSocial) 61 2278 
ConWeb (S) (without SenSocial) 38 945 
20
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
http://www.cs.bham.ac.uk/~axm514/sensocial/ 
22
Thank You! 
Questions? 
Abhinav Mehrotra 
Email: a.mehrotra@cs.bham.ac.uk 
GitHub: https://github.com/AbhinavMehrotra/SenSocial-Library 
SenSocial: http://www.cs.bham.ac.uk/~axm514/sensocial/ 
23

More Related Content

Similar to SenSocial

Phil Day [Configured Things] | Policy-Driven Real-Time Data Filtering from Io...
Phil Day [Configured Things] | Policy-Driven Real-Time Data Filtering from Io...Phil Day [Configured Things] | Policy-Driven Real-Time Data Filtering from Io...
Phil Day [Configured Things] | Policy-Driven Real-Time Data Filtering from Io...
InfluxData
 
Towards a distributed framework to analyze multimodal data.pdf
Towards a distributed framework to analyze multimodal data.pdfTowards a distributed framework to analyze multimodal data.pdf
Towards a distributed framework to analyze multimodal data.pdf
CarlosRodrigues517978
 
Air pollution monitoring system
Air pollution monitoring systemAir pollution monitoring system
Air pollution monitoring system
Suraksha Sanghavi
 
Introduction to Struts 1.3
Introduction to Struts 1.3Introduction to Struts 1.3
Introduction to Struts 1.3
Ilio Catallo
 
Architecture for monitoring applications in Cloud
Architecture for monitoring applications in CloudArchitecture for monitoring applications in Cloud
Architecture for monitoring applications in CloudOnkar Kadam
 
Challenges in a Microservices Age: Monitoring, Logging and Tracing on Red Hat...
Challenges in a Microservices Age: Monitoring, Logging and Tracing on Red Hat...Challenges in a Microservices Age: Monitoring, Logging and Tracing on Red Hat...
Challenges in a Microservices Age: Monitoring, Logging and Tracing on Red Hat...
Martin Etmajer
 
A Portal For Visualizing Grid Usage
A Portal For Visualizing Grid UsageA Portal For Visualizing Grid Usage
A Portal For Visualizing Grid Usage
Kristen Carter
 
Jk3416991702
Jk3416991702Jk3416991702
Jk3416991702
IJERA Editor
 
Android application development
Android application developmentAndroid application development
Android application development
Md. Mujahid Islam
 
Sr Presentation 2
Sr Presentation 2Sr Presentation 2
Sr Presentation 2guestd2364f
 
SR Presentation 2.ppt
SR Presentation 2.pptSR Presentation 2.ppt
SR Presentation 2.ppttranlamson
 
AGU_Iguassu_Brazil_AUG
AGU_Iguassu_Brazil_AUGAGU_Iguassu_Brazil_AUG
AGU_Iguassu_Brazil_AUGJordan Alpert
 
chapter 4.pdf
chapter 4.pdfchapter 4.pdf
chapter 4.pdf
Sami Siddiqui
 
chapter 4.docx
chapter 4.docxchapter 4.docx
chapter 4.docx
Sami Siddiqui
 
The Live: Stream Computing
The Live: Stream ComputingThe Live: Stream Computing
The Live: Stream Computing
IRJET Journal
 
iiwas2009
iiwas2009iiwas2009
iiwas2009steccami
 
A survey on context aware system & intelligent Middleware’s
A survey on context aware system & intelligent Middleware’sA survey on context aware system & intelligent Middleware’s
A survey on context aware system & intelligent Middleware’s
IOSR Journals
 
Introduction to trace viewer
Introduction to trace viewerIntroduction to trace viewer
Introduction to trace viewer
Laura Villarreal
 

Similar to SenSocial (20)

Phil Day [Configured Things] | Policy-Driven Real-Time Data Filtering from Io...
Phil Day [Configured Things] | Policy-Driven Real-Time Data Filtering from Io...Phil Day [Configured Things] | Policy-Driven Real-Time Data Filtering from Io...
Phil Day [Configured Things] | Policy-Driven Real-Time Data Filtering from Io...
 
Towards a distributed framework to analyze multimodal data.pdf
Towards a distributed framework to analyze multimodal data.pdfTowards a distributed framework to analyze multimodal data.pdf
Towards a distributed framework to analyze multimodal data.pdf
 
Air pollution monitoring system
Air pollution monitoring systemAir pollution monitoring system
Air pollution monitoring system
 
Introduction to Struts 1.3
Introduction to Struts 1.3Introduction to Struts 1.3
Introduction to Struts 1.3
 
Architecture for monitoring applications in Cloud
Architecture for monitoring applications in CloudArchitecture for monitoring applications in Cloud
Architecture for monitoring applications in Cloud
 
Challenges in a Microservices Age: Monitoring, Logging and Tracing on Red Hat...
Challenges in a Microservices Age: Monitoring, Logging and Tracing on Red Hat...Challenges in a Microservices Age: Monitoring, Logging and Tracing on Red Hat...
Challenges in a Microservices Age: Monitoring, Logging and Tracing on Red Hat...
 
A Portal For Visualizing Grid Usage
A Portal For Visualizing Grid UsageA Portal For Visualizing Grid Usage
A Portal For Visualizing Grid Usage
 
Jk3416991702
Jk3416991702Jk3416991702
Jk3416991702
 
national
nationalnational
national
 
SCE 2
SCE 2SCE 2
SCE 2
 
Android application development
Android application developmentAndroid application development
Android application development
 
Sr Presentation 2
Sr Presentation 2Sr Presentation 2
Sr Presentation 2
 
SR Presentation 2.ppt
SR Presentation 2.pptSR Presentation 2.ppt
SR Presentation 2.ppt
 
AGU_Iguassu_Brazil_AUG
AGU_Iguassu_Brazil_AUGAGU_Iguassu_Brazil_AUG
AGU_Iguassu_Brazil_AUG
 
chapter 4.pdf
chapter 4.pdfchapter 4.pdf
chapter 4.pdf
 
chapter 4.docx
chapter 4.docxchapter 4.docx
chapter 4.docx
 
The Live: Stream Computing
The Live: Stream ComputingThe Live: Stream Computing
The Live: Stream Computing
 
iiwas2009
iiwas2009iiwas2009
iiwas2009
 
A survey on context aware system & intelligent Middleware’s
A survey on context aware system & intelligent Middleware’sA survey on context aware system & intelligent Middleware’s
A survey on context aware system & intelligent Middleware’s
 
Introduction to trace viewer
Introduction to trace viewerIntroduction to trace viewer
Introduction to trace viewer
 

Recently uploaded

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 

Recently uploaded (20)

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 

SenSocial

  • 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
  • 2. Context-aware Systems Physical Context Mobile Sensors Emotional Context Social Context Online Social Networks 2
  • 3. Context-aware Systems Richer Contextual Information App 1 Real Time Integration How to integrate? Integration App 2 3
  • 4. Application Scenarios Sensor Data Social Links Sensor Data Notification Online Social Network Internet Server Notification Notice of friend’s arrival to Paris Sensor Data 4
  • 5. Application Scenarios Facebook’s emotional contagion experiment, Kramer et al. (2014) EmotionSense, Rachuri et al. (2010) 5 How these can be improved ?
  • 8. Key Abstractions Application onDataSensed() Subscribe Context Data SenSocial subscribe() 8 Publish-Subscribe Interaction Paradigm Streams Stream Filters Stream Aggregators Multicast Multicast Streams
  • 9. Publish-Subscribe Interaction Paradigm Subscription Types - Topic-based (e.g., get user’s location). - Content-based (e.g., get user’s location when the user posts about football on his/her Facebook wall). Application onDataSensed() Subscribe subscribe() Context Data SenSocial 9
  • 10. Streams Types of Stream • Continuous (e.g., get user’s location when the user is not moving). • Social event-based (e.g., get user’s location when the user performs an action on Facebook). 10
  • 11. Stream Filters Data Streams Conditions 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 11
  • 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
  • 13. Multicast Stream Multicast • It creates duplicate streams on multiple clients. • Clients are selected based on the OSN connectivity and geographic location of the users. OSN Connectivity Geographic Location 13
  • 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
  • 15. Evaluation 15 Energy Management
  • 16. Evaluation CPU consumption with varying number streams Average battery consumption with varying number of OSN actions OSN actions 1 2 3 4 5 6 7 Charge consumed [μAH] 51.7 97.1 142.5 187.8 233.2 278.5 324.3 Note: the above OSN actions occurred within 20 minute time period and each triggered remote sampling of all five supported sensor modalities. 16
  • 17. Prototype Applications Facebook Sensor Map ConWeb 17
  • 19. 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<Condition> conditions = new ArrayList<Condition>(); 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
  • 20. Programming Effort Evaluation 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). Application Name Number of files Lines of code Facebook Sensor Map (M) (with SenSocial) 8 103 Facebook Sensor Map (S) (with SenSocial) 2 213 Facebook Sensor Map (M) (without SenSocial) 68 2419 Facebook Sensor Map (S) (without SenSocial) 42 1004 ConWeb (M) (with SenSocial) 3 23 ConWeb (S) (with SenSocial) 1 107 ConWeb (M) (without SenSocial) 61 2278 ConWeb (S) (without SenSocial) 38 945 20
  • 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
  • 23. Thank You! Questions? Abhinav Mehrotra Email: a.mehrotra@cs.bham.ac.uk GitHub: https://github.com/AbhinavMehrotra/SenSocial-Library SenSocial: http://www.cs.bham.ac.uk/~axm514/sensocial/ 23