SlideShare a Scribd company logo
1 of 49
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
SAMI
Ecosystem & APIs
Jerome Dubreuil – Dan Serfaty
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
2
Brief history
• About us
– Past lives in startups and big companies
– Early fans of cloud technologies and platforms connecting devices
• About SAMI
– Started 2013
– Clean slate, no legacy
– Focus on developer and ecosystem from day 1
– Mindset of a startup, strength and maturity of the enterprise
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
3
Why?
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
Everything is data
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
5
A new paradigm
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
6
A new paradigm
• Digitalize and abstract the physical world
• Any device, any data
• No silo, unlimited data fusion
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
7
A new paradigm
• Fully open
• Any device can connect, send + receive data
• Any application can access user data
• Full privacy control
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
8
Data Driven Development
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
9
You focus on the device
and the applications
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
10
SAMI takes care of the data
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
A very simple use case
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
12
App
• Live monitoring
• Historical Graphs
A very simple use case
Use case: multiple sensors in a house
65,60,600
67,80,650
72,62,630
65,62,602
{
“temp”:65,
“noise”: 60,
“co2”: 600
}
Format: CSV,
every minute
Temp: 65°F,
Noise: 60db
CO2: 600 ppm
Bedroom Room 1
Kitchen
Living Room
Bedroom Room 2
}
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
13
The developer experience
Create a
Device Type
Create an
application
developer.samsungsami.io
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
Devices
Connecting devices to SAMI
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
15
What’s a device in SAMI?
• A device is any registered node that can send and receive data using
the SAMI platform
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
16
What’s a device type?
• A device type describes a class of devices and the data it is sending
• A device type has a Manifest that:
– Describes the data coming in
– Processes incoming data in real-time
– Normalizes data for SAMI
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
17
Creating a Device Type and a Manifest
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
18
Creating a Device Type and a Manifest
• Before submitting, develop your Manifest locally in an IDE using tools
available on the developer portal:
– Manifest SDK (download)
– Documentation, samples, tutorial
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
19
The Manifest
• Transforms any input data into normalized output data
• Output data are fields (can be nested):
– Name
– Type (bool, integer, long, floats, double, string, collections)
– Unit (allows some level of conversion)
• Today, full power of a Groovy script, with approval
• Tomorrow: simplified version, no approval
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
20
The Manifest
import com.samsung.sami.manifest.Manifest
import com.samsung.sami.manifest.fields.*
import static com.samsung.sami.manifest.fields.StandardFields.*
import javax.measure.unit.NonSI
public class MyDeviceManifest implements Manifest {
public final static FieldDescriptor TEMP_INTEGER = TEMPERATURE.alias(Integer.class)
public final static FieldDescriptor NOISE = new FieldDescriptor("noise", NonSI.DECIBEL, Integer.class);
public final static FieldDescriptor CO2 = new FieldDescriptor("co2", StandardUnits.PARTS_PER_MILLION, Integer.class);
@Override
List<Field> normalize(String input) {
def fields = []
def values = input.split(",")
def tempInF = values[0].asType(Integer.class)
def noise = values[1].asType(Integer.class)
def co2 = values[2].asType(Integer.class)
fields.add(new Field(TEMP_INTEGER, NonSI.FAHRENHEIT, tempInF))
fields.add(new Field(NOISE, noise))
fields.add(new Field(CO2, co2))
return fields
}
@Override
List<FieldDescriptor> getFieldDescriptors() {
return [TEMP_INTEGER, NOISE, CO2]
}
}
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
21
Testing your Manifest
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
22
Testing your Manifest
> java -jar sami-manifest-sdk-1.7.jar -m MyDeviceManifest.groovy -d myDeviceData.csv
==============================================================================
Manifest File: MyDeviceManifest.groovy
Modified On: 10/31/2014 11:02:52
==============================================================================
Manifest FieldDescriptors:
co2 FieldDescriptor[name: co2, normalizedUnit: ppm, valueClass: class java.lang.Integer]
temp FieldDescriptor[name: temp, normalizedUnit: ℃, valueClass: class java.lang.Integer]
noise FieldDescriptor[name: noise, normalizedUnit: dB, valueClass: class java.lang.Integer]
==============================================================================
Results after running manifest on provided data file:
Field[name: temp, field descriptor: FieldDescriptor[name: temp, normalizedUnit: ℃, valueClass:
class java.lang.Integer], unit: °F, value: 18]
Field[name: noise, field descriptor: FieldDescriptor[name: noise, normalizedUnit: dB,
valueClass: class java.lang.Integer], unit: dB, value: 62]
Field[name: co2, field descriptor: FieldDescriptor[name: co2, normalizedUnit: ppm, valueClass:
class java.lang.Integer], unit: ppm, value: 602]
==============================================================================
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
23
Creating devices
• Through an application using the API
• Through the User Portal
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
24
How does the device send data?
• Today, 2 protocols: REST, WebSocket
• Tomorrow: any protocol (XMPP, MQTT, …)
• Sample curl call to post a message:
curl -X POST "https://api.samsungsami.io/v1.1/messages" -H "Content-type: application/json" -
d '{"sdid": "281c2bb26a604ed0b4655d446614d9f4", "data": "65,62,602" }' -H "Authorization:
bearer dc7c5016161f419b85e95ca6e7791198”
• Simulator
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
25
Visualize live and historical data
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
Applications
Creating value with SAMI
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
27
Our use case
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
28
Creating applications
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
29
How does an application use the SAMI API?
• Oauth 2
• Login is through Samsung Account
• All endpoints need an access token
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
30
How does an application use the SAMI API?
• More details coming in next session about SDKs, samples and tools
• We are showing here examples based on the raw API
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
31
How does an application use the SAMI API?
> java -jar tyrus-client-cli-1.7.jar
"wss://api.samsungsami.io/v1.1/live?userId=6dbf2c80612f11e498030800200c9a
66&Authorization=bearer+dc7c5016161f419b85e95ca6e7791198”
# Connecting to
wss://api.samsungsami.io/v1.1/live?userId=6dbf2c80612f11e498030800200c9a6
6&Authorization=bearer+dc7c5016161f419b85e95ca6e7791198...
# Connected in session 6fbe6f34-a20a-4d4b-bc7d-86420a48dbde
# text-message: {"type":"ping", "ts":1414781476400}
# text-message:
{"mid":"1f1c0dd43e134b6d96fa23a01a6db91e","data":{"temp":18,"noise":62,"c
o2":602},"ts":1414781536866,"sdtid":"dt7c4f60efdc244ea1ac4b247620a38a4b",
"cts":1414781536866,"uid":"2","mv":1,"sdid":"ea064adf013b45ae8ed7b72bf40f
0d49"}
# text-message:
{"mid":"0b424e4ccec247dc8b994895a66d885c","data":{"temp":18,"noise":62,"c
o2":602},"ts":1414781538573,"sdtid":"dt7c4f60efdc244ea1ac4b247620a38a4b",
"cts":1414781538573,"uid":"2","mv":1,"sdid":"ea064adf013b45ae8ed7b72bf40f
0d49"}
Code sample 1: Websocket
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
32
How does an application use the SAMI API?
> curl
"https://api.samsungsami.io/v1.1/messages?sdid=ea064adf013b45ae8ed7b72bf40f0d49&startDate=141469396400
0&endDate=1414780365000" -H "Authorization: bearer dc7c5016161f419b85e95ca6e7791198"
…
"data":[
{
"mid":"6b29828281ff49dba2feb639e13d6bfa",
"data":{
"temp":18,
"noise":62,
"co2":602
},
"ts":1414780059836,
"sdtid":"dt7c4f60efdc244ea1ac4b247620a38a4b",
"cts":1414780059836,
"uid":"6dbf2c80612f11e498030800200c9a66",
"mv":1,
"sdid":"ea064adf013b45ae8ed7b72bf40f0d49"
},
…
Code sample 2: REST /messages
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
33
Examples of available APIs
• User
– Profile
• Devices
– CRUD devices, CRUD tokens
• Device Types
– Device Type Information, Manifest Versions, Manifest Properties
• Messages
– post, read, aggregates, export
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
Real life example
Bloom Technologies
Julien Penders
http://www.bloom-life.com
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
35
Meet Bloom
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
36
A powerful yet simple wearable to track
contractions. Building on SAMI.
Connect
With your body and get
new insight
Track
Clinically relevant
information
Share
With your partner or doctor.
Unlock new clinical discovery.
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
37
Bloom Manifest
Device
Bloom
Device type
Bloom contraction monitor
Bloom Alpha HR monitor
Bloom Alpha Motion sensor
Manifests
BloomIUPManifest
BloomHeartRateManifest
BloomAccelerometerManifest
Example of manifest: BloomIUPManifest
public class BloomIUPManifest implements Manifest {
// Custom FieldDesc
static final SESSION_ID = new FieldDescriptor("session_id", Integer.class)
static final IUP_HORIZONTAL = new FieldDescriptor("iup_horizontal", Float.class)
static final IUP_VERTICAL = new FieldDescriptor("iup_vertical", Float.class)
// boolean signals, true when contraction is active
static final CONTRACTION_VERTICAL = new FieldDescriptor("contraction_vertical",
Boolean.class)
static final CONTRACTION_HORIZONTAL = new FieldDescriptor("contraction_horizontal",
Boolean.class)
@Override
List<Field> normalize(String input)
{
...
}
@Override
List<FieldDescriptor> getFieldDescriptors() {
return [IUP_VERTICAL, IUP_HORIZONTAL, CONTRACTION_VERTICAL,
CONTRACTION_HORIZONTAL,SESSION_ID]
}
}
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
38
Real-time data streaming and visualization in SAMI
SAMI
Contraction signal
Contraction features
maternal HR
Contraction signal
Contraction features
maternal HR
Phone motion
sensor
message.data =@{
@"iup_vertical": @([dataPoint.iup_vertical floatValue]),
@"iup_horizontal": @([dataPoint.iup_horizontal floatValue]),
@"contraction_vertical": @([dataPoint.contraction_vertical boolValue]),
@"contraction_horizontal": @([dataPoint.contraction_horizontal boolValue]),
@"session_id": @([dataPoint.sessionId integerValue])
};
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
39
Retrieving and visualizing data from SAMI
SAMI
Recording
session
NSString* filter = [NSString
stringWithFormat:@"session_id:%d",[sessionToRead.identifi
er integerValue]];
SAMIDLog(@"filter %@",filter);
[api2 getNormalizedMessagesWithCompletionBlock:nil
sdid:deviceAlphaIUP._id mid:nil fieldPresence:nil
filter:filter offset:nil count:nil startDate:@(start)
endDate:@(stop) order:nil
completionHandler:^(SamiNormalizedMessagesEnvelope
*output, NSError *error) {
//SAMIDLog(@"output.data %@",output.data);
NSArray * messages = output.data;
SAMIDLog(@"got %d points [session id
%d]",[messages count],[sessionToRead.identifier
integerValue]);
}];
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
40
Demo
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
Conclusion
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
42
What’s next – Building applications
Personal
security
Business
Processes
Data
Analysis
Machine
learning
Coaching
modules
User
Interfaces
Wellness
Programs
People Devices Services
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
43
What’s next – Getting started
• Get started guide, Hello World, tutorials, API reference
• Tools
– Live console to discover the API
– Manifest SDK
– Device simulator
– API SDKs and sample applications (Java/Android, iOS, Python, Ruby,
Javascript, Tizen, PHP, …)
– User portal (manage devices, visualize data)
• Attend the SAMI SDK session
developer.samsungsami.io
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
44
It’s a journey
Not a destination
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
45
Beta
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
46
We’re hiring
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
47
Q&A
and THANK YOU for your time.
Dan Serfaty - linkedin.com/in/danserfaty
Jerome Dubreuil - linkedin.com/in/jeromedubreuil
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
Backup
© 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com
49
Additional notes
• An application can understand what data “is” by looking at the
Manifest
• Why Groovy: simple, popular scripting language and JVM based
• Why a program: as flexible as possible, no constraint on input data
• Once the Manifest is in the platform, can create new devices in a
private way

More Related Content

Similar to SAMI Ecosystem & APIs Overview

The Future of IoT: Why We Need the Open Interconnect Consortium
The Future of IoT: Why We Need the Open Interconnect ConsortiumThe Future of IoT: Why We Need the Open Interconnect Consortium
The Future of IoT: Why We Need the Open Interconnect ConsortiumSamsung Open Source Group
 
IBM BlueMix Presentation - Paris Meetup 17th Sept. 2014
IBM BlueMix Presentation - Paris Meetup 17th Sept. 2014IBM BlueMix Presentation - Paris Meetup 17th Sept. 2014
IBM BlueMix Presentation - Paris Meetup 17th Sept. 2014IBM France Lab
 
The Future of IoT: Why We Need the Open Interconnect Consortium
The Future of IoT: Why We Need the Open Interconnect ConsortiumThe Future of IoT: Why We Need the Open Interconnect Consortium
The Future of IoT: Why We Need the Open Interconnect ConsortiumOpen Interconnect Consortium
 
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on WebinarParallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on WebinarBitbar
 
Tech planet 2014 Samsung Gear S Web Application
Tech planet 2014 Samsung Gear S Web ApplicationTech planet 2014 Samsung Gear S Web Application
Tech planet 2014 Samsung Gear S Web ApplicationRyo Jin
 
CI/CD best practices for building modern applications - MAD304 - Chicago AWS ...
CI/CD best practices for building modern applications - MAD304 - Chicago AWS ...CI/CD best practices for building modern applications - MAD304 - Chicago AWS ...
CI/CD best practices for building modern applications - MAD304 - Chicago AWS ...Amazon Web Services
 
Get over the Cloud with Bluemix
Get over the Cloud with BluemixGet over the Cloud with Bluemix
Get over the Cloud with BluemixCodemotion
 
CI/CD best practices for building modern applications - MAD301 - Santa Clara ...
CI/CD best practices for building modern applications - MAD301 - Santa Clara ...CI/CD best practices for building modern applications - MAD301 - Santa Clara ...
CI/CD best practices for building modern applications - MAD301 - Santa Clara ...Amazon Web Services
 
Developing multi-functional “sensor” web service platform for citizen sensing
Developing multi-functional “sensor” web service platform for citizen sensingDeveloping multi-functional “sensor” web service platform for citizen sensing
Developing multi-functional “sensor” web service platform for citizen sensingSnowflake Software
 
How we scale up our architecture and organization at Dailymotion
How we scale up our architecture and organization at DailymotionHow we scale up our architecture and organization at Dailymotion
How we scale up our architecture and organization at DailymotionStanislas Chollet
 
Deployment Automation for Hybrid Cloud and Multi-Platform Environments
Deployment Automation for Hybrid Cloud and Multi-Platform EnvironmentsDeployment Automation for Hybrid Cloud and Multi-Platform Environments
Deployment Automation for Hybrid Cloud and Multi-Platform EnvironmentsIBM UrbanCode Products
 
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)Bitbar
 
Cloud Computing & Sun Vision 03262009
Cloud Computing & Sun Vision 03262009Cloud Computing & Sun Vision 03262009
Cloud Computing & Sun Vision 03262009guest829442
 
CI/CD best practices for building modern applications - MAD310 - New York AWS...
CI/CD best practices for building modern applications - MAD310 - New York AWS...CI/CD best practices for building modern applications - MAD310 - New York AWS...
CI/CD best practices for building modern applications - MAD310 - New York AWS...Amazon Web Services
 
Innovate 2014 - DevOps Technical Strategy
Innovate 2014 - DevOps Technical StrategyInnovate 2014 - DevOps Technical Strategy
Innovate 2014 - DevOps Technical StrategyDaniel Berg
 
Scalable full-stack development at the edge - Pascal Wolkotte - Codemotion Am...
Scalable full-stack development at the edge - Pascal Wolkotte - Codemotion Am...Scalable full-stack development at the edge - Pascal Wolkotte - Codemotion Am...
Scalable full-stack development at the edge - Pascal Wolkotte - Codemotion Am...Codemotion
 
Track A-3: Drive Innovation & Reduce Costs with Managed Services
Track A-3: Drive Innovation & Reduce Costs with Managed ServicesTrack A-3: Drive Innovation & Reduce Costs with Managed Services
Track A-3: Drive Innovation & Reduce Costs with Managed Servicesscoopnewsgroup
 
IBM MQ Light @ Capitalware's MQTC 2.0.1.4 conference
IBM MQ Light @ Capitalware's MQTC 2.0.1.4 conferenceIBM MQ Light @ Capitalware's MQTC 2.0.1.4 conference
IBM MQ Light @ Capitalware's MQTC 2.0.1.4 conferencematthew1001
 

Similar to SAMI Ecosystem & APIs Overview (20)

The Future of IoT: Why We Need the Open Interconnect Consortium
The Future of IoT: Why We Need the Open Interconnect ConsortiumThe Future of IoT: Why We Need the Open Interconnect Consortium
The Future of IoT: Why We Need the Open Interconnect Consortium
 
IBM BlueMix Presentation - Paris Meetup 17th Sept. 2014
IBM BlueMix Presentation - Paris Meetup 17th Sept. 2014IBM BlueMix Presentation - Paris Meetup 17th Sept. 2014
IBM BlueMix Presentation - Paris Meetup 17th Sept. 2014
 
The Future of IoT: Why We Need the Open Interconnect Consortium
The Future of IoT: Why We Need the Open Interconnect ConsortiumThe Future of IoT: Why We Need the Open Interconnect Consortium
The Future of IoT: Why We Need the Open Interconnect Consortium
 
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on WebinarParallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
 
Tech planet 2014 Samsung Gear S Web Application
Tech planet 2014 Samsung Gear S Web ApplicationTech planet 2014 Samsung Gear S Web Application
Tech planet 2014 Samsung Gear S Web Application
 
CI/CD best practices for building modern applications - MAD304 - Chicago AWS ...
CI/CD best practices for building modern applications - MAD304 - Chicago AWS ...CI/CD best practices for building modern applications - MAD304 - Chicago AWS ...
CI/CD best practices for building modern applications - MAD304 - Chicago AWS ...
 
Get over the Cloud with Bluemix
Get over the Cloud with BluemixGet over the Cloud with Bluemix
Get over the Cloud with Bluemix
 
CI/CD best practices for building modern applications - MAD301 - Santa Clara ...
CI/CD best practices for building modern applications - MAD301 - Santa Clara ...CI/CD best practices for building modern applications - MAD301 - Santa Clara ...
CI/CD best practices for building modern applications - MAD301 - Santa Clara ...
 
RAD studio XE7 first look webinar
RAD studio XE7 first look webinarRAD studio XE7 first look webinar
RAD studio XE7 first look webinar
 
Developing multi-functional “sensor” web service platform for citizen sensing
Developing multi-functional “sensor” web service platform for citizen sensingDeveloping multi-functional “sensor” web service platform for citizen sensing
Developing multi-functional “sensor” web service platform for citizen sensing
 
OTT for Mobile Devices
OTT for Mobile DevicesOTT for Mobile Devices
OTT for Mobile Devices
 
How we scale up our architecture and organization at Dailymotion
How we scale up our architecture and organization at DailymotionHow we scale up our architecture and organization at Dailymotion
How we scale up our architecture and organization at Dailymotion
 
Deployment Automation for Hybrid Cloud and Multi-Platform Environments
Deployment Automation for Hybrid Cloud and Multi-Platform EnvironmentsDeployment Automation for Hybrid Cloud and Multi-Platform Environments
Deployment Automation for Hybrid Cloud and Multi-Platform Environments
 
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
 
Cloud Computing & Sun Vision 03262009
Cloud Computing & Sun Vision 03262009Cloud Computing & Sun Vision 03262009
Cloud Computing & Sun Vision 03262009
 
CI/CD best practices for building modern applications - MAD310 - New York AWS...
CI/CD best practices for building modern applications - MAD310 - New York AWS...CI/CD best practices for building modern applications - MAD310 - New York AWS...
CI/CD best practices for building modern applications - MAD310 - New York AWS...
 
Innovate 2014 - DevOps Technical Strategy
Innovate 2014 - DevOps Technical StrategyInnovate 2014 - DevOps Technical Strategy
Innovate 2014 - DevOps Technical Strategy
 
Scalable full-stack development at the edge - Pascal Wolkotte - Codemotion Am...
Scalable full-stack development at the edge - Pascal Wolkotte - Codemotion Am...Scalable full-stack development at the edge - Pascal Wolkotte - Codemotion Am...
Scalable full-stack development at the edge - Pascal Wolkotte - Codemotion Am...
 
Track A-3: Drive Innovation & Reduce Costs with Managed Services
Track A-3: Drive Innovation & Reduce Costs with Managed ServicesTrack A-3: Drive Innovation & Reduce Costs with Managed Services
Track A-3: Drive Innovation & Reduce Costs with Managed Services
 
IBM MQ Light @ Capitalware's MQTC 2.0.1.4 conference
IBM MQ Light @ Capitalware's MQTC 2.0.1.4 conferenceIBM MQ Light @ Capitalware's MQTC 2.0.1.4 conference
IBM MQ Light @ Capitalware's MQTC 2.0.1.4 conference
 

Recently uploaded

Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 

Recently uploaded (20)

Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 

SAMI Ecosystem & APIs Overview

  • 1. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com SAMI Ecosystem & APIs Jerome Dubreuil – Dan Serfaty
  • 2. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 2 Brief history • About us – Past lives in startups and big companies – Early fans of cloud technologies and platforms connecting devices • About SAMI – Started 2013 – Clean slate, no legacy – Focus on developer and ecosystem from day 1 – Mindset of a startup, strength and maturity of the enterprise
  • 3. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 3 Why?
  • 4. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com Everything is data
  • 5. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 5 A new paradigm
  • 6. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 6 A new paradigm • Digitalize and abstract the physical world • Any device, any data • No silo, unlimited data fusion
  • 7. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 7 A new paradigm • Fully open • Any device can connect, send + receive data • Any application can access user data • Full privacy control
  • 8. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 8 Data Driven Development
  • 9. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 9 You focus on the device and the applications
  • 10. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 10 SAMI takes care of the data
  • 11. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com A very simple use case
  • 12. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 12 App • Live monitoring • Historical Graphs A very simple use case Use case: multiple sensors in a house 65,60,600 67,80,650 72,62,630 65,62,602 { “temp”:65, “noise”: 60, “co2”: 600 } Format: CSV, every minute Temp: 65°F, Noise: 60db CO2: 600 ppm Bedroom Room 1 Kitchen Living Room Bedroom Room 2 }
  • 13. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 13 The developer experience Create a Device Type Create an application developer.samsungsami.io
  • 14. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com Devices Connecting devices to SAMI
  • 15. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 15 What’s a device in SAMI? • A device is any registered node that can send and receive data using the SAMI platform
  • 16. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 16 What’s a device type? • A device type describes a class of devices and the data it is sending • A device type has a Manifest that: – Describes the data coming in – Processes incoming data in real-time – Normalizes data for SAMI
  • 17. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 17 Creating a Device Type and a Manifest
  • 18. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 18 Creating a Device Type and a Manifest • Before submitting, develop your Manifest locally in an IDE using tools available on the developer portal: – Manifest SDK (download) – Documentation, samples, tutorial
  • 19. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 19 The Manifest • Transforms any input data into normalized output data • Output data are fields (can be nested): – Name – Type (bool, integer, long, floats, double, string, collections) – Unit (allows some level of conversion) • Today, full power of a Groovy script, with approval • Tomorrow: simplified version, no approval
  • 20. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 20 The Manifest import com.samsung.sami.manifest.Manifest import com.samsung.sami.manifest.fields.* import static com.samsung.sami.manifest.fields.StandardFields.* import javax.measure.unit.NonSI public class MyDeviceManifest implements Manifest { public final static FieldDescriptor TEMP_INTEGER = TEMPERATURE.alias(Integer.class) public final static FieldDescriptor NOISE = new FieldDescriptor("noise", NonSI.DECIBEL, Integer.class); public final static FieldDescriptor CO2 = new FieldDescriptor("co2", StandardUnits.PARTS_PER_MILLION, Integer.class); @Override List<Field> normalize(String input) { def fields = [] def values = input.split(",") def tempInF = values[0].asType(Integer.class) def noise = values[1].asType(Integer.class) def co2 = values[2].asType(Integer.class) fields.add(new Field(TEMP_INTEGER, NonSI.FAHRENHEIT, tempInF)) fields.add(new Field(NOISE, noise)) fields.add(new Field(CO2, co2)) return fields } @Override List<FieldDescriptor> getFieldDescriptors() { return [TEMP_INTEGER, NOISE, CO2] } }
  • 21. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 21 Testing your Manifest
  • 22. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 22 Testing your Manifest > java -jar sami-manifest-sdk-1.7.jar -m MyDeviceManifest.groovy -d myDeviceData.csv ============================================================================== Manifest File: MyDeviceManifest.groovy Modified On: 10/31/2014 11:02:52 ============================================================================== Manifest FieldDescriptors: co2 FieldDescriptor[name: co2, normalizedUnit: ppm, valueClass: class java.lang.Integer] temp FieldDescriptor[name: temp, normalizedUnit: ℃, valueClass: class java.lang.Integer] noise FieldDescriptor[name: noise, normalizedUnit: dB, valueClass: class java.lang.Integer] ============================================================================== Results after running manifest on provided data file: Field[name: temp, field descriptor: FieldDescriptor[name: temp, normalizedUnit: ℃, valueClass: class java.lang.Integer], unit: °F, value: 18] Field[name: noise, field descriptor: FieldDescriptor[name: noise, normalizedUnit: dB, valueClass: class java.lang.Integer], unit: dB, value: 62] Field[name: co2, field descriptor: FieldDescriptor[name: co2, normalizedUnit: ppm, valueClass: class java.lang.Integer], unit: ppm, value: 602] ==============================================================================
  • 23. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 23 Creating devices • Through an application using the API • Through the User Portal
  • 24. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 24 How does the device send data? • Today, 2 protocols: REST, WebSocket • Tomorrow: any protocol (XMPP, MQTT, …) • Sample curl call to post a message: curl -X POST "https://api.samsungsami.io/v1.1/messages" -H "Content-type: application/json" - d '{"sdid": "281c2bb26a604ed0b4655d446614d9f4", "data": "65,62,602" }' -H "Authorization: bearer dc7c5016161f419b85e95ca6e7791198” • Simulator
  • 25. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 25 Visualize live and historical data
  • 26. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com Applications Creating value with SAMI
  • 27. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 27 Our use case
  • 28. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 28 Creating applications
  • 29. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 29 How does an application use the SAMI API? • Oauth 2 • Login is through Samsung Account • All endpoints need an access token
  • 30. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 30 How does an application use the SAMI API? • More details coming in next session about SDKs, samples and tools • We are showing here examples based on the raw API
  • 31. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 31 How does an application use the SAMI API? > java -jar tyrus-client-cli-1.7.jar "wss://api.samsungsami.io/v1.1/live?userId=6dbf2c80612f11e498030800200c9a 66&Authorization=bearer+dc7c5016161f419b85e95ca6e7791198” # Connecting to wss://api.samsungsami.io/v1.1/live?userId=6dbf2c80612f11e498030800200c9a6 6&Authorization=bearer+dc7c5016161f419b85e95ca6e7791198... # Connected in session 6fbe6f34-a20a-4d4b-bc7d-86420a48dbde # text-message: {"type":"ping", "ts":1414781476400} # text-message: {"mid":"1f1c0dd43e134b6d96fa23a01a6db91e","data":{"temp":18,"noise":62,"c o2":602},"ts":1414781536866,"sdtid":"dt7c4f60efdc244ea1ac4b247620a38a4b", "cts":1414781536866,"uid":"2","mv":1,"sdid":"ea064adf013b45ae8ed7b72bf40f 0d49"} # text-message: {"mid":"0b424e4ccec247dc8b994895a66d885c","data":{"temp":18,"noise":62,"c o2":602},"ts":1414781538573,"sdtid":"dt7c4f60efdc244ea1ac4b247620a38a4b", "cts":1414781538573,"uid":"2","mv":1,"sdid":"ea064adf013b45ae8ed7b72bf40f 0d49"} Code sample 1: Websocket
  • 32. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 32 How does an application use the SAMI API? > curl "https://api.samsungsami.io/v1.1/messages?sdid=ea064adf013b45ae8ed7b72bf40f0d49&startDate=141469396400 0&endDate=1414780365000" -H "Authorization: bearer dc7c5016161f419b85e95ca6e7791198" … "data":[ { "mid":"6b29828281ff49dba2feb639e13d6bfa", "data":{ "temp":18, "noise":62, "co2":602 }, "ts":1414780059836, "sdtid":"dt7c4f60efdc244ea1ac4b247620a38a4b", "cts":1414780059836, "uid":"6dbf2c80612f11e498030800200c9a66", "mv":1, "sdid":"ea064adf013b45ae8ed7b72bf40f0d49" }, … Code sample 2: REST /messages
  • 33. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 33 Examples of available APIs • User – Profile • Devices – CRUD devices, CRUD tokens • Device Types – Device Type Information, Manifest Versions, Manifest Properties • Messages – post, read, aggregates, export
  • 34. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com Real life example Bloom Technologies Julien Penders http://www.bloom-life.com
  • 35. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 35 Meet Bloom
  • 36. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 36 A powerful yet simple wearable to track contractions. Building on SAMI. Connect With your body and get new insight Track Clinically relevant information Share With your partner or doctor. Unlock new clinical discovery.
  • 37. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 37 Bloom Manifest Device Bloom Device type Bloom contraction monitor Bloom Alpha HR monitor Bloom Alpha Motion sensor Manifests BloomIUPManifest BloomHeartRateManifest BloomAccelerometerManifest Example of manifest: BloomIUPManifest public class BloomIUPManifest implements Manifest { // Custom FieldDesc static final SESSION_ID = new FieldDescriptor("session_id", Integer.class) static final IUP_HORIZONTAL = new FieldDescriptor("iup_horizontal", Float.class) static final IUP_VERTICAL = new FieldDescriptor("iup_vertical", Float.class) // boolean signals, true when contraction is active static final CONTRACTION_VERTICAL = new FieldDescriptor("contraction_vertical", Boolean.class) static final CONTRACTION_HORIZONTAL = new FieldDescriptor("contraction_horizontal", Boolean.class) @Override List<Field> normalize(String input) { ... } @Override List<FieldDescriptor> getFieldDescriptors() { return [IUP_VERTICAL, IUP_HORIZONTAL, CONTRACTION_VERTICAL, CONTRACTION_HORIZONTAL,SESSION_ID] } }
  • 38. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 38 Real-time data streaming and visualization in SAMI SAMI Contraction signal Contraction features maternal HR Contraction signal Contraction features maternal HR Phone motion sensor message.data =@{ @"iup_vertical": @([dataPoint.iup_vertical floatValue]), @"iup_horizontal": @([dataPoint.iup_horizontal floatValue]), @"contraction_vertical": @([dataPoint.contraction_vertical boolValue]), @"contraction_horizontal": @([dataPoint.contraction_horizontal boolValue]), @"session_id": @([dataPoint.sessionId integerValue]) };
  • 39. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 39 Retrieving and visualizing data from SAMI SAMI Recording session NSString* filter = [NSString stringWithFormat:@"session_id:%d",[sessionToRead.identifi er integerValue]]; SAMIDLog(@"filter %@",filter); [api2 getNormalizedMessagesWithCompletionBlock:nil sdid:deviceAlphaIUP._id mid:nil fieldPresence:nil filter:filter offset:nil count:nil startDate:@(start) endDate:@(stop) order:nil completionHandler:^(SamiNormalizedMessagesEnvelope *output, NSError *error) { //SAMIDLog(@"output.data %@",output.data); NSArray * messages = output.data; SAMIDLog(@"got %d points [session id %d]",[messages count],[sessionToRead.identifier integerValue]); }];
  • 40. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 40 Demo
  • 41. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com Conclusion
  • 42. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 42 What’s next – Building applications Personal security Business Processes Data Analysis Machine learning Coaching modules User Interfaces Wellness Programs People Devices Services
  • 43. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 43 What’s next – Getting started • Get started guide, Hello World, tutorials, API reference • Tools – Live console to discover the API – Manifest SDK – Device simulator – API SDKs and sample applications (Java/Android, iOS, Python, Ruby, Javascript, Tizen, PHP, …) – User portal (manage devices, visualize data) • Attend the SAMI SDK session developer.samsungsami.io
  • 44. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 44 It’s a journey Not a destination
  • 45. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 45 Beta
  • 46. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 46 We’re hiring
  • 47. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 47 Q&A and THANK YOU for your time. Dan Serfaty - linkedin.com/in/danserfaty Jerome Dubreuil - linkedin.com/in/jeromedubreuil
  • 48. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com Backup
  • 49. © 2014 Samsung Developer Conference. All rights reserved. www.samsungdevcon.com 49 Additional notes • An application can understand what data “is” by looking at the Manifest • Why Groovy: simple, popular scripting language and JVM based • Why a program: as flexible as possible, no constraint on input data • Once the Manifest is in the platform, can create new devices in a private way

Editor's Notes

  1. Welcome to the SAMI talk. Today we’re going to present SAMI and what it means to developers and users.
  2. Before we start, let’s talk about history a little bit. !! be more personal
  3. Why are we here? In just a few years, most of us will have dozens if not hundred of connected devices. Health, SmartHome, Cars, Gadgets, etc. Number of connected devices will be staggering So: -To prepare for this world -To create REAL value for the users => WE the developers need change our approach, we need to understand a fundamental thing
  4. E-V-E-R-Y-T-H-I-N-G And for that: -We need to adopt a new mindset -We need A NEW PARADIGM
  5. We’re INTRODUCING SAMI for this new paradigm
  6. Everything is data = today there’s a lot of data. Tomorrow: orders of magnitude more Any device: this is critical. Fully device & data agnostic Break silos = true iot and data-based health will only work if there are no silos.
  7. Open = any device, any data, any application Any application = UI, data analysis, anything
  8. DDD is an emerging concept
  9. Big things always start with a small step so let’s imagine a SIMPLE EXAMPLE
  10. Explain the agenda of the prez with regards to that graphic
  11. Time check=6’
  12. A device is any source of data that needs to input it into SAMI or receive messages form the platform. In our example, this would be an instance of the new home sensor we are developing.
  13. A device type is how we define the class of devices that will be used to create multiple instances of our home sensor. It is necessary to define it before any real devices can send data. This is done using a Manifest, that is an essential part of defining a new Device Type. The Manifest is a contract that the creator of the device will implement. The manifest defines what the data going into SAMI is, and how to generate that data based on what the device will send (input data format, json, xml, etc) Normalizes: will be explained in a few slides
  14. So let me quickly show you what our developer web site looks like when you want to create a new device type. You specify a name (Display name), a unique name (this is akin to a package name, or a group id in maven). It identifies the device type in a human readable way and can be used with our api calls to reference that device type. And finally the content of the manifest. We will see later what goes in that box.
  15. So - don't click OK yet here... Before we submit our manifest we should actually have developed it locally.  How? In your preferred IDE, using the tools we provide on our developer portal. Those include: - a manifest SDK (that you can use to check your manifest for compilation errors, to build unit tests, or simply try a manifest on the command line) - A comprehensive documentation, tutorials, examples
  16. The Manifest Is a contract you implement. It: - transforms any input data into normalized output data. So you could have csv, json, xml, base 64 encoded binary, etc. as long as it can be expressed as an input string that your manifest can understand. - the output data are called fields and    - they have a name / identifier (e.g: temp)    - a type, we support the basic types you are used to, and collections of those types    - a unit, most units should be available SI and non SI and you can create new units if needed Today we offer the full power of a Groovy script. Why Groovy? It’s a very simple and popular, scripting language so anyone can pick it up quickly and it allows you to read and transform any data using the full power of a programming language. The scripts have to be approved before they can run on SAMI, the approval is about making sure that the code is safe. Tomorrow, we plan to offer a simplified version that require no approval for cases that require very little processing of the incoming data.
  17. Let’s take a more detailed look at a Manifest: Overview first - 3 main parts: - Declaration: imports, implement Manifest, field descriptors (coming back to it later) normalize() method, processes and transforms the data getFieldDescriptors: describes the data coming out Then dive in more details in each section. Explain field descriptor: types, units Explain getFieldDescriptors returning a list of FD Explain normalize method, parsing CSV, creating field instances, using the unit the values are expressed in in the input, explain conversion
  18. DAN Explain that you can build test cases in java with JUnit and run it in your IDE or in a test environment
  19. DAN
  20. DAN
  21. DAN
  22. A quick way to visualize the data that your device is sending and is persisted in SAMI is to use our live and historical visualizer tool. This is available on our user portal, so as a developer having created one more more instances of your sensor you can go there to see what your sensor is sending in real time and check what was sent previously.
  23. Time check=26’
  24. JEROME Mention permissions, restrictions etc.
  25. JEROME
  26. JEROME
  27. JEROME
  28. JEROME
  29. JEROME We have a foundation for analytics
  30. Time check=31’
  31. Demo sequence Turn system on and visualize data on app (pre-recorded data with contraction) Visualize data in SAMI  explain what we’re looking at, explain that we’re integrating data streams from multiple devices (bloom & phone) Show SAMI next to app screen  show that there is almost no delay Show history page (data retrieval) Question - Ok to use AirServer to visualize the app???
  32. Time check=36’
  33. Building applications: it’s you! Remember, it’s Data Driven Development You have the expertise, you can create any kind of app, small, big, UI, backend processes, etc. And we are here to support you. It’s a PLAYGROUND, there will be a way to monetize
  34. JEROME
  35. Beginning of a journey where Samsung and the developers will create new magical experiences for the user.
  36. This is a playground, so we’re opening it in beta right now. We will work closely with developers to tune the platform.
  37. Time check=40’