m4m 2 the rescue of m2m (eclipse democamp trondheim)
TRANSCRIPT
M4M 2 the Rescue of M2M
Werner Keil
Eclipse DemoCamp Trondheim28th August 2013Standards for
The Internet of
Things
Overview
Introduction
Sensors
Historic IT Errors and Bugs
UOMo, Unit-API, UCUM
Sensor Web, SensorML
Demo
M2MUse Cases, Framework, Protocols, Tools
NFCUse Cases, Adoption, OpenNFC
Other Trends
Java ME Embedded Standards
Q&A
2007-2013 Creative Arts & Technologies
Who am I?
2007-2013 Creative Arts & Technologies
Werner Keil
Consultant Coach
Creative Cosmopolitan
Open Source Evangelist
Software Architect
Java Godfather
UOMo Project Lead
Mrsk DevOps Guy
Email [email protected] @wernerkeil
Java Godfather?
2007-2012 Creative Arts & Technologies
Measure for Measure
2007-2013 Creative Arts & Technologies
Mistaking a PirateImages Copyright 2011 Getty Images
Measure for Measure
2007-2013 Creative Arts & Technologies
For a hero
of the story...Images Copyright 2012 The Old Globe, San Diego
CA
Measure for Measure
2007-2013 Creative Arts & Technologies
Mistaking a
Duke
Measure for Measure
2007-2013 Creative Arts & Technologies
For a
friar...Images based on poster created for the Oregon Shakespeare
Festival 2011 by Jeff Rauch
Type-Safety
Java does not have strongly typed base types
(like e.g. Ada or Smalltalk).
This could change around Java 10 or 11
(based on Oracle Road Map and statements)
For performance reasons most developer prefer primitive types over objects in their interface.
Primitive type arguments can more easily lead to name clashes (methods with the same signature) or other problems (Auto-Boxing,)
2007-2013 Creative Arts & Technologies
What do these disasters have in common?
Patriot Missile
The cause was an inaccurate calculation of the time since boot due
to a computer arithmetic error.
Ariane 5 Explosion
Floating point number which a value was converted from had a value
greater than what would be represented by a 16 bit signed
integer.
Gimli Glider (near disaster)
Fuel loading was miscalculated through misunderstanding of the
recently adoptedMetric System, replacing the Imperial System in
Canada
2007-2012 Creative Arts & Technologies
Mars Orbiter
Preliminary findings indicate that one team used US/English units
(e.g. inches, feet and pounds) while the other used metric units
for a key spacecraft operation.
NASA lost a $125 million Mars orbiter because a Lockheed Martin engineering team used English units of measurement while the agency's team used the more conventional metric system for a key spacecraft operation
A credible source disclosed, there was a manual step with an outsourced person to convert these calculations between the different teams, and NASA budget cuts caused them to fire him and have the wrong, unpatched data transmitted!!!
This also underlines the added risk when 3rd party contractors are involved or projects are developed Offshore
What do these disasters have in common?
2007-2012 Creative Arts & Technologies
23rd March 1983. Ronald Reagan announces SDI (or Star Wars): ground-based and space-based systems to protect the US from attack by strategic nuclear ballistic missiles.NASA Star Wars Initiative, 1983
2007-2012 Creative Arts & Technologies
2007-2012 Creative Arts & Technologies
1985: Why did Shuttle belly-flop?
Unit Tests wouldnt find these
All previous examples illustrate three categories of errors difficult to find through Unit Testing:
Interface Errors (e.g. millisecond/second, radian/degree, meters/feet).
Arithmetic Errors (e.g. overflow).
Conversion Errors.
Despite their name 2007-2012 Creative Arts & Technologies
Images Copyright, American Shakespeare Center
Causes of Conversion Errors
Ambiguity on the unit
Gallon Dry / Gallon Liquid - Gallon US / Gallon UK
Day Sidereal / Day Calendar
Foot in various regions, at least historically, see: http://en.wikipedia.org/wiki/German_obsolete_units_of_measurement#Fu.C3.9F_.28foot.29
Degree Celsius / Degree Fahrenheit
Did you know that Gabriel Fahrenheit was born in Gdansk (Danzig) in northern Poland?
...
Wrong conversion factors:
static final double PIXEL_TO_INCH = 1 / 72;double pixels = inches * PIXEL_TO_INCH
2007-2013 Creative Arts & Technologies
All of them happened in Mobile, Real Time or Embedded systems!
What else do they have in common? 2007-2012 Creative Arts & Technologies
Measurement PackageNamespace: org.osgi.util.measurement
SI only Unit API in the closet
Unit
Essentially an SI singleton holding relevant unit constants,
too.
Measurement
Represents a value with an error, a unit and a time-stamp.
State
Groups a state name, value and time-stamp
Little usage, e.g. Automotive; no further support
by OSGi, dropped in V5
OSGi
2007-2012 Creative Arts & Technologies
Namespace: javax.microediton.sensor*
Focusing on Sensors, but it got a minimalistic Unit API in the closet
Unit
Essentially an SI singleton holding relevant unit constants,
too.
JavaDoc:
http://pandora.la/java/javadocs/sensor/javax/microedition/sensor/Unit.html
ChannelInfo
Holding name, accuracy, data type,measurement ranges, scale and
unit
MeasurementRange
Range of possible values from minimum to maximum
Dead Meat (few actual handsets and no vendors except Nokia still use it, nor does Java ME Embedded)
JSR-256
2007-2013 Creative Arts & Technologies
Mobile Sensor API
Namespace: javax.measure.*
Only one interface and one abstract class
public interface Measurable
public abstract class Measure
Three sub-packagesquantity (holds dimensions mass, length)
unit (holds the SI and NonSI units)
converter (holds unit converters)
JSR-275
2007-2012 Creative Arts & Technologies
Units Specification
Namespace: org.unitsofmeasurement.*
Only interfaces (and exception classes)
public interface Quantity
public interface Unit
Three sub-packagesquantity (holds dimensions mass, length,...)
unit (holds units)
service (holds services)
The King is Dead
2007-2012 Creative Arts & Technologies
Units of Measurement API
Eclipse UOMo
One Small Step
One Unit Framework to Measure them AllNamespace: org.eclipse.uomo.*
Two main areas
Static Type Safe Units of Measure Support
Based on Units of Measurement API
On top of ICU4J, the Globalization standard at Eclipse and
others (Android, GWT, Google Financial, etc.)
Next major update to Unicode CLDR will add unit support!
Prime UCUM ImplementationSuccessor to Eclipse OHF UCUM Bundle
Eclipse UOMo
2007-2012 Creative Arts & Technologies
Unified Code for Units of MeasureThe Unified Code for Units of
Measure is inspired by
and heavily based onISO 2955-1983
ANSI X3.50-1986
HL7's extensions calledISO+
UOMo UCUM
2007-2012 Creative Arts & Technologies
JSR 354 ImplementationSisu equivalent for 354 if
you wantICU4J based implementation of types like
CurrencyUnit
MonetaryAmount
CurrencyConverter
ExchangeRate
Bridge to Unit-API where possible for cross-quantity arithmetic (e.g. $ per gram CO per mile)
UOMo Business
2007-2013 Creative Arts & Technologies
DEMO
UOMo Examples
A coordinated observation infrastructure composed of a distributed collection of resources that can collectively behave as a single, autonomous, task-able, dynamically adaptive and reconfigurable observing system that provides raw and processed data, along with associated meta-data, via a set of standards-based service-oriented interfaces. (Glenn, 2007) 2007-2012 Creative Arts & Technologies
Sensor Web | What is it?
OGC O&MObservations & MeasurementsApproved
SensorMLSensor Model LanguageApproved
TransducerMLTransducer Model LanguageApproved
OGC SOSSensor Observations ServiceApproved
OGC SPSSensor Planning ServiceApproved
OGC SASSensor Alert ServiceIn progress
OGC WNSWeb Notification ServicesIn progress
Sensor Web | OpenGIS Standards
SW Enablement working group at OGC have developed a number of standards governing different aspects of Sensor Web
2007-2012 Creative Arts & Technologies
Sensor Web | What is the OGC?
Not-for-profit
International industry consortium
Founded 1994, currently 340+ members
Open Standards development by consensus process
OGC MissionTo lead in the development, promotion and harmonization of open spatial standards 2007-2012 Creative Arts & Technologies
Sensor Web | Mozambique floods
The task under study is floods in different parts of the world
Particular test case was flooding of Mozambique
2007-2012 Creative Arts & Technologies
SensorML
Sensor modeling language is the cornerstone of all SW services
It provides comprehensive description of sensor parameters and capabilities
It can be used for describing different kind of sensors:
Stationary or dynamic
Remote or in-situ
Physical measurements or simulations
2007-2012 Creative Arts & Technologies
SensorML | Example
..............
..............
.............
............. 2007-2012 Creative Arts & Technologies
Transportation & LogisticsLogisticsMedical &HealthcareIndustrial &Energy
CommunicationInfrastructure
Security & Surveillance
Public/Private Cloud Deployment Infrastructures
Internet
of ThingsM2M | Integrated Processes
2007-2013 Creative Arts & Technologies Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0, Enabling new access to and uses of data
Barrier-type bolt seal
RFID: ID-number + integrity
Bar code
Battery 1 year transmitting
50 cycles
Range up to 50 meters
915 MHz + 2.4 GHz
Data transmission rate 500 kbps
Storage 64 bytes
RFID e-Seal Example 2005-2012 Creative Arts & Technologies, Prof. Jens Froese TU Hamburg-HarburgM2M | Smart Container
Open ecosystem for M2M
Third Party EcosystemOpen M2M application
framework and runtimesOpen M2M communication protocols
Internet of
ThingsOpen M2M
development tools
2007-2013 Creative Arts & Technologies, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0
A Publish Subscribe messaging protocol allowing a message to be published once and multiple consumers (applications / devices) to receive the message providing decoupling between the producer and consumer(s)
A producer sends (publishes) a message (publication) on a topic (subject)A consumer subscribes (makes a subscription) for messages on a topic (subject)
A message server / broker matches publications to subscriptions If no matches the message is discarded
If one or more matches the message is delivered to each matching subscriber/consumer
MQTT - Publish Subscribe Messaging
2007-2013 Creative Arts & Technologies, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0
M2M | Gemalto Wireless Modules
2007-2013 Creative Arts & Technologies, Gemalto
Exchange photos
Get your e-ticket
Pay without cash
Redeem coupons
Get your Receipt
NFCPass the gate
Read a map from interactive billboard
NFC NFC 2007-2012 Creative Arts & Technologies
NFC | Use Cases
Chiuaua Driving License: ISO 15693Toronto Payment: ISO 14443-B & ISO 15693Sao Paulo Transport: ISO 14443ASingapore Transport : Felica, ISO 14443BParis Transport : ISO 14443B
Tokyo Transport:FelicaTM
London Transport : ISO 14443A
San Francisco Transport: ISO 14443BShenzen Transport : ISO 14443BHong Kong Transport: FelicaTMSeoul Transport : ISO 14443A
Japan ID Card: ISO 14443B
US Payment: ISO 14443-B & ISO 14443AUS Access Control: ISO 15693
Pakistan Passport: ISO 14443B
New Delhi Transport:FelicaTMNFC | Where to use this technology
Dubai RTA
Denmark (Rejsekort), Sweden, Norway, SAS Smart Pass
Moscow, St. Petersburg Metro 2007-2013 Creative Arts & Technologies
Open NFC interfaces can be classified at different levels, from very high-level interfaces that greatly simplify the usual tasks of NFC applications, to very low-level interfaces that allow fine tuning of NFC hardware parameters for example.High Level Interfaces:NDEF Messages
Bluetooth and Wi-Fi pairing
Read / Write to any tag
P2P
Virtual Tags
NFC | Open NFC
2007-2012 Creative Arts & Technologies
Starting Open NFC 4.3.0, the support for Java porting for
JSR-257 devices is discontinued. Older releases of the stack were
fully compliant with the JSR-257 standard. Android Edition is
currently the only one actively maintained with
Java Binding!
XivelyLanguage bindings for Java/Android, Python or Ruby contain support for Units of Measurement
Website: http://www.xively.com
OpenXCFeels quite a bit like a modernized OSGi Measurement bundle. Offering only SI units by default, but a more sophisticated Unit and Quantity concept somewhat similar and clearly inspired by Unit-API / JSR-275
Website: http://openxcplatform.com/
Without proper security, Connected Car hacks like that on Tesla
pose a great risk to this and all other critical sectors (Health,
Avionics,...)
CSS 3Mostly UI/rendering, but promises almost UCUM-like arithmetic and quantity-checking See: http://www.w3.org/TR/css3-values/
Other Trends for Sensor | Measurement
2007-2012 Creative Arts & Technologies
2 current JSRs for Mobile and EmbeddedJSR-360: CLDC 8CLDC 8 is
an evolutionary update to CLDC 1.1.1 to bring
the VM, Java Language, and libraries up to date
with Java SE 8.
More: http://java.net/projects/jsr360/pages/Home
JSR-361: Java ME Embedded ProfileUpdate IMP(-NG) to align with state-of-the-art features and current embedded device market requirements.
More: http://java.net/projects/jsr361/pages/Home
Embedded Standards | JSR-360, 361
2007-2012 Creative Arts & Technologies
Q & A
Eclipse Project UOMohttp://www.eclipse.org/uomo/
Units of Measurement APIhttp://www.unitsofmeasurement.org
UCUMhttp://www.unitsofmeasure.org
Links
Open Geospatial Consortiumhttp://www.opengeospatial.org
Java Community Processhttp://www.jcp.org
Eclipse M2M IWGhttp://m2m.eclipse.org
Links (2)
Contact
[email protected] [email protected]
Twitter: @wernerkeil
Hashtag #EclipseUOMo
Click to edit the title text formatTitelmasterformat durch Klicken bearbeiten
2007-2012 Creative Arts & Technologies
Click to edit the title text formatTitelmasterformat durch Klicken bearbeiten
Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline LevelSeventh Outline LevelEighth Outline Level
Ninth Outline LevelTextmasterformate durch Klicken bearbeiten
Zweite Ebene
Dritte Ebene
Vierte Ebene
Fnfte Ebene
2007-2012 Creative Arts & Technologies
Click to edit the title text formatTitelmasterformat durch Klicken bearbeiten
2007-2010 Creative Arts & Technologies
Click to edit the title text formatTitelmasterformat durch Klicken bearbeiten
Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline LevelSeventh Outline LevelEighth Outline Level
Ninth Outline LevelTextmasterformate durch Klicken bearbeiten
2007-2012 Creative Arts & Technologies
2007-2010 Creative Arts & Technologies
Click to edit the title text formatFare clic per modificare lo stile del titolo
Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline LevelSeventh Outline LevelEighth Outline Level
Ninth Outline LevelFare clic per modificare gli stili del testo dello schema
Secondo livello
Terzo livello
Quarto livello
Quinto livello
Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline LevelSeventh Outline LevelEighth Outline Level
Ninth Outline LevelFare clic per modificare stili del testo dello schema
Click to edit the title text formatClick to edit Master title style
Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline LevelSeventh Outline LevelEighth Outline Level
Ninth Outline LevelClick to edit Master text styles
Second level
Third level
Fourth level
Fifth level
7-May-2013
Copyright (c) 2013, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0
Click to edit the title text formatClick to edit Master title style
Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline LevelSeventh Outline LevelEighth Outline Level
Ninth Outline LevelClick to edit Master text styles
Second level
Third level
Fourth level
Fifth level
7-May-2013
Copyright (c) 2013, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0
Click to edit the title text formatClick to edit Master title style
Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline LevelSeventh Outline LevelEighth Outline Level
Ninth Outline LevelClick to edit Master text styles
Second level
Third level
Fourth level
Fifth level
7-May-2013
Copyright (c) 2013, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0
Click to edit the title text formatClick to edit Master title style
Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline LevelSeventh Outline LevelEighth Outline Level
Ninth Outline LevelClick to edit Master text styles
Second level
Third level
Fourth level
Fifth level
7-May-2013
Copyright (c) 2013, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0
Click to edit the title text formatTitelmasterformat durch Klicken bearbeiten
Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline LevelSeventh Outline LevelEighth Outline Level
Ninth Outline LevelTextmasterformat bearbeiten
Zweite Ebene
Dritte Ebene
Vierte Ebene
Fnfte Ebene
Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline LevelSeventh Outline LevelEighth Outline Level
Ninth Outline LevelTextmasterformat bearbeiten
Zweite Ebene
Dritte Ebene
Vierte Ebene
Fnfte Ebene
Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline LevelSeventh Outline LevelEighth Outline Level
Ninth Outline LevelTextmasterformat bearbeiten
Zweite Ebene
Dritte Ebene
Vierte Ebene
Fnfte Ebene
13/06/2005
Click to edit the title text formatTitelmasterformat durch Klicken bearbeiten
Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline LevelSeventh Outline LevelEighth Outline Level
Ninth Outline LevelTextmasterformat bearbeiten
Zweite Ebene
Dritte Ebene
Vierte Ebene
Fnfte Ebene
Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline LevelSeventh Outline LevelEighth Outline Level
Ninth Outline LevelTextmasterformat bearbeiten
Zweite Ebene
Dritte Ebene
Vierte Ebene
Fnfte Ebene
13/06/2005