Alles miteinander verbinden - Voraussetzung für das Internet
Transcrição
Alles miteinander verbinden - Voraussetzung für das Internet
Alle s mite ina nde r ve rbinde n Vora us s e tzung für da s Inte rne t de r Dinge , M2M und Indus trie 4.0 Renate Franken, IBM D eutschland GmbH Arpad Vasarhelyi, D B Systel GmbH The Internet of Things – Das Internet der Dinge Video Viele digitale Einheiten instrumentieren unsere Welt bereits heute Verknüpft die virtuelle mit der realen Welt „In 2020 ist alles miteinander verbunden, geschätzte 60 Milliarden Smart Devices“ Gartner 2 Wir bauen einen smarten Planeten + Instrumeted + Interconnected = Intelligent Die Herausforderung neu zu denken und zu handeln— ökonomisch, sozial und technisch. 3 3 WebSphere und das ‘Internet der Dinge’ Internet der Dinge - Mobile Devices HTTP/REST MQTT - Embedded Controler - Sensor - Actuators MQTT Cast Iron IBM DataPower Intelligence: Cognos, ILOG,SPSS, WebSphere Business Events, BPM, … IBM Mobile First / Worklight z.B. TCP/IP IBM Integration Bus (ehemals WebSphere Message Broker) IBM WebSphere MQ IBM MessageSight WebSphere MQ Telemetry MQTT MQ Server is used for scale + Firewall MQ JMS HTTP WebService MQ/JMS/HTTP + = Enterprise Applications Agenda • • • • • • C onte x t – Da s Inte rne t de r Dinge Te c hnology – MQT T – MQ Te le me tr y Tra ns por t – We bS phe re MQ Te le me tr y De mo IB M Me s s a ge S ight Us e C as es We bS phe re MQ Te le me tr y E rfa hrunge n be i de r De uts c he n B a hn Schlüsselfaktoren von MQ Telemetry Transport – MQTT Protokoll ■ Die MQTT Spezifikationen sind offe n http://www.ibm.com/developerworks/webservices/library/ws-mqtt/index.html ■ K le in, reduziert die Komplexität und Systemanforderungen ■ E infa c h / minimale pub/sub Nachrichten Semantik Asynchrone (“push”) Nachrichtenauslieferung an Anwendungen – Einfache Aufrufe wie connect, publish, subscribe und disconnect. – ■ Minima lis ie rte Nachrichtenübertragungslänge Protokoll mit komprimiert mit bit-wise Header und variablem Längenfeld – Kleinste mögliche Nachricht ist 2 Bytes. – Byte Array Nachrichteninhalt ohne zusätzlichen Anwendungsheader – ■ Eingebaute U nte rs tützung be i Ve rbindungs a bbruc h . “Last will and testament” wird publiziert wenn die Client Verbindung abbricht – Stateful “roll-forward” Semantik und “durable” Subskriptionen. – Qualities of Service Drei Quality of Services publizierter und subskribierter Nachrichten QoS 0: At most once delivery (non-persistent) • Keine Wiederholversuche sind im Portokoll definiert. • Die Nachricht wird höchstens einmal geschickt, die Nachricht kommt entwerder einmal an oder nie QoS 1: At least once delivery (persistent, dups possible) – Client schickt Nachricht mit Message ID im header – Server bestätigt mit einer PUBACK Nachricht – Message wird wiederholt geschickt mit einem DUP bit gesetzt falls keine PUBACK erhalten wurde QoS 2: Exactly once delivery (persistent) – Zusätzlicher Nachrichtenaustausch um Sicherzustellen dass die Nachricht nicht dupliziert geschickt wird – Server bestätigt mit einer PUBREC Nachricht – Client entläßt die Nachricht mit einer PUBREL Nachricht – Server bestätigt Abschluß mit einer PUBCOMP Nachricht MQTT Fixed Header Message Types Quality of Service Levels Remaining Length Protocol limits the number of bytes in the representation to maximum of four. This allows applications messages of up to 268 435 455 (256 MB). WebSphere MQ Telemetry – implementiert MQTT • WebSphere MQ Telemetry integriert mit WebSphere MQ Publizierer und Subskribtoren können über MQI oder JMS Nachrichten austauschen Out of the box installierbar ab MQ7.1 Basic Basic Telemetry Telemetry Client Client Ist hoch skallierbar An einen MQ Queue Manager können über 240,000 gleichzeitig verbundene Devices angebunden werden Wird mit 2 verschiedene Clients ausgeliefert: • Basic • direkte Verbindung von einem Device Advanced – Deamon for Devices Agiert als “Konzentrator/Hub” for kleine Telemetry Device Netzwerke Kann sich zu mehreren Backend Server verbinden Unterstützt alternativen Backendserver im Fehlerfall Kann Nachrichten zwischenspeichern oder locale Devices verbinden Backend Backend Server Server WebSphere MQ MQXR Zusätzlich kann jeder third party oder Open Source MQTT Client verwendet werden – unterstützt MQTT v3.1 Protokoll Umfangreiche Sicherheit • Networkverschlüsselung: SSL • Authentifikation: JAAS • Authorisierung: OAM MQ Telemetry Daemon for Devices Advanced Advanced Telemetry Telemetry Client Client MQ Explorer Integration Example: connect and send an MQTT message public void sendAMessage() throws MqttException { MqttProperties mqttProps = new MqttProperties(); mqttProps.setCleanStart( true ); MqttClient client = MqttClientFactory.INSTANCE. createMqttClient("testClient", “tcp://localhost:1883”, mqttProps); client.registerCallback(this); client.connect(); client.publish(“abc/123”, new MqttPayload((“Hello World!”).getBytes(),0), (byte) 2, false); Create a connection using the connection factory, this time for a clean starting client Register the class as a listener and connect to the broker Publish a message to the given topic and disconnect client.disconnect(); } public void publishArrived(String topicName, MqttPayload payload, byte qos, boolean retained, int msgId) { } System.out.println(“Got it!”); On receipt of a publication, simply print out a message on the console to say we received it HTTP und MQTT Vergleich bzgl. Datentransfer MsgFlow C = Client S = Server HTTP Bytes C -> S S -> C MQTT (Data) Bytes Connect 20 4 -> 101200064D51497364700302001E00046D717474 Connack (Server Acknowlege) <20020000 C -> S Send Msg POST http://192.168.177.211:7080/httptest HTTP/1.1 Content-Length: 7 Content-Type: text/xml; charset=utf-8 Host: 192.168.177.211:7080 SOAPAction: "" Connection: keep-alive X-Remote-Addr: 192.168.177.1 X-Remote-Host: 192.168.177.1 X-Server-Name: 192.168.177.211 X-Server-Port: 7080 X-Scheme: http Message 316 Publish Msg: 3A0F0004706F737400016D657373616765 17 (66) POST /post HTTP/1.1 Host: localhost Content-Length: 7 message S -> C Ackn Back HTTP/1.1 200 OK Content-Type: text/xml;charset=utf-8 Content-Length: 7 Date: Mon, 10 Oct 2011 20:08:00 GMT Server: Apache-Coyote/1.1 Message 147 (75) Pubback (server Acknowlege for QoS1) 40020001 4 Disconnect: E000 2 HTTP/1.1 200 OK Date: Mon, 10 Oct 2011 20:08:00 GMT Content-Length: 0 C -> S T ota l 463 (141) 47 MQT T w ith Mobile F irs t Work light MQTT for JavaScript Worklight Hybrid app - HTML5, CSS, JavaScript, Images messaging Worklight Common javascript Controls Javascript API JavaScript to native Bridge (PhoneGap) Worklight MQTT plugin API Worklight API Device API Device APIs m2m MQTT PhoneGap plugin built on IBM contributed eclipse paho eclipse.org/paho 13 Easy to try out! Really small message broker: http://www.alphaworks.ibm.com/tech/rsmb Download rsmb-1.2.0.zip Unzip Run nohup ./broker >> /dev/null & Play with C client utils, code, and be merry! Available for Linux IA32, IA64 kernel 2.6.8+; Linux on IBM System z; Linux for ARM XScale, kernel 2.0.0+ (Crossbow Stargate or Eurotech Viper); Windows XP; Mac OS X Leopard; Unslung (Linksys NSLU2) – Binary only, request other platforms from IBM Broader integration Simple Lightweight (CPU,Mem,**Net) Data-centric Distribution (pub/sub) Range of QoS => developer/community interest! MQTT - Open Community Initiatives ■ MQTT has been an open royalty free protocol for a number of years to assist ease of adoption by device vendors and third-parties - http://mqtt.org/ ■ In August 2011, ■ ■ Eurotech and IBM announced their intention to take the MQTT specification to a formal standards organisation – see http://mqtt.org/2011/08/open-invitation-to-join-the-mqtt-standardization-discussion In Nov 2011, ■ The formation of a new M2M Industry Working Group at the Eclipse Foundation, with Sierra Wireless, Eurotech and IBM as founding members, to work on growing and scaling device connectivity solutions with open source tools, frameworks and runtimes http://wiki.eclipse.org/Machine-to-Machine ■ IBM announced the donation of the MQ’s MQTT Java and C MQTT clients to the newly form Eclipse Paho project http://eclipse.org/paho Agenda • • • • • • C onte x t – Da s Inte rne t de r Dinge Te c hnology – MQT T – MQ Te le me tr y Tra ns por t – We bS phe re MQ Te le me tr y De mo IB M Me s s a ge S ight Us e C as es We bS phe re MQ Te le me tr y E rfa hrunge n be i de r De uts c he n B a hn “re s pons e time = re ve nue ” Amazon says 100ms de la y c os ts 1% reve nue Google says +0.5 second drops us e r tra ffic 20% • Retailer discovered ha lving re s pons e time inc re a s e d online reve nue 219% S low dow ns cost 2x more revenue than outages Marissa Mayer said of Google’s performance: "U s e rs re a lly re s pond to s pe e d. S pe e d ma tte rs . Pe ople do not like to w a it. Do not ma ke the m.” Latency is everywhere and it costs you sales sources: gomez, strangeloopnetworks IBM MessageSight appliance for MobileFirst & M2M Simplifies “Internet of things”, connected car, and mobile Designed for millions things, millions of events, very dense, very green technology m2m engineered for wireless, with low latency, reliable delivery and quality of service 93x faster, 10x less battery, 8x lower bandwidth versus HTTPS 1 rack does 273M messages/sec, 21M concurrent connections (like 1,000 web servers) Source: http://stephendnicholas.com/archives/1217 20 IB M Me s s a ge S ight for mobile a nd m2m millions of connections MQTT million of events very dense, very green WebSocket & MQTT 1 rack = 1,000 web servers 93x faster messaging on mobile 11.89x less battery to send 170.9x less battery to receive 8x less wireless overhead 50µs app-to-app on fast networkn HTML5 WebSocket IBM MessageSight Content pub / sub Insurers Live Demo InfoSphere Streams OEM Apps MQ Demo video Agenda • • • • • • C onte x t – Da s Inte rne t de r Dinge Te c hnology – MQT T – MQ Te le me tr y Tra ns por t – We bS phe re MQ Te le me tr y De mo IB M Me s s a ge S ight Us e C as es We bS phe re MQ Te le me tr y E rfa hrunge n be i de r De uts c he n B a hn “C onne c te d C a r” for te le ma tic s , infota inme nt a nd mobile predicts part failure Find my car schedules appointment with car owner vibration detected, publishes details Unlock my car Smartcar “C onne c te d Pa tie nt” – more e ffe c tive c a re a t S t J ude Me dic a l Clinicians remotely monitor & adjust 100,000+ heart pacemakers via MQTT Better quality of life with fast response and fewer office visits source: sjm.com “Mobile B a nk ing” opt-in for fa s te r notific a tions & tra ns a c tions Low-latency notifications with strong security, customer connects directly Avoids QoS, reliability, security, and cost of 3rd party push “Opt-in, Opt-out” via simple subscribe from w/in mobile app Opt-in alerts Account management 600M mobile users, highly rated app, very fast, very low battery use MQTT is core to Messenger. Now used in in Facebook Mobile too Facebook Messenger FACEBOOK (567, 240) Verizon Wireless Overall Rating Security Battery Consumption Data Usage source: http://support.verizonwireless.com/information/app_ranking/apps/facebook-messenger.html Facebook Messenger Lucy Zhang, a software engineer at Facebook, has written about their new Facebook Messenger app: “One of the problems we experienced was long latency when sending a message. The method we were using to send was reliable but slow, and there were limitations on how much we could improve it. With just a few weeks until launch, we ended up building a new mechanism that maintains a persistent connection to our servers. To do this without killing battery life, we used a protocol called MQTT that we had experimented with in Beluga. MQTT is specifically designed for applications like sending telemetry data to and from space probes, so it is designed to use bandwidth and batteries sparingly. By maintaining an MQTT connection and routing messages through our chat pipeline, we were able to often achieve phone-to-phone delivery in the hundreds of milliseconds, rather than multiple seconds.” 27 Mein Stromzähler 28 Das Display (über USB Kabel verbunden) 29 Mein Stromverbrauch zu Hause mit Android Anbindung “C onne c te d Home ” Channel changes get sent to HQ HQ sends targeted advertisin g back Subscribed TV, shows incoming call Millions of these homes subscribing & publishing events to head office Head Office R e a ltime P re dic tive Ma inte na nc e 30,000 low-power sensors and controllers Storage Temperature Pressure Refineries 17,000km pipeline network Spill location Flow rate operations center apps analyze to sensor event streams and respond Typical SCADA Architecture (1) Polling-based protocols are used for communications Polling creates latency inhibiting company response to leaks Tight coupling between field equipment and SCADA host systems Makes it difficult to change devices or to share information beyond the host SCADA Host High cost of communications and data storage Drives companies to limit the amount of data they collect in their historian database Historian Poll RTU RTU Flow Computer Flow Computer Flow Computer PLC P T P RTU PLC Response L F PLC = Programmable Logic Controller RTU = Remote Terminal Unit Typical SCADA Architecture (2) Asset Managers ERP Custom programs are used for every data pull creating high costs as well as high risk of security breaches. Historian SCADAPoHost ll EFM Flow Computer Flow Computer RTU RTU Historian SCADA PollHost RTU ETMS Historian Partner Access Enterprise Domain SCADA Poll HostRTU RTU Data Warehouses RTU P Flow Computer L F T Flow Computer Flow Computer Flow Computer Flow Computer PLC Flow Computer P T L F T L F P RTU PLC P Flow Computer P Response PLC P PLC PLC RTU RTU PLC Response Response Operatio Domain IBM Smarter SCADA Centralized Data Warehouse / Historian Centralized Event Correlation Enterprise Asset Management Mobile Dashboards DECOUPLE SCADA DEVICES from their hosts so that information can flow wherever it is needed SCADA Hosts USE BETTER DEVICE PROTOCOLS that eliminate polling, drive lower latency, and ensure a nonproprietary approach ENSURE SECURITY so that data access is tightly and centrally controlled PROVIDE EVENT CORRELATION across domains. Smarter SCADA Externalized Web API Services Push Smarter Data Routing Smarter Event Correlation Smarter Security EFM Push Flow ERP Enterprise Domain Telemetry Hosts Computer ETMS Push Smarter Device Protocols Flow Computer RTU P T L F P Push Smarter Device Protocls RTU P T L F P RTU PLC Smart Sensor Network PLC Smart Sensor Network RTU PLC Operation Domain American Petroleum Institute 1164 SCADA Security Requirements SCADA architectures using MQTT have been reviewed by the 1164 committee and could become a recommended “best practice” architecture. Satellite Hub Firewall DMZ MQTT Brokers VSAT IDU MQTT Gateway Ethernet and/or Serial PLC Network PSTN Modem PSTN Flowcomputer Network Typical Field Location 36 SCADA Network Cell Modem Business Network : Leader in Connectivity.....Again! in Connectivity & Integration market share* Over 10,000 customers worldwide and growing! Report: IBM Named Marketshare Leader in Application Infrastructure and Middleware Software for 12 Consecutive Years “ IBM (NYSE: IBM) today announced that based on Gartner's definition of the application infrastructure and middleware market, IBM has once again been named the overall marketshare leader.” April, 2013 * Source: “IBM Named Marketshare Leader in Application Infrastructure and Middleware Software for 12 Consecutive Years” http://www-03.ibm.com/press/us/en/pressrelease/40807.wss 37 Agenda • • • • • • C onte x t – Da s Inte rne t de r Dinge Te c hnology – MQT T – MQ Te le me tr y Tra ns por t – We bS phe re MQ Te le me tr y De mo IB M Me s s a ge S ight Us e C as es We bS phe re MQ Te le me tr y E rfa hrunge n be i de r De uts c he n B a hn WebSphere MQ Telemetry Referenz – DB Systel GmbH Arpad Vasarhelyi Software Architekt DB Systel GmbH WebSphere MQ Telemetry bei der Deutschen Bahn für Dynamische Schriftanzeiger Quelle: Deutsche Bahn Nachrichten Anforderung, Lösung und Benefits • Anforderung: Anbindung der DSA • Lösung: WebSphere MQ Telemetry • Benefits: – Erhebliche Kosteneinsparung bzgl. Datenübertragungskosten zu den DSA Devices – Remote Zugriff auf die Devices -> Kosteneinsparung vs. Vor-Ort Wartung • Erfahrungen mit WebSphere MQ Telemetry Weitere Links WebSphere MQ Telemetry http://www-03.ibm.com/software/products/us/en/wmq-telemetry/ IBM MessageSight http://www-03.ibm.com/software/products/us/en/messagesight/ MQTT 3.1 specification – IBM developerWorks http://www.ibm.com/developerworks/webservices/library/ws-mqtt/index.html WebSphere MQ Telemetry Performance Evaluation – SupportPac MP0A http://www-01.ibm.com/support/docview.wss?rs=171&uid=swg24027711&loc=en_US&cs=utf-8&lang=en MQTT Community http://mqtt.org Fragen ? IBM Deutschland GmbH Renate Franken IBM-Allee 1 Client Technical Professional 71139 Ehningen IBM Software Group Tel +49-172 - 7313 217 [email protected] http://twitter.com/#!/Renate_Franken 43 Thank you!