O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

IoT gateway dream team - Eclipse Kura and Apache Camel

5.837 visualizações

Publicada em

Eclipse Kura is the well recognized field gateway for Internet Of Things applications. Apache Camel is the message routing engine and the library containing a gazillions of the various endpoint connectors. Are you interested in finding out how these two can be joined together to create a rocking IoT solution? Then tune in to this talk!

Publicada em: Tecnologia
  • Entre para ver os comentários

IoT gateway dream team - Eclipse Kura and Apache Camel

  1. 1. Broughttoyou byHenrykKonsek IoTgatewayDreamTeam EclipseKuraandApacheCamel
  2. 2. @hekonsek
  3. 3. RunningApacheCamelintheEclipseKuraOSGicontainer. Thistalk
  4. 4. ● EclipseKura ● ApacheCamel ● WhyCamel+Kura? ● HowCamel+Kura? ● Demo Thistalk
  5. 5. OSGi-basedIoTgatewayforthefielddevices. WhatisEclipseKura?
  6. 6. OSGi-basedIoTgatewayforthefielddevices. WhatisEclipseKura? OSGi ● modularitysystemforJava ● providesmodulesclasspathseparation ● promoteshotruntimeredeployments
  7. 7. OSGi-basedIoTgatewayforthefielddevices. WhatisEclipseKura? IoTgateway ● collectsmessagesfromtheedgedevices(likesensors) ● performsmessages processing/aggregation/forwarding
  8. 8. OSGi-basedIoTgatewayforthefielddevices. WhatisEclipseKura? IoTgateway ● collectsmessagesfromtheedgedevices(likesensors) ● performsmessages processing/aggregation/forwarding
  9. 9. OSGi-basedIoTgatewayforthefielddevices. WhatisEclipseKura? IoTgateway ● collectsmessagesfromtheedgedevices(likesensors) ● performsmessages processing/aggregation/forwarding
  10. 10. OSGi-basedIoTgatewayforthefielddevices. WhatisEclipseKura?
  11. 11. GatewayTL;DR; Gateway Theproxybetweenfielddevicesandthedatacenter
  12. 12. Eurotech(http://eurotech.com) Who’sbehindKura?
  13. 13. Themessageroutingframework. WhatisApacheCamel?
  14. 14. Howtoorchestratemessagesflow. Whatismessagerouting? ● ApacheCamel ● SpringIntegration ● Mule
  15. 15. ReadmessagefromJMSqueue.TransformtoJSON.SavetoFTPandMongoDB. CrashcoursetotheApacheCamel from('jms:invoices'). transform { new Invoice(uuid(), it.in.body) }. marshal().json(Jackson). multicast().parallelProcessing(). to('ftp:myftp.com/invoices', 'mongodb:myDb?collection=invoices&operation=save') ]
  16. 16. IhavemyfancyKuragatewayalready.DoIneedCamel? HowcanKurabenefitfromCamel?
  17. 17. Camelprovides~200OSGi-readyconnectors(JMS,REST,CoAP,AMQP,MQTT…) HowcanKurabenefitfromCamel?
  18. 18. EnterpriseIntegrationPatterns(EIP) HowcanKurabenefitfromCamel?
  19. 19. Preventsmessagesoverflow. EIP-throttler
  20. 20. ProvidesSLAforthedifferentchannels. EIP-throttler
  21. 21. Dynamicallydecidewheretoroutethemessage. EIP-contentbasedrouter
  22. 22. Clientsideloadbalancing.Usefulforfielddevicesconnectivity. EIP-loadbalancer
  23. 23. Howcangatewayprovidetransaction-likebehavior whenconnectingtothenon-transactionalservice? EIP-idempotentconsumer
  24. 24. HowcanIcontrolwhichpartsofthefielddevice shouldberunningatthegivenmoment? EIP-controlbus
  25. 25. CamelOSGibundleisstartedfromtheKura. Kura+Camel:architecture
  26. 26. InvokeRESTmethodeverysecond. CamelroutemoduleforKura public class MyKuraRouter extends KuraRouter { @Override public void configure() throws Exception { from("timer:trigger"). to("netty-http:http://app.mydatacenter.com/api"); } }
  27. 27. Don’tbe! Concernedaboutthedeployment?
  28. 28. Don’tbe! Concernedaboutthelifecycle?
  29. 29. Don’tbe! ConcernedabouttheOSGiservicesaccess?
  30. 30. JustdeploytherouteastheOSGibundleandenjoyCamelrunningtheKura. Don’tbeconcerned!
  31. 31. DisplayWiFinetworksaccessiblenearthefielddeviceusingthewebbrowser. Fancyexample#1 public class MyKuraRouter extends KuraRouter { @Override public void configure() throws Exception { from("netty-http:http://0.0.0.0:18080"). to("bean:org.eclipse.kura.net.NetworkService?method=getAllWifiAccessPoints"); } }
  32. 32. https://github.com/camel-labs/camel-labs CamelLabsKuracomponents
  33. 33. StartsyncingcacheddataonlywhenWiFiisaccessible. Fancyexample#2 public class MyKuraRouter extends KuraRouter { @Override public void configure() throws Exception { from("kura-wifi:wlan0/mySSID"). to("controlbus:route?routeId=onlineSync&action=start"); from("file:///var/sensor/temperature"). routeId("onlineSync").autoStartup(false). to("netty4-http://api.mydatacenter.com"); } }
  34. 34. Thankyou! ● EclipseKura-https://eclipse.org/kura ● ApacheCamel-http://camel.apache.org ● EnterpriseIntegarationPatterns-http://www. enterpriseintegrationpatterns.com ● CamelKura-http://camel.apache.org/kura ● CamelIoTLabsKuraextensions-https://github. com/camel-labs/camel-labs/tree/master/iot#camel-kura- wifi-component ● democode-https://github.com/hekonsek/camel-kura- wifi-demo

×