CamelOne 2013	June 10-11 2013	Boston, MA	1	Connecting ApplicationsEverywhere withActiveMQ	Rob Davies	Technical Director, F...
CamelOne 2013	CamelOne	2	Rob DaviesTechnical Director, Red Hat -h"p://www.redhat.com	■  Previously CTO of FuseSource - #1 ...
CamelOne 2013	CamelOne	 Why use Message-Oriented Middleware?	  Robustness	  to	  change	    Time	  Independence	    Loc...
CamelOne 2013	CamelOne	4	What is Apache ActiveMQ ?■ Top Level Apache Software Foundation Project	■ Wildly popular, high pe...
CamelOne 2013	CamelOne	Messaging: 	The Basics
CamelOne 2013	CamelOne	Message Channels andRouting	•  Message Channels	•  Named communication between interested parties	•...
CamelOne 2013	CamelOne	Message Channels = JMS Destinations	Producer	Broker	 Consumer	Consumer	Consumer	Destination	WIDGET	...
CamelOne 2013	CamelOne	Point-toPoint Channel: JMS Queues	Producer	Consumer	Consumer	Consumer	Queue
CamelOne 2013	CamelOne	Publish/Subscribe Channel: JMS Topics	Producer	Consumer	Consumer	Consumer	Topic
CamelOne 2013	CamelOne	 Message Routing :Selectors 	DestinationProducerConsumercolor=blueConsumercolor=red
CamelOne 2013	CamelOne	 Message Routing : DestinationWildcards	Topic:BAR.BEERConsumertopic:BAR.>Topic:BAR.WINEProducer
CamelOne 2013	CamelOne	Exclusive Consumers	Producer	Consumer	Consumer	Consumer	Queue
CamelOne 2013	CamelOne	Message Groups	Like Parallel Exclusive Consumers	■ Guaranteed ordering of related messages across a...
CamelOne 2013	CamelOne	14	Message Groups code:	Message message = session.createTextMessage("<foo>hi from Devoxx</foo>");	m...
CamelOne 2013	CamelOne	Deploying ActiveMQ	ActiveMQ Can run standalone or embedded	■ As a standalone, or part of a highly a...
CamelOne 2013	CamelOne	ActiveMQ: 	Message Storage
CamelOne 2013	CamelOne	Message Delivery Mode	•  Messages can be persisted – allowing fordecoupled applications	•  For Queu...
CamelOne 2013	CamelOne	 Message stores supported byActiveMQ 	■ SQL (JDBC)	■ SQL (JDBC) with journal	■ AMQ Message Store	■ ...
CamelOne 2013	CamelOne	LevelDB Store vs KahaDB	•  Fewer index entries per message than KahaDB	•  Faster recovery when a br...
CamelOne 2013	CamelOne	ActiveMQ: LevelDB Store
CamelOne 2013	CamelOne	ActiveMQ: 	Protocols
CamelOne 2013	CamelOne	OpenWire 	Advantages:	•  Fast – optimized forActiveMQ	•  client failover	•  automatic reconnect	•  ...
CamelOne 2013	CamelOne	MQTT http://mqtt.org	Advantages:	•  M2M/”Internet of Things” transport	•  Proposed as an OASIS stan...
CamelOne 2013	CamelOne	AMQP – see www.amqp.org	Advantages:	•  AMQP 1.0 OASISstandard	•  Proposed as an OASISstandard	•  Co...
CamelOne 2013	CamelOne	STOMP – http://stomp.github.com	Advantages:	•  Easy to use text basedprotocol	•  Can use telnet as ...
CamelOne 2013	CamelOne	But there’s more: WebSockets	STOMP is a natural wire protocol for WebSockets	26	ActiveMQClient(Brow...
CamelOne 2013	CamelOne	ActiveMQ: 	Management
CamelOne 2013	CamelOne	Command line:	•  Activemq	•  activemq-admin	•  activemq-admin stop	•  activemq-admin query	•  activ...
CamelOne 2013	CamelOne	ActiveMQ WebConsole	http://localhost:8161/admin	29
CamelOne 2013	CamelOne	Introducing hawtio …	30
CamelOne 2013	CamelOne	ActiveMQ: 	EnterpriseFeatures
CamelOne 2013	CamelOne	High Availability	ActiveMQ	Cluster	ActiveMQ Client	Supported by both Java and C++ OpenWire clients
CamelOne 2013	CamelOne	Broker Networks (Store andForward)
CamelOne 2013	CamelOne	 Network of Brokers : GeographicallyDispersed
CamelOne 2013	CamelOne	Network of Brokers : Network with Master/Slave
CamelOne 2013	CamelOne	Scaling Networks of Brokers	•  Brokers share routing information across networks	•  All destination...
CamelOne 2013	CamelOne	•  Brokers share routing information across networks	•  All destinations are considered Global	•  T...
CamelOne 2013	CamelOne	ActiveMQ with embedded Camel	ServiceConsumerConsumerActiveMQ BrokerFlexible and is faster J
CamelOne 2013	CamelOne	39	ActiveMQ with embedded Camel	beans	   broker brokerName=testBroker  xmlns=http://activemq.apache...
CamelOne 2013	CamelOne	40	Setup Camel Context in theusual way	beans	…	camelContext id=camel xmlns=http://camel.apache.org/...
CamelOne 2013	CamelOne	Scaling Networks – use Apache Camel	•  Allows for non-chatty networks to beestablished 	•  Routing ...
CamelOne 2013	CamelOne	More problemswith LargeDeployments
CamelOne 2013	CamelOne	 Problems – Deploying andmaintenance	•  Main problems	•  Installing brokers on multiple hosts	•  ss...
CamelOne 2013	CamelOne	 Problems – Traditional best-practice tips	•  Keep XML as a template and configure node-specificdetai...
CamelOne 2013	CamelOne	Problems - Clients	•  Topology is very “static”	•  Clients need to be aware of topology	•  Clients ...
CamelOne 2013	CamelOne	Fuse Fabric tothe rescue!
CamelOne 2013	CamelOne	Fuse Fabric – Key Features	Fuse	  IDE	  	   hawCo	  ActiveMQ	Cluster	Camel	Endpoints	ServiceMix	Run...
CamelOne 2013	CamelOne	FuseMQ features	•  mq-base profile	•  Defines OSGi features and bundles to be installed	•  Defines bas...
CamelOne 2013	CamelOne	 Why is Integration andMessaging Important ?	Head OfficeEnterprisesNeed toknowEverything!
CamelOne 2013	CamelOne	 There are more things toIntegrate with!
CamelOne 2013	CamelOne	The Internet of Things	•  Uniquely identifiable objects and their virtualrepresentations in an inter...
CamelOne 2013	CamelOne	Machine to Machine	•  M2M involves collection and transmission of eventlevel data (used to be calle...
CamelOne 2013	CamelOne	Internet of Things	Time	  Connected	  Devices	  on	  the	  internet	  2010	  2000	   2020	  1	  Bil...
CamelOne 2013	CamelOne	M2M Examples	•  Smart Energy –	Smart Grid uses smart meters for monitoring energy uses by premises ...
CamelOne 2013	CamelOne	M2M Topology	55	Gateway	Hadoop			Servers	Analytics	Gateway	Internet	Mesh Network	Mobile wireless
CamelOne 2013	CamelOne	Power Consumption!	•  Battery life for mobiles, power consumption forsmart devices is an important ...
CamelOne 2013	CamelOne	Deluge of Data	•  Billions of devices send information will requirestorage and processing of teraby...
CamelOne 2013	CamelOne	Need an Eco system of technologies 	Dev	•  Integration is getting harder	•  Traditional message bro...
CamelOne 2013	CamelOne	Demo Time!
CamelOne 2013	CamelOne	 Messaging through the Internet ofThings			ActiveMQ	AMQP/MQTT	routers	AMQP/MQTT	routers	AMQP/MQTT	r...
CamelOne 2013	CamelOne	Simplified demo	Java MQTT Client	AMQP	  MQTT	  ActiveMQ	MQTT/AMQP	Gateway	ActiveMQ	AMQP/OpenWire	Bro...
CamelOne 2013	CamelOne	What is Arduino ?	•  Open Source Hardware microcontroller	•  Cheap and easily available.	•  Open So...
CamelOne 2013	CamelOne	63	  USB7-12 v3 v GRD 5 v Analog Input PinsDigital Input/Output PinsPins with ~ are PWM[Analog Outp...
CamelOne 2013	CamelOne	Arduino Programming	•  3 types of memory on Arduino	•  Flash memory (program space) – 32 Kb	•  SRAM...
CamelOne 2013	CamelOne	Arduino MQTT to WebSockets	Arduino 	AMQP	  MQTT	  ActiveMQ	MQTT/AMQP	Gateway	ActiveMQ	AMQP/WebSocke...
CamelOne 2013	CamelOne	Useful Resources:	•  http://activemq.apache.org	•  http://camel.apache.org 	•  http://fuse.fusesour...
Upcoming SlideShare
Loading in …5
×

Connecting Applications Everywhere with ActiveMQ

12,931 views

Published on

How ActiveMQ can be used to connect the "Internet of Things"

Published in: Technology
  • Be the first to comment

Connecting Applications Everywhere with ActiveMQ

  1. 1. CamelOne 2013 June 10-11 2013 Boston, MA 1 Connecting ApplicationsEverywhere withActiveMQ Rob Davies Technical Director, Fuse Engineering, Red Hat Inc.
  2. 2. CamelOne 2013 CamelOne 2 Rob DaviesTechnical Director, Red Hat -h"p://www.redhat.com ■  Previously CTO of FuseSource - #1 OSvendor for integration and messaging ■  Software projects: ■  Apache ActiveMQ, ■  Apache Camel ■  Apache ServiceMix ■  On  Expert  Group  for  JSR  343:  JMS  2.0  ■  Co-­‐author  of  AcCveMQ  in  AcCon:  
  3. 3. CamelOne 2013 CamelOne Why use Message-Oriented Middleware?   Robustness  to  change    Time  Independence    LocaCon  Independence    Hide  Latency    Scalability    Event  driven    Simplicity    Configurable  Quality  of  Service    PlaRorm  and  Language  IntegraCon    Fault  tolerant    
  4. 4. CamelOne 2013 CamelOne 4 What is Apache ActiveMQ ?■ Top Level Apache Software Foundation Project ■ Wildly popular, high performance, reliable messagebroker ■ Connects to nearly everything ■ Native Java, C/C++, .Net, ■ AMQP 1.0, MQTT 3.1, STOMP (1.0-1.2) andOpenWire ■ STOMP enables Ruby, JS, Perl, Python, PHP,ActionScript … ■ Embedded and standalone deployment options
  5. 5. CamelOne 2013 CamelOne Messaging: The Basics
  6. 6. CamelOne 2013 CamelOne Message Channels andRouting •  Message Channels •  Named communication between interested parties •  JMS calls them ‘Destinations’ •  Can “tune-in” to multiple channels using wildcards •  Can fine-tune message consumption with selectors •  Can route a message based on content
  7. 7. CamelOne 2013 CamelOne Message Channels = JMS Destinations Producer Broker Consumer Consumer Consumer Destination WIDGET Destination ORDER
  8. 8. CamelOne 2013 CamelOne Point-toPoint Channel: JMS Queues Producer Consumer Consumer Consumer Queue
  9. 9. CamelOne 2013 CamelOne Publish/Subscribe Channel: JMS Topics Producer Consumer Consumer Consumer Topic
  10. 10. CamelOne 2013 CamelOne Message Routing :Selectors DestinationProducerConsumercolor=blueConsumercolor=red
  11. 11. CamelOne 2013 CamelOne Message Routing : DestinationWildcards Topic:BAR.BEERConsumertopic:BAR.>Topic:BAR.WINEProducer
  12. 12. CamelOne 2013 CamelOne Exclusive Consumers Producer Consumer Consumer Consumer Queue
  13. 13. CamelOne 2013 CamelOne Message Groups Like Parallel Exclusive Consumers ■ Guaranteed ordering of related messages across aQueue ■ But – load balancing of messages across multipleconsumers ■ All messages with the same JMSXGroupID go tothe same consumer ■ How you group messages is down to the application’sproducer ■ To explicitly close a group, set the JMSXGroupSeqto -1 13
  14. 14. CamelOne 2013 CamelOne 14 Message Groups code: Message message = session.createTextMessage("<foo>hi from Devoxx</foo>"); message.setStringProperty("JMSXGroupID", ”RHT_NYSE"); producer.send(message); Message message = session.createTextMessage(foobye from Devoxx/foo); message.setStringProperty(JMSXGroupID, ”RHT_NYSE); message.setStringProperty(JMSXGroupSeq, -1); producer.send(message);//Starting a Group …//Close a Group …
  15. 15. CamelOne 2013 CamelOne Deploying ActiveMQ ActiveMQ Can run standalone or embedded ■ As a standalone, or part of a highly available messagebroker cluster ■ Embedded – easy to use an entire broker in JUnit tests(no need to Mock) ■ In Tomcat, deployed as a war ■ In JEE Server – either co-locate – or use client with JCA ■ ActiveMQ distributions contain a rar for this purpose 15
  16. 16. CamelOne 2013 CamelOne ActiveMQ: Message Storage
  17. 17. CamelOne 2013 CamelOne Message Delivery Mode •  Messages can be persisted – allowing fordecoupled applications •  For Queues, any message delivered asPERSISTENT must be stored on long term storagebefore being delivered to a consumer •  For Topics, a message delivered as PERSISTENTwill only be stored if there exists a durable subscriber •  NON-PERSISTENT messages may also be storedon disk if the memory limits of the broker have beenreached 17
  18. 18. CamelOne 2013 CamelOne Message stores supported byActiveMQ ■ SQL (JDBC) ■ SQL (JDBC) with journal ■ AMQ Message Store ■ Kaha ■ KahaDB ■ LevelDB 18 Slow butpopular Don’t use(deprecated) The “current”default The “best yet”
  19. 19. CamelOne 2013 CamelOne LevelDB Store vs KahaDB •  Fewer index entries per message than KahaDB •  Faster recovery when a broker restarts •  LevelDB index out-perform Btree index at sequential access . •  LevelDB indexes support concurrent read access. •  Pauseless data log file garbage collection cycles. •  Fewer IOPS to load stored messages. •  It exposes its status via JMX for monitoring
  20. 20. CamelOne 2013 CamelOne ActiveMQ: LevelDB Store
  21. 21. CamelOne 2013 CamelOne ActiveMQ: Protocols
  22. 22. CamelOne 2013 CamelOne OpenWire Advantages: •  Fast – optimized forActiveMQ •  client failover •  automatic reconnect •  Client load balancing •  Flow control •  Many advanced features 22 Disadvantages: •  Not a recognizedstandard •  Only Java, C/C++/.Net http://activemq.apache.org/openwire.html
  23. 23. CamelOne 2013 CamelOne MQTT http://mqtt.org Advantages: •  M2M/”Internet of Things” transport •  Proposed as an OASIS standard •  Extremely light weight •  Growing support from vendors and OSproducts •  WebSphereMQ •  ActiveMQ + Apollo •  Mosquitto •  RabbitMQ 23 Disadvantages: •  3.1 does not supportQueues •  Advanced features notstandard •  Flow control •  Failover etc.
  24. 24. CamelOne 2013 CamelOne AMQP – see www.amqp.org Advantages: •  AMQP 1.0 OASISstandard •  Proposed as an OASISstandard •  Commoditizes theBroker 24 Disadvantages: •  One size doesn’t really fitall •  Currently no plans for IBMor Tibco to adopt it
  25. 25. CamelOne 2013 CamelOne STOMP – http://stomp.github.com Advantages: •  Easy to use text basedprotocol •  Can use telnet as a client •  Defacto standard: •  ActiveMQ + Apollo •  HornetQ •  RabbitMQ •  PocoMQ •  StompServer •  OpenMQ •  Many more … 25 Disadvantages: •  Not as fast as binaryformats
  26. 26. CamelOne 2013 CamelOne But there’s more: WebSockets STOMP is a natural wire protocol for WebSockets 26 ActiveMQClient(Browser)WebSocketConnectorStompConverterActiveMQ(Backend)TCP(WebSocket)HTTP(S)Request/Response1. HTTP Request (Upgrade)2. HTTP Response4. Message receivedfrom Topic5. Send WebSocketData3. Stomp Subscribe
  27. 27. CamelOne 2013 CamelOne ActiveMQ: Management
  28. 28. CamelOne 2013 CamelOne Command line: •  Activemq •  activemq-admin •  activemq-admin stop •  activemq-admin query •  activemq-admin bstat •  activemq-adminbrowse •  activemq-admin list 28 Runs thebroker Manages thebroker
  29. 29. CamelOne 2013 CamelOne ActiveMQ WebConsole http://localhost:8161/admin 29
  30. 30. CamelOne 2013 CamelOne Introducing hawtio … 30
  31. 31. CamelOne 2013 CamelOne ActiveMQ: EnterpriseFeatures
  32. 32. CamelOne 2013 CamelOne High Availability ActiveMQ Cluster ActiveMQ Client Supported by both Java and C++ OpenWire clients
  33. 33. CamelOne 2013 CamelOne Broker Networks (Store andForward)
  34. 34. CamelOne 2013 CamelOne Network of Brokers : GeographicallyDispersed
  35. 35. CamelOne 2013 CamelOne Network of Brokers : Network with Master/Slave
  36. 36. CamelOne 2013 CamelOne Scaling Networks of Brokers •  Brokers share routing information across networks •  All destinations are considered Global •  This is really convenient •  Though it starts to get problematic with 1000’s ofbrokers •  However – we can do filtering to shape the trafficacross networks •  But this involves a lot of manual configuration 36  crikey!   
  37. 37. CamelOne 2013 CamelOne •  Brokers share routing information across networks •  All destinations are considered Global •  This is really convenient •  Though it starts to get problematic with 1000’s ofbrokers •  However – we can do filtering to shape the trafficacross networks •  But this involves a lot of manual configuration 37 Time to talk aboutApache Camel … Scaling Networks of Brokers
  38. 38. CamelOne 2013 CamelOne ActiveMQ with embedded Camel ServiceConsumerConsumerActiveMQ BrokerFlexible and is faster J
  39. 39. CamelOne 2013 CamelOne 39 ActiveMQ with embedded Camel beans    broker brokerName=testBroker  xmlns=http://activemq.apache.org/schema/core     transportConnectors       transportConnector uri=tcp://localhost:61616/     /transportConnectors   /broker   import resource=camel.xml/ /beans Import Camel into ActiveMQ broker config:
  40. 40. CamelOne 2013 CamelOne 40 Setup Camel Context in theusual way beans … camelContext id=camel xmlns=http://camel.apache.org/schema/spring route descriptionExample Camel Route/description from uri=activemq:topic:audio/ setHeader headerName=JMS_AMQP_MESSAGE_FORMAT constant0/constant /setHeader to uri=activemq:queue:audio/ /route /camelContext … /beans
  41. 41. CamelOne 2013 CamelOne Scaling Networks – use Apache Camel •  Allows for non-chatty networks to beestablished •  Routing information can be externalized tothe broker •  Successfully used in production for 1000’sof brokers today 41
  42. 42. CamelOne 2013 CamelOne More problemswith LargeDeployments
  43. 43. CamelOne 2013 CamelOne Problems – Deploying andmaintenance •  Main problems •  Installing brokers on multiple hosts •  ssh, untar, set directories and environment •  Setting configuration manually for every broker •  copying xml config, tweaking, testing •  Updating configuration across cluster •  Upgrading brokers It’s a tedious and error-prone process
  44. 44. CamelOne 2013 CamelOne Problems – Traditional best-practice tips •  Keep XML as a template and configure node-specificdetails through properties •  Keep configuration in SVC system (git, svn, ...) •  Keep configuration separate from installation foreasier upgrades Deployment with Fuse Fabric moves it to the nextlevel
  45. 45. CamelOne 2013 CamelOne Problems - Clients •  Topology is very “static” •  Clients need to be aware of topology •  Clients need to know broker locations •  Changes are not easy as clients need to be updated •  Adding new resources (brokers) requires client updates •  Not suitable for “cloud” deployments Fuse Fabric makes deployments more “elastic”
  46. 46. CamelOne 2013 CamelOne Fuse Fabric tothe rescue!
  47. 47. CamelOne 2013 CamelOne Fuse Fabric – Key Features Fuse  IDE     hawCo  ActiveMQ Cluster Camel Endpoints ServiceMix Runtime Registry •  Supports Hybrid deployments •  Distributed Configuration •  Runtime registry •  Centralized Management
  48. 48. CamelOne 2013 CamelOne FuseMQ features •  mq-base profile •  Defines OSGi features and bundles to be installed •  Defines basic broker settings •  mq-create command •  Helper command for creating brokers •  Creates an new profile based on mq-base •  Optionally creates new containers •  Assigns the profile to containers (essentially starts the broker) FuseMQ = ActiveMQ deployed in Apache Karaf +
  49. 49. CamelOne 2013 CamelOne Why is Integration andMessaging Important ? Head OfficeEnterprisesNeed toknowEverything!
  50. 50. CamelOne 2013 CamelOne There are more things toIntegrate with!
  51. 51. CamelOne 2013 CamelOne The Internet of Things •  Uniquely identifiable objects and their virtualrepresentations in an internet-like structure •  Originally defined by Kevin Ashton, co-founder ofAuto-ID center at MIT •  Today its meaning has evolved to encompass aworld where physical objects are integrated into theinformation network, and where physical objectsparticipate in business processes. 51
  52. 52. CamelOne 2013 CamelOne Machine to Machine •  M2M involves collection and transmission of eventlevel data (used to be called telemetry) fromintelligent devices •  Machines can interact over the net – and/orattached networks – by wired and wirelessnetworks •  Payloads are typically minimal (temperature,pressure, location, metering etc.) 52
  53. 53. CamelOne 2013 CamelOne Internet of Things Time  Connected  Devices  on  the  internet  2010  2000   2020  1  Billion  50  Billion  10    Billion  Ubiquitous  posiConing  –  locaCng  people  and  everyday  objects    RFID  tags  for  Inventory  control  Advanced  sensors,  Enterprises  fully  connected:  integraCon  of  everything  Geo-­‐located  devices  Microcontrollers  internet  enabled  Vending  machines,  lone  workers,  POS,  vehicles,  planes,  tolls,  power  systems,  transport,  telemedicine,    home  appliances,  power  systems,  etc.  
  54. 54. CamelOne 2013 CamelOne M2M Examples •  Smart Energy – Smart Grid uses smart meters for monitoring energy uses by premises for billing,substation and transmission line monitoring, energy production (renewables) •  Inventory Control – smart labels and RFID tags – connected scanners pass information upstream toservers for monitoring •  In-Vehicle Systems Maintenance information, global positioning, ‘black-box’ (speed and drivinghabits), wireless payments for tolls/gas •  Environmental Monitoring Weather stations (temperature, air-pressure), ocean monitors, earthmovements, volcanic activity crop yields etc. •  Livestock monitoring Cow herds, monitored for optimum time for milking, sheep herds for location 54
  55. 55. CamelOne 2013 CamelOne M2M Topology 55 Gateway Hadoop Servers Analytics Gateway Internet Mesh Network Mobile wireless
  56. 56. CamelOne 2013 CamelOne Power Consumption! •  Battery life for mobiles, power consumption forsmart devices is an important consideration. •  Facebook use MQTT for real-time updates –efficiency was one of the things considered •  MQTT is more efficient at establishing connections,sends information more reliably, and consumes lesspower to transmit data than HTTP. 56
  57. 57. CamelOne 2013 CamelOne Deluge of Data •  Billions of devices send information will requirestorage and processing of terabytes or evenpetabytes of data. •  Big Data Ingestion: Processing of vast amounts ofdata business generates to make good decisions isonly half the problem. Ingesting that data from allareas of the enterprise will require TBs of data to beingested in highly reliable and scalable way. 57
  58. 58. CamelOne 2013 CamelOne Need an Eco system of technologies Dev •  Integration is getting harder •  Traditional message brokers arekey to connect “everything” •  Multiple protocols need to besupported •  Camel can provide integration atthe edges – and the data center •  Technologies like Fuse Fabricprovide centralized provisioning andmanagement •  Need to mix protocols, brokers and“message routers” to scale FuseMQ Clusters ArrivalAirport 1
  59. 59. CamelOne 2013 CamelOne Demo Time!
  60. 60. CamelOne 2013 CamelOne Messaging through the Internet ofThings ActiveMQ AMQP/MQTT routers AMQP/MQTT routers AMQP/MQTT routers MQTT  MQTT-­‐S  AMQP  AMQP  AMQP  MQTT  MQTT  websockets  
  61. 61. CamelOne 2013 CamelOne Simplified demo Java MQTT Client AMQP  MQTT  ActiveMQ MQTT/AMQP Gateway ActiveMQ AMQP/OpenWire Broker JMS OpenWire Client
  62. 62. CamelOne 2013 CamelOne What is Arduino ? •  Open Source Hardware microcontroller •  Cheap and easily available. •  Open Source Software. •  Widespread: many projects. •  Extra HW (shields) available (e.g. WiFi shield)
  63. 63. CamelOne 2013 CamelOne 63  USB7-12 v3 v GRD 5 v Analog Input PinsDigital Input/Output PinsPins with ~ are PWM[Analog Output]GRDTransmitter/ReceiverSerial ConnectionMicrocontroller ATmega328 OperatingVoltage 5V InputVoltage (recommended)7-12V InputVoltage (limits)6-20V Digital I/O Pins 14 (of which 6 provide PWM output) Analog Input Pins 6 DC Current per I/O Pin 40 mA DC Current for 3.3V Pin 50 mA
  64. 64. CamelOne 2013 CamelOne Arduino Programming •  3 types of memory on Arduino •  Flash memory (program space) – 32 Kb •  SRAM – used by sketches – 2 Kb •  EPROM – long term memory – 1 Kb •  Programming language based on Wiring: C/C++ librarydesigned to make input/output easier. Programs arecalled sketches. •  Arduino has a simple IDE, available on Windows, Linuxand Mac
  65. 65. CamelOne 2013 CamelOne Arduino MQTT to WebSockets Arduino AMQP  MQTT  ActiveMQ MQTT/AMQP Gateway ActiveMQ AMQP/WebSockets Broker HTML 5/WebSockets
  66. 66. CamelOne 2013 CamelOne Useful Resources: •  http://activemq.apache.org •  http://camel.apache.org •  http://fuse.fusesource.org/fabric/docs/overview.html •  http://fuse.fusesource.org/mq/docs/mq-fabric.html •  https://github.com/fusesource/fuseide •  http://hawt.io •  http://www.arduino.cc/ Messaging andIntegrationDeveloper toolingManagementConfiguration andprovisioningArduino

×