M4M 2 the Rescue of M2M - Eclipse DemoCamps Kepler 2013
Upcoming SlideShare
Loading in...5
×
 

M4M 2 the Rescue of M2M - Eclipse DemoCamps Kepler 2013

on

  • 2,718 Views

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.

Statistiken

Views

Gesamtviews
2,718
Views auf SlideShare
958
Views einbetten
1,760

Actions

Gefällt mir
0
Downloads
14
Kommentare
0

4 Einbettungen 1,760

http://www.eclipse.org 1672
http://eclipse.org 70
http://s462269038.website-start.de 16
https://twitter.com 2

Zugänglichkeit

Kategorien

Details hochladen

Uploaded via as Microsoft PowerPoint

Benutzerrechte

© Alle Rechte vorbehalten

Report content

Als unangemessen gemeldet Als unangemessen melden
Als unangemessen melden

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

Löschen
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Ihre Nachricht erscheint hier
    Processing...
Kommentar posten
Kommentar bearbeiten
  • Enabling new access to and uses of data

M4M 2 the Rescue of M2M - Eclipse DemoCamps Kepler 2013 M4M 2 the Rescue of M2M - Eclipse DemoCamps Kepler 2013 Presentation Transcript

  • M4M 2 the Rescue of M2MWerner KeilEclipse DemoCamp Copenhagen20th June 2013Standards forThe Internet ofThings
  • IN MEMORIAMDipl.-Ing. Erwin Keil13th October 1938 – 26th December 2012(He„d be honored to hear this DemoCamp is on Turbinevej)2 © 2007-2013 Creative Arts & Technologies
  • Overview• Introduction• Sensors• Historic IT Errors and Bugs• UOMo, Unit-API, UCUM• Sensor Web, SensorML• Demo• M2M• Use Cases, Framework, Protocols, Tools• NFC• Use Cases, Adoption, OpenNFC• New Embedded Java Standards• Q&A3 © 2007-2013 Creative Arts & Technologies
  • Who am I?4 © 2007-2013 Creative Arts & TechnologiesWerner Keil• Consultant – Coach• Creative Cosmopolitan• Open Source Evangelist• Software Architect• Java Godfather• UOMo Project Lead• Mærsk DevOps Guy…Email werner@catmedia.usTwitter @wernerkeil
  • Java Godfather?5 © 2007-2012 Creative Arts & Technologies
  • Measure for Measure6 © 2007-2013 Creative Arts & TechnologiesMistaking aPirate…Images © Copyright 2011 Getty Images
  • Measure for Measure7 © 2007-2013 Creative Arts & TechnologiesFor a heroof the story...Images © Copyright 2012 The Old Globe, San Diego CA
  • Measure for Measure8 © 2007-2013 Creative Arts & TechnologiesMistaking aDuke…
  • Measure for Measure9 © 2007-2013 Creative Arts & TechnologiesFor afriar...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 preferprimitive types over objects in their interface.•Primitive type arguments can more easily lead toname clashes (methods with the same signature)or other problems (“Auto-Boxing”,…)10 © 2007-2013 Creative Arts & Technologies
  • What do these disasters have in common?•Patriot MissileThe cause was an inaccurate calculation of the time since boot due to acomputer arithmetic error.•Ariane 5 ExplosionFloating point number which a value was converted from had a valuegreater than what would be represented by a 16 bit signed integer.• Gimli Glider (near disaster)Fuel loading was miscalculated through misunderstanding of the recentlyadopted Metric System, replacing the Imperial System in Canada11 © 2007-2012 Creative Arts & Technologies
  • • Mars OrbiterPreliminary findings indicate that one team used US/English units(e.g. inches, feet and pounds) while the other used metric units fora key spacecraft operation.• NASA lost a $125 million Mars orbiter because a Lockheed Martin engineering teamused English units of measurement while the agencys team used the moreconventional metric system for a key spacecraft operation• A credible source disclosed, there was a manual step with an outsourced person toconvert these calculations between the different teams, and NASA budget cuts causedthem to fire him and have the wrong, unpatched data transmitted!!!• This also underlines the added risk when 3rd party contractors are involved or projectsare developed OffshoreWhat do these disasters have in common?12 © 2007-2012 Creative Arts & Technologies
  • 23rd March 1983. Ronald Reaganannounces SDI (or “Star Wars”): ground-based and space-based systems toprotect the US from attack by strategicnuclear ballistic missiles.NASA “Star Wars” Initiative, 198313 © 2007-2012 Creative Arts & Technologies
  • 1985Mirror on underside ofshuttleSDI Experiment:The PlanBig mountain in Hawaii14 © 2007-2012 Creative Arts & Technologies
  • 1985SDI Experiment:What reallyhappened15 © 2007-2012 Creative Arts & Technologies
  • 16 © 2007-2012 Creative Arts & Technologies1985: Why it happened?
  • Unit Tests wouldn„t find these…• All previous examples illustrate three categories oferrors 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 name17 © 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 northernPoland?• ...• Wrong conversion factors:static final double PIXEL_TO_INCH = 1 / 72;double pixels = inches * PIXEL_TO_INCH18 © 2007-2013 Creative Arts & Technologies
  • ALL OF THEM HAPPENED INMOBILE, REAL TIME OREMBEDDED SYSTEMS!What else do they have in common?19 © 2007-2012 Creative Arts & Technologies
  • Measurement Package• Namespace: org.osgi.util.measurement• SI only Unit API “in the closet”• UnitEssentially an SI singleton holding relevant unit constants, too.• MeasurementRepresents a value with an error, a unit and a time-stamp.• StateGroups a state name, value and timestamp.• Some usage, especially in Automotive► no further development by OSGiOSGi20 © 2007-2012 Creative Arts & Technologies
  • • Namespace: javax.microediton.sensor*• Focusing on Sensors, but it got a minimalistic Unit API “inthe closet”• UnitEssentially 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► Dead Meat (few actual handsets and no vendorsexcept Nokia still use it, nor does Java ME Embedded)JSR-25621 © 2007-2013 Creative Arts & TechnologiesMobile Sensor API
  • • 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 mass, length)• unit (holds the SI and NonSI units)• converter (holds unit converters)JSR-27522 © 2007-2012 Creative Arts & TechnologiesUnits Specification
  • • 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)The King is Dead…23 © 2007-2012 Creative Arts & TechnologiesUnits of Measurement API
  • Eclipse UOMoOne Small Step…
  • 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 andothers (Android, GWT, Google Financial, etc.)• Prime UCUM Implementation• Successor to Eclipse OHF UCUM BundleEclipse UOMo25 © 2007-2012 Creative Arts & Technologies
  • Unified Code for Units of MeasureThe Unified Code for Units of Measure is inspired byand heavily based on• ISO 2955-1983• ANSI X3.50-1986• HL7s extensions called ISO+UOMo UCUM26 © 2007-2012 Creative Arts & Technologies
  • JSR 354 Implementation“Sisu” equivalent for 354 if you want• ICU4J based implementationof types like• CurrencyUnit• MonetaryAmount• CurrencyConverter• ExchangeRate• …• Bridge to Unit-API where possible for cross-quantityarithmetic (e.g. “$ per gram CO² per mile”)UOMo Business27 © 2007-2013 Creative Arts & Technologies
  • “A coordinated observation infrastructure composed of a distributed collection ofresources that can collectively behave as a single, autonomous, task-able,dynamically adaptive and reconfigurable observing system that provides raw andprocessed data, along with associated meta-data, via a set of standards-basedservice-oriented interfaces.” (Glenn, 2007)28 © 2007-2012 Creative Arts & TechnologiesSensor Web | What is it?
  • OGC O&M Observations & Measurements ApprovedSensorML Sensor Model Language ApprovedTransducerML Transducer Model Language ApprovedOGC SOS Sensor Observations Service ApprovedOGC SPS Sensor Planning Service ApprovedOGC SAS Sensor Alert Service In progressOGC WNS Web Notification Services In progressSensor Web | OpenGIS Standards• SW Enablement working group at OGC havedeveloped a number of standards governingdifferent aspects of Sensor Web29 © 2007-2012 Creative Arts & Technologies
  • 30Sensor Web | What is the OGC?• Not-for-profit• International industry consortium• Founded 1994, currently 340+ members• Open Standards development by consensus processOGC MissionTo lead in the development, promotion andharmonization of open spatial standards …30 © 2007-2012 Creative Arts & Technologies
  • Sensor Web | Mozambique floods•The task under study is floods in different parts ofthe world•Particular test case was flooding of Mozambique31 © 2007-2012 Creative Arts & Technologies
  • Sensor Web | Weather Prediction dataEUMetCastReceiving facilityEUMetCastEARS-AVHRREARS-ATOVSInternetMSGNOMADS LAADSData assimilationsubsystemNOMADSadapterLAADSadapterMODISGFSAccess nodeComputationalclustersGrid of SRIof NASU-NSAUVisualization subsystemUMNMapServerInternetOpenLayersMeteorologysubsystemWRFSI WRFProcessing subsystemSeaDASP, U10, V10Users ofmonitoring system32 © 2007-2012 Creative Arts & Technologies
  • SensorML• Sensor modeling language is the cornerstone ofall SW services• It provides comprehensive description of sensorparameters and capabilities• It can be used for describing different kind ofsensors:– Stationary or dynamic– Remote or in-situ– Physical measurements or simulations33 © 2007-2012 Creative Arts & Technologies
  • 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>...........................<outputs><OutputList><output name="weatherMeasurements"><swe:DataGroup><swe:component name="time"><swe:Timedefinition="urn:ogc:def:phenomenon:time“uom="urn:ogc:def:unit:iso8601"/></swe:component><swe:component name="temperature"><swe:Quantitydefinition="urn:ogc:def:phenomenon:temperatureuom="urn:ogc:def:unit:celsius"/></swe:component><swe:component name="barometricPressure"><swe:Quantitydefinition="urn:ogc:def:phenomenon:pressure“uom="urn:ogc:def:unit:bar" scale="1e-3"/></swe:component><swe:component name="windSpeed"><swe:Quantitydefinition="urn:ogc:def:phenomenon:windSpeed“uom="urn:ogc:def:unit:meterPerSecond"/></swe:component></swe:DataGroup></output></OutputList></outputs>.............34 © 2007-2012 Creative Arts & Technologies
  • DEMOSensor Examples
  • Transportation & Logistics LogisticsMedical &HealthcareIndustrial &EnergyCommunicationInfrastructureSecurity & SurveillancePublic/Private Cloud Deployment InfrastructuresInternetof ThingsM2M | Integrated Processes36 © 2007-2013 Creative Arts & Technologies Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0,
  • • 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 bytesM2M | Smart ContainerRFID e-Seal Example37 © 2005-2012 Creative Arts & Technologies, Prof. Jens Froese – TU Hamburg-Harburg
  • M2M | Smart Container (2)Technology38 © 2004-2012 Creative Arts & Technologies, Europe Container Terminals B.V.
  • Open ecosystem for M2MThird Party EcosystemOpen M2M applicationframework and runtimesOpen M2M communicationprotocolsInternet ofThingsOpen M2Mdevelopment tools…39 © 2007-2013 Creative Arts & Technologies, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0
  • protocolsframework toolsCopyright (c) 2013, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.040
  • hardware abstractionserver communicationapplication containerscripting engineframework toolsprotocolsCopyright (c) 2013, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.041
  • framework protocolsunreliable networkslimited bandwidthsemanticstoolsCopyright (c) 2013, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.042
  • toolsframework protocolsdevelopsimulatedebugdeployCopyright (c) 2013, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0 4343
  • 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/consumerMQTT - Publish Subscribe Messaging44 © 2007-2013 Creative Arts & Technologies, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0
  • ■ Push delivery of messages / data / events– MQTT – low latency push delivery of messages from client to server and serverto client• Helps bring an event oriented architecture to the web– HTTP – push from client to server but poll from server to client• Efficient use of network– For an M2M project the number of bytes with MQTT was 137130 bytes per device permonth with HTTP the number of bytes was 801000 bytes per device per month• Reliable delivery over fragile network– MQTT will deliver message to QOS even across connection breaks• Decoupling and publish subscribe – one to many deliverySource: http://stephendnicholas.com/archives/121745 © 2007-2013 Creative Arts & Technologies, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0Benefits of MQTT verses HTTP
  • M2M | Sierra Wireless at CPH Airport46 © 2007-2012 Creative Arts & TechnologiesTo ensure maximum safety for all passengers, Copenhagen Airportcontinuously monitors local weather conditions. In addition, airportoperations regularly measures weather-related runway conditions, suchas temperature and moisture, in order to store and analyze data and relaystatus and safety information to incoming flights.
  • M2M | Cinterion – Wireless Modules47 © 2007-2013 Creative Arts & Technologies, Gemalto
  • M2M | Cinterion – Wireless ModulesMTX-65 i, Mechanical & Electrical Specs48 © 2007-2012 Creative Arts & Technologies, Matrix Electronica, SL
  • • Allow save external hosts processor, space, powerconsumption…• Open application resources:• ARM© Core, Blackfin© DSP• Memory: 400 KB (RAM) and 1.7 MB (Flash)• Improved power-saving modes• Java™ features:• J2ME™ profile IMP-NG• Over-the-air update:• Application SW: OTAP• Firmware: FOTAFREE SDKM2M | Cinterion – Wireless ModulesMTX-65 i, 65+G, 65-ULP & IND : Java Embedded Applications49 © 2007-2013 Creative Arts & Technologies, Gemalto, Matrix Electronica, SL
  • M2M | Cinterion – Using Eclipse50 © 2007-2013 Creative Arts & Technologies, Gemalto
  • NFC51 © 2007-2013 Creative Arts & Technologies
  • NFC | StatsRegistered Mobile devices worldwide (Millions)52 © 2007-2012 Creative Arts & Technologies
  • Exchange photosGet your e-ticketPay without cashRedeem couponsGet your ReceiptNFCPass the gateRead a map frominteractive billboardNFCNFC53 © 2007-2012 Creative Arts & TechnologiesNFC | Use Cases
  • Chiuaua Driving License: ISO 15693Toronto Payment: ISO 14443-B & ISO 15693Sao Paulo Transport: ISO 14443ASingapore Transport : Felica, ISO 14443BParis Transport : ISO 14443BTokyo Transport:FelicaTMLondon Transport : ISO 14443ASan Francisco Transport: ISO 14443BShenzen Transport : ISO 14443BHong Kong Transport: FelicaTMSeoul Transport : ISO 14443AJapan ID Card: ISO 14443BUS Payment: ISO 14443-B & ISO 14443AUS Access Control: ISO 15693Pakistan Passport: ISO 14443BNew Delhi Transport:FelicaTMNFC | Where to use this technologyDubai RTACopenhagen Public Transport (Rejsekort), SAS Smart PassMoscow, St. Petersburg Metro54 © 2007-2013 Creative Arts & Technologies
  • Open NFC interfaces can be classified at different levels, from veryhigh-level interfaces that greatly simplify the usual tasks of NFCapplications, to very low-level interfaces that allow fine tuning of NFChardware parameters for example.High Level Interfaces:• NDEF Messages• Bluetooth and Wi-Fi pairing• Read / Write to any tag• P2P• Virtual TagsNFC | Open NFC™55 © 2007-2012 Creative Arts & TechnologiesStarting Open NFC 4.3.0, the support for Java porting for JSR-257devices is discontinued. Older releases of the stack were fully compliantwith the JSR-257 standard.► Android Edition is currently the only one actively maintained withJava Binding!
  • • 2 new JSRs for Mobile and Embedded• JSR-360: CLDC 8• CLDC 8 is an evolutionary update to CLDC 1.1.1 to bringthe VM, Java Language, and libraries up to datewith Java SE 8.• More: http://java.net/projects/jsr360/pages/Home• JSR-361: Java ME Embedded Profile• Update IMP(-NG) to align with state-of-the-art features and currentembedded device market requirements.• More: http://java.net/projects/jsr361/pages/HomeEmbedded Standards | JSR-360, 36156 © 2007-2012 Creative Arts & Technologies
  • Q & A
  • Eclipse – Project UOMohttp://www.eclipse.org/uomo/Units of Measurement APIhttp://www.unitsofmeasurement.orgUCUMhttp://www.unitsofmeasure.orgLinks
  • Eclipse – M2M IWGhttp://m2m.eclipse.orgOpen Geospatial Consortiumhttp://www.opengeospatial.orgJava Community Processhttp://www.jcp.orgLinks (2)
  • Contactwerner@catmedia.usoruomo@catmedia.usTwitter: @wernerkeilHashtag #EclipseUOMo