Upload
werner-keil
View
1.631
Download
0
Embed Size (px)
DESCRIPTION
M4M or Measure 4 Measure, ever since Shakespeare's play with the same name we know, people can be mistaken for one another. A Duke (like the beloved Java mascot) claims to be a monk, the head of a dead pirate is presented to be that of the young hero. So can important information like Units of Measurement be misinterpreted. While humans reading 10°C, 10 C or 10 Degree Celsius, each of those could be interpreted and understood well enough. For M2M communication, unless a program is provided with a large glossary of alternate terms, only ONE of these would be acceptable. Slides of the JCP EC F2F in January 2014 proposing the idea of a Units of Measurement JSR, recently approved as JSR 363: https://jcp.org/en/jsr/detail?id=363
Citation preview
M4M 2 the Rescue of M2M
Werner KeilLeonardo Lima
Jean-Marie Dautelle
JCP EC F2F, Redwood Shores
24 January 2014
Sensor WebObservations andMeasurements
What do these mishaps have in common?•Patriot Missile
The cause was an inaccurate calculation of the time since boot due to a computer arithmetic error.
•Ariane 5 ExplosionFloating point number which a value was converted from a value greater than what would be represented by a 16 bit signed integer.
• Christopher ColumbusHe miscalculated the circumference of Earth assuming a medieval Persian geographer he referred to had used Roman miles (4,856 ft.) instead of the 7,091 ft. Arabic mile, which is part of the reason he unexpectedly ended up in the Bahamas on October 12, 1492, and thought he had hit Asia. Whoops.
2 © 2007-2014 Creative Arts & Technologies, V2COM
1983 | Gimli Glider
3 © 2007-2014 Creative Arts & Technologies, V2COM Fotos: Wayne Glowacki | Wikia „Lord of the Rings“
1985 | Star Wars
4 © 2007-2014 Creative Arts & Technologies, V2COM
Mirror on underside of shuttle
SDI Experiment: The Plan
Big mountain in Hawaii
1985 | Reality
SDI Experiment: What really happened
5 © 2007-2014 Creative Arts & Technologies, V2COM
6 © 2007-2014 Creative Arts & Technologies, V2COM
1985 | Why it happened?
1999 | Mars Orbiter
7 © 2007-2014 Creative Arts & Technologies, V2COM
Measurement Package
• Namespace: org.osgi.util.measurement
• SI only Unit Library “in the closet”• Unit
Essentially an SI singleton holding relevant unit constants, too.
• MeasurementRepresents a value with an error, a unit and a time-stamp.
• State Groups a state name, value and timestamp.
• Some very limited usage, e.g. by Automotive
► No further development by OSGi
OSGi
8 © 2007-2014 Creative Arts & Technologies, V2COM
Mobile Sensor API
• Namespace: javax.microediton.sensor.*
• Focusing on single-device Sensors, but got a minimalistic Unit API
“in the barn”• Unit
Essentially an SI singleton holding relevant unit constants, too.JavaDoc: http://pandora.la/java/javadocs/sensor/javax/microedition/sensor/Unit.html
• ChannelInfoHolding name, accuracy, data type,measurement ranges, scale and unit
• MeasurementRangeRange of possible values from minimum to maximum (J2ME style, e.g. no Generics)
► Dead Meat (few actual handsets, no vendors except Nokia still use it, nor does Java ME Embedded)
JSR-256
9 © 2007-2014 Creative Arts & Technologies, V2COM
• Namespace: javax.measure.*
• Only one interface and one abstract class• public interface Measurable<Q extends Quantity>
• public abstract class Measure<V, Q extends Quantity>
• Three sub-packages• quantity (holds dimensions like mass, length,…)
• unit (holds the SI and NonSI units)
• converter (holds unit converters)
JSR-275
10 © 2007-2014 Creative Arts & Technologies, V2COM
Units Specification
• JScience
• Groovy/Grails (DSLs e.g. for Healthcare, Unit Conversion,…)
• GeoAPI (OGC standard) and implementations, e.g. uDig
• Orbitz/Ebookers.com
• IEM (Emergency Management, Homeland Security)
• OpenEHR
• Parfait (Java Monitoring, part of Performance Co-Pilot - PCP)
► Rejected only by EC not Community
JSR-275
11 © 2007-2014 Creative Arts & Technologies, V2COM
Users and popular Downstream Projects
• Namespace: org.unitsofmeasurement.*
• Only interfaces (and exception classes)• public interface Quantity<Q extends Quantity<Q>>
• public interface Unit<Q extends Quantity<Q>>
• Three sub-packages• quantity (holds dimensions mass, length,...)
• unit (holds units)
• service (holds services)
Carrying the Flame…
12 © 2007-2014 Creative Arts & Technologies, V2COM
Units of Measurement API
• Xively• Language bindings for Java/Android, Python or Ruby contain some support for Units of
Measurement. Website: http://www.xively.com
• OpenXC• Feels like modernized OSGi Measurement bundle. Offering only SI units by default, but a
more sophisticated Unit, Measurement and Quantity concept somewhat similar and clearly inspired by Unit-API / JSR-275 Website: http://openxcplatform.com/
• CSS 3• Mostly UI/rendering, but promises almost UCUM-like arithmetic and
quantity-checking Website: http://www.w3.org/TR/css3-values/
• Unicode / ICU4J• Significant Unit support from CLDR 24 / ICU4J 52.x on, covering most of SI and other
relevant units in at least 70 languages Website: http://site.icu-project.org/
Other Trends for Sensors | Measurement
13 © 2007-2014 Creative Arts & Technologies, V2COM
Smart Home | Remote Monitoring
14 © 2013-2014 Creative Arts & Technologies, V2COM
•A Heart Monitor remotelyaccessible from deviceslike Google Glass or yourfavorite Mobile Browser
•Part of Java EmbeddedChallenge at JavaOne
15 © 2013-2014 Creative Arts & Technologies, V2COM
Smart Home | Heart of Glass
JavaOne 2013
•Raspberry Pi | Things API•RXTX (gnu.io)•Polar Heart Sensor•Java EE | HTML 5 (Tomcat/Glassfish)•Google Glass (preferred) or other Web-enabled Mobile devices
16 © 2013-2014 Creative Arts & Technologies, V2COM
Smart Home | Heart of Glass
Technologies used
| Unit-API
Smart Watch
17 © 2013-2014 Creative Arts & Technologies, V2COM Bild: L'Atelier
“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)
18 © 2007-2014 Creative Arts & Technologies, V2COM
Sensor Web | What is it?
Data PyramidData Pyramid
19 © 2007-2014 Creative Arts & Technologies, V2COM
CoAP
Standards Organizations
OGC Sensor Web Enablement• SensorML
• O&M
• TransducerML
• GeographyML
Web Services• Web Services Description
Language
• REST
National Institute for Standards and Technology
• Semantic Interoperability Communityof Practice
• Sensor Standards Harmonization
W3C Semantic Web• Resource Description
Framework
• RDF Schema
• Web Ontology Language
• Semantic Web Rule Language
• SAWSDL
• SA-REST• SML-S
• O&M-S
• TML-S
Sensor Ontology
Sensor Ontology
Semantics | Data Standards
20 © 2013-2014 Creative Arts & Technologies, V2COM
Unicode Consortium• CLDR
• ICU4J
Unicode
Standards OrganizationsSupporting this JSR
21 © 2013-2014 Creative Arts & Technologies, V2COM
CERN
Opower
Gemalto M2M
BT
SFR Group
Thales Group
Samsung
Austrian Standards
Alcatel Lucent
Fraunhofer Gesellschaft
O2
ISO
IEM
JUG Chennai
GeoAPI
UCUM