• Gefällt mir

Lädt ...

Flash Player 9 (oder höher) wird benötigt, um Präsentationen anzeigen zu können.
Wir haben festgestellt, dass Sie diese Software nicht auf Ihrem Computer haben. Um sie zu installieren, klicken Sie hier.

M4M 2 the Rescue of M2M (Eclipse DemoCamp Trondheim)

Hochgeladen am

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 ...

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.

This is where the Unified Code for Units of Measurement (UCUM) among similar approaches like UnitsML, SensorML or a few others are vital for error-free M2M transactions, not just between sensors or measurement devices, but also and especially vehicles or distributed devices.

OSGi Measurement has been around for some time (R3) but never gained as much momentum, as many other bundles of OSGi did. Except for very few use cases in the Embedded or Automotive sector it is practically unused and based on statements by its contributors in the OSGi Alliance to be considered legacy with no plans continue development.

After a brief overview of common M2M errors from Gimli to Mars, This session provides an overview of OSGi Measurement, Eclipse OUMo, what they have in common and where the differences lie. Although most of today's OSGi containers are capable of dealing with units or measurement better and more reliable with UOMo, both can where necessary also exchange information and collaborate. E.g. if legacy devices and code cannot be easily replaced. For this We'll take a look at interoperability between different systems or with other unit technologies and languages like F#, Fantom, Python or Lua.

Mehr in: Technologie , Bildung
  • Full Name Full Name Comment goes here.
    Sind Sie sicher, dass Sie...
    Ihre Nachricht erscheint hier
    Hinterlassen Sie den ersten Kommentar
    Be the first to like this
Keine Downloads


Bei Slideshare
Aus Einbettungen
Anzahl an Einbettungen


Gefällt mir

Einbettungen 0

No embeds

Inhalte melden

Als unangemessen gemeldet Als unangemessen melden
Als unangemessen melden

Wählen Sie Ihren Grund, warum Sie diese Präsentation als unangemessen melden.

    No notes for slide
  • <Nummer>
  • <Nummer>
  • <Nummer>
  • <Nummer>
  • <Nummer>
  • Enabling new access to and uses of data
  • <Nummer>
  • <Nummer>
  • <Nummer>
  • <Nummer>
  • <Nummer>


  • 1. M4M 2 the Rescue of M2M Standards for The Internet of Things Werner Keil Eclipse DemoCamp Trondheim 28th August 2013
  • 2. Overview • • Introduction Sensors • • • • • Demo M2M • • • • 2 Use Cases, Framework, Protocols, Tools NFC • • Historic IT Errors and Bugs UOMo, Unit-API, UCUM Sensor Web, SensorML Use Cases, Adoption, OpenNFC Other Trends Java ME Embedded Standards Q&A © 2007-2013 Creative Arts & Technologies
  • 3. Who am I? Werner Keil • • • • • • • Twitter @wernerkeil Consultant – Coach Creative Cosmopolitan Open Source Evangelist Software Architect Java Godfather UOMo Project Lead Mærsk DevOps Guy … Email werner@catmedia.us 3 © 2007-2013 Creative Arts & Technologies
  • 4. Java Godfather? 4 © 2007-2012 Creative Arts & Technologies
  • 5. Measure for Measure Mistaking a Pirate… 5 © 2007-2013 Creative Arts & Technologies Images © Copyright 2011 Getty Images
  • 6. Measure for Measure For a hero of the story... 6 © 2007-2013 Creative Arts & Technologies Images © Copyright 2012 The Old Globe, San Diego CA
  • 7. Measure for Measure Mistaking a Duke… 7 © 2007-2013 Creative Arts & Technologies
  • 8. Measure for Measure For a friar... 8 © 2007-2013 Creative Arts & Technologies Images based on poster created for the Oregon Shakespeare Festival © 2011 by Jeff Rauch
  • 9. Type-Safety • Java does not have strongly typed base types (like e.g. Ada or Smalltalk). • • • 9 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
  • 10. 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 adopted Metric System, replacing the Imperial System in Canada 10 © 2007-2012 Creative Arts & Technologies
  • 11. What do these disasters have in common? • 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 • • 11 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 © 2007-2012 Creative Arts & Technologies
  • 12. NASA “Star Wars” Initiative, 1983 23rd March 1983. Ronald Reagan announces SDI (or “Star Wars”): groundbased and space-based systems to protect the US from attack by strategic nuclear ballistic missiles. 12 © 2007-2012 Creative Arts & Technologies
  • 13. 1985: Why did Shuttle belly-flop? 13 © 2007-2012 Creative Arts & Technologies
  • 14. Unit Tests wouldn‘t find these… • Despite their name All previous examples illustrate three categories of errors difficult to find through Unit Testing: • • • 14 Interface Errors (e.g. millisecond/second, radian/degree, meters/feet). Arithmetic Errors (e.g. overflow). Conversion Errors. © 2007-2012 Creative Arts & Technologies Images © Copyright, American Shakespeare Center
  • 15. 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 15 © 2007-2013 Creative Arts & Technologies
  • 16. What else do they have in common? All of them happened in Mobile, Real Time or Embedded systems! 16 © 2007-2012 Creative Arts & Technologies
  • 17. OSGi Measurement Package • • Namespace: 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 • 17 © 2007-2012 Creative Arts & Technologies
  • 18. JSR-256 Mobile Sensor API • • 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 use it, nor does Java ME Embedded) 18 © 2007-2013 Creative Arts & Technologies except Nokia still
  • 19. JSR-275 Units Specification • • Namespace: javax.measure.* Only one interface and one abstract class • • • Three sub-packages • • • 19 public interface Measurable<Q extends Quantity> public abstract class Measure<V, Q extends Quantity> quantity (holds dimensions mass, length) unit (holds the SI and NonSI units) converter (holds unit converters) © 2007-2012 Creative Arts & Technologies
  • 20. The King is Dead… Units of Measurement API • • Namespace: org.unitsofmeasurement.* Only interfaces (and exception classes) • • • Three sub-packages • • • 20 public interface Quantity<Q extends Quantity<Q>> public interface Unit<Q extends Quantity<Q>> quantity (holds dimensions mass, length,...) unit (holds units) service (holds services) © 2007-2012 Creative Arts & Technologies
  • 21. Eclipse UOMo One Small Step…
  • 22. Eclipse UOMo One Unit Framework to Measure them All • • Namespace: 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 Implementation • 22 Successor to Eclipse OHF UCUM Bundle © 2007-2012 Creative Arts & Technologies
  • 23. UOMo UCUM Unified Code for Units of Measure The Unified Code for Units of Measure is inspired by and heavily based on • ISO 2955-1983 • ANSI X3.50-1986 • HL7's extensions called ISO+ 23 © 2007-2012 Creative Arts & Technologies
  • 24. UOMo Business JSR 354 Implementation “Sisu” equivalent for 354 if you want • ICU4J based implementation of types like • • CurrencyConverter • ExchangeRate • 24 MonetaryAmount • • CurrencyUnit … Bridge to Unit-API where possible for cross-quantity arithmetic (e.g. “$ per gram CO² per mile”) © 2007-2013 Creative Arts & Technologies
  • 25. UOMo Examples DEMO
  • 26. Sensor Web | it? What is “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) 26 © 2007-2012 Creative Arts & Technologies
  • 27. Sensor Web | OpenGIS Standards • SW Enablement working group at OGC have developed a number of standards governing different aspects of Sensor Web OGC O&M Approved SensorML Sensor Model Language Approved TransducerML Transducer Model Language Approved OGC SOS Sensor Observations Service Approved OGC SPS Sensor Planning Service Approved OGC SAS Sensor Alert Service In progress OGC WNS 27 Observations & Measurements Web Notification Services In progress © 2007-2012 Creative Arts & Technologies
  • 28. Sensor Web | What is the OGC? • • • • Not-for-profit International industry consortium Founded 1994, currently 340+ members Open Standards development by consensus process OGC Mission To lead in the development, promotion and harmonization of open spatial standards … 28 © 2007-2012 Creative Arts & Technologies 28
  • 29. Sensor Web | Mozambique floods • • 29 The task under study is floods in different parts of the world Particular test case was flooding of Mozambique © 2007-2012 Creative Arts & Technologies
  • 30. 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: – – – 30 Stationary or dynamic Remote or in-situ Physical measurements or simulations © 2007-2012 Creative Arts & Technologies
  • 31. SensorML | Example .............. <inputs> <InputList> <input name="ambiantTemperature"> <swe:Quantity definition= "urn:ogc:def:phenomenon:temperature"/> </input> <input name="atmosphericPressure"> <swe:Quantity definition= "urn:ogc:def:phenomenon:pressure"/> </input> <input name="windSpeed"> <swe:Quantity definition= "urn:ogc:def:phenomenon:windSpeed"/> </input> </InputList> </inputs> .............. 31 © 2007-2012 Creative Arts & Technologies ............. <outputs> <OutputList> <output name="weatherMeasurements"> <swe:DataGroup> <swe:component name="time"> <swe:Time definition="urn:ogc:def:phenomenon:time“ uom="urn:ogc:def:unit:iso8601"/> </swe:component> <swe:component name="temperature"> <swe:Quantity definition="urn:ogc:def:phenomenon:temperature uom="urn:ogc:def:unit:celsius"/> </swe:component> <swe:component name="barometricPressure"> <swe:Quantity definition="urn:ogc:def:phenomenon:pressure“ uom="urn:ogc:def:unit:bar" scale="1e-3"/> </swe:component> <swe:component name="windSpeed"> <swe:Quantity definition="urn:ogc:def:phenomenon:windSpeed“ uom="urn:ogc:def:unit:meterPerSecond"/> </swe:component> </swe:DataGroup> </output> </OutputList> </outputs> .............
  • 32. M2M | Integrated Processes • Public/Private Cloud Deployment Infrastructures Logistics Transportation & Logistics Security & Surveillance Internet of Things Communication Medical & Healthcare 32 Infrastructure © 2007-2013 Creative Arts & Technologies Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0, Industrial & Energy
  • 33. M2M | Smart Container RFID e-Seal Example • • • • • • • • • 33 © 2005-2012 Creative Arts & Technologies, Prof. Jens Froese – TU Hamburg-Harburg 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
  • 34. Open ecosystem for M2M Third Party Ecosystem Open M2M application framework and runtimes … Open M2M communication protocols Open M2M development tools 34 © 2007-2013 Creative Arts & Technologies, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0 Internet of Things
  • 35. MQTT - Publish Subscribe Messaging 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 35 © 2007-2013 Creative Arts & Technologies, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0
  • 36. M2M | Gemalto – Wireless Modules 36 © 2007-2013 Creative Arts & Technologies, Gemalto
  • 37. NFC | Use Cases > Pass the gate NFC > NFC > > > 37 Read a map from interactive billboard Pay without cash Redeem coupons Get your Receipt NFC > Exchange photos © 2007-2012 Creative Arts & Technologies > Get your e-ticket
  • 38. NFC | Where to use this technology Toronto Payment: ISO 14443-B & ISO 15693 Denmark (Rejsekort), Sweden, Norway, SAS Smart Pass London Transport : ISO 14443A Moscow, St. Petersburg Metro Shenzen Transport : ISO 14443B Hong Kong Transport: FelicaTM San Francisco Transport: ISO 14443B Seoul Transport : ISO 14443A Tokyo Transport: FelicaTM Paris Transport : ISO 14443B US Access Control: ISO 15693 Chiuaua Driving License: ISO 15693 US Payment: ISO 14443-B & ISO 14443A Japan ID Card: ISO 14443B Dubai RTA New Delhi Transport:FelicaTM Pakistan Passport: ISO 14443B Singapore Transport : Felica, ISO 14443B Sao Paulo Transport: ISO 14443A 38 © 2007-2013 Creative Arts & Technologies
  • 39. NFC | Open NFC™ 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 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! 39 © 2007-2012 Creative Arts & Technologies
  • 40. Other Trends for Sensor | Measurement Xively • • Language bindings for Java/Android, Python or Ruby contain support for Units of Measurement Website: http://www.xively.com OpenXC • • Feels 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 3 • 40 Mostly UI/rendering, but promises almost UCUM-like arithmetic and quantity-checking See: http://www.w3.org/TR/css3-values/ © 2007-2012 Creative Arts & Technologies
  • 41. Embedded Standards | JSR-360, 361 2 current JSRs for Mobile and Embedded JSR-360: CLDC 8 • • CLDC 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 Profile • • 41 Update IMP(-NG) to align with state-of-the-art features and current embedded device market requirements. More: http://java.net/projects/jsr361/pages/Home © 2007-2012 Creative Arts & Technologies
  • 42. Q & A
  • 43. Links Eclipse – Project UOMo http://www.eclipse.org/uomo/ Units of Measurement API http://www.unitsofmeasurement.org UCUM http://www.unitsofmeasure.org
  • 44. Links (2) Open Geospatial Consortium http://www.opengeospatial.org Java Community Process http://www.jcp.org Eclipse – M2M IWG http://m2m.eclipse.org
  • 45. Contact werner@catmedia.us or uomo@catmedia.us Twitter: @wernerkeil Hashtag #EclipseUOMo