WP2 - T2.1 - Automatic configuration based on hardware modules
-
Upload
agile-iot -
Category
Technology
-
view
151 -
download
0
Transcript of WP2 - T2.1 - Automatic configuration based on hardware modules
WP1- T2.1LEADER: ETH
INVOLVEDPARTNERS: CN, RULEMOTION, TUGRAZ, L IBEL IUM
AGILEATHENSMEETING,14-15April2016,ATHENSGR
TaskSummaryT2.1- Automaticconfigurationbasedonhardwaremodules
Duration:M0-M6
Objectives:◦ implement themechanismsthatwillallowtheAGILEgatewaytobeauto-configuredbasedonthehardwaremodulesactivatedbytheuser;
◦ collectrequirementsfortherecommenderbasedonthehardwaremodules tobesupported.
Status:◦ conceptsdefinition, architectureandfunctionalities:almostfinished;◦ requirementsandknowledgeidentification:nextstep;◦ D2.1deliverablepreparation:nextstep.
Deadlines:◦ M9- D2.1CorerequirementsspecificationandIoT protocolintegration-Rulemotion - Report-Public
AGILEKICK-OFFMEETING,12-14January2016,TrentoIT
AutomaticconfigurationandrecommenderrolesTwomainroles:◦ manageHWmodularity;◦ contributemanaginggatewaydeployment.
ManageHWmodularity:dependingontheHWmodulesconnectedtothegatewayautomaticallyconfigurethedrivers;selectandconfigurethecorrespondingAGILEmodules.Managegatewaydeployment:thegatewaycanbedeployedindifferentcontexts,bothintermsofenvironmentandverticalapplication.Thegatewayprovidetotherecommenderinformationaboutthedeploymentcontext,therecommenderselectaconfiguration/sdependingonthecontextandsendit/themtotheautoconfig thatinturnsappliestheconfiguration.Whatistherelation betweentheautoconfig andtherecommender?◦ Therecommendersuggestsasetofsolutions toaconfiguration issue.◦ Theautoconfig selectsoneofthesuggestedsolutionsandappliesit.
RolesoftherecommenderRoleoftherecommender:◦ recommendsapplications andworkflows;◦ recommendsconfigurations;◦ recommendsperipherals(tobediscussed).
Application:◦ dependingontheHWmodulesselects/suggests theAGILESwmodulestobedownloaded,installedandstarted;
◦ dependingonthespecificcontextselects/suggests theAGILESw modulestobedownloaded,installedandstarted.
◦ dependingontheGWprofileandWorkflowitems,suggestaWorkfloworNodetodeveloper.
Workflows:TDB
Rolesoftherecommender(2)Configuration:◦ dependingontheHWmodulesselects/suggests thebestconfigurationtobeadoptedfordriversandSWmodules;
◦ dependingonthespecificcontextselects/suggests thebestconfigurationtobeadoptedfordriversandSw modules.
Recommenderworksafterthebootphase, inuserspace.
RolesoftheautoconfigurationAuto-configurationsupport:◦ atboottime;◦ atruntime.
Atboot:◦ fordevicedriversitisalreadyprovidedbytheOS;◦ attheendofthebootprocess,afterenteringtheuserspace,theAGILESWModulesareautomaticallyconfiguredbyautoconfig.(thisisdonebyConfigurator)
Atruntime:configuresdriversandAGILEModules.◦ Rpi Shieldscurrentlydoesn’t supporthotplug/swap.Itispossible tosupport itwithspecifichardwaremodificationoftheShield(basedonabuffertomanagethesignalsduringhotplug/swap),passingUART,I2C,etc.through theshieldandmonitoring withadaemonaspecificI/Oline;
◦ alwayssupportedbyperipheralsbasedonenumerableinterfaces(USB,Bluetooth,etc..).
◦ ExceptforUSB,theindustrialgatewaydoesn’tneedhotswapperipherals,thereforeitdoesn’tneedauto-configurationatruntime.
DriversandAGILEmodulesmanagementWerefer toamodelwhereanyHWmoduleismanagedbyasubsystemlogicallycomposedbytwocomponents:◦ adevicedriver(OS-Kernellevel);◦ aspecificapplication(application level,userspace,anAGILEmodule).
Twoclassesofperipherals:◦ standardHWmodules(hotplugnotsupported);◦ HWmodulesbasedonenumerable interfaces(hotplugsupported).
Therecommendermanagesthreedifferent situations:◦ peripheraltype1->1driver->1AGILEModule;◦ peripheraltype2->1driver->1AGILEModule;◦ peripheraltype2->1driver->nAGILEModule.
DriversandAGILEmodulesmanagement(2)
AGILEPlatformOperatingSystem
HWModule Categories HWmodules basedon “enumerable” interfaces
Hotplug/hot swap
AGILEModule
AGILEModule
AGILEModule
AGILEModule
AGILEModule
Devic
edrive
r
Devic
edrive
r
Devic
edrive
r
StandardHWModules
SATA
drive
r
StorageModule
WIFI
drive
r
NetworkingModule
ComExpress, PCI,etc.. USB,Bluetooth, Zigbee, SATA(withbackplane), etc..
Zigbe
edriv er
WSN tempmodule
WSN opticmeas.module
WSNpressuremodule
E.g.interfaces/peripherals
WSNcoordinatormodule
1 2 3
DriversandAGILEmodulesmanagement(3)Case1:◦ TheHWmodulemustbeconnectedbeforeboot,hotplugnotsupported.◦ TheHWmodule issupportedbyaspecificdriveravailablelocally;thekernelloadthedriverautomaticallywithdefaultconfiguration.
◦ OnlyanAGILEModulecorrespondstotherequireddriver.Ifnotavailablelocally,therecommendersimplyidentifyitandcommunicateittogateway.
Case2:◦ WhentheHWmodule isconnectedtothegatewaythekernelmanagesitwiththedriveralreadyloaded(e.g.USB).
◦ OnlyanAGILEModulecorrespondstotherequireddriver.Ifnotavailablelocally,therecommendersimplyidentifyitandcommunicateittogateway.
◦ Ifnotavailablelocallythegatewaydownloadsthemodule.Themoduleisstartedwithdefaultconfiguration.
DriversandAGILEmodulesmanagement(4)Case3:◦ WhentheHWmoduleisconnectedtothegatewaythekernelmanagesitwiththedriveralreadyloaded(e.g.Zigbee viaUSB).
◦ DependingontheHWmoduleasetofAGILEmodulesareavailable.Therecommender identifythemostsuitablesetofAGILEmodulesandinformthegateway(e.g.aZigbee coordinatorandaZigbee application).
◦ Ifnotavailablelocallythegatewaydownloadsthemodules suggested.Themodulesarestartedwithdefaultconfiguration.
Case1,2,3):◦ dependingonthedeploymentcontextandtheapplication,therecommendermightsuggestaconfiguration forthedriver(autoconfig)andfortheAGILEModule.Theseconfigurationareappliedatendofthebootphase(fordrivers)andwhentheAGILEmodulesarerunning.
◦ Atruntime, ifthecontextchanges,therecommendercansuggestnewconfigurationsofdriversorAGILEmodules.
◦ Atruntime, ifthecontextchanges,therecommendercansuggestnewAGILEmodules tobedownloadedandstarted(dowesupport this?).
Autoconfig/recommenderSWcharacterizationHowtheautoconfig/recommendercanbecharacterizedfromasoftwarepointofview?
Theautomaticconfiguration:◦ handledbothbyOSandConfigurator◦ locatesatoperatingsystemlevel.◦ Itcouldbeimplemented asaOSdaemon.
Itrunsonthegateway.◦ Therecommender:◦ locatesatapplication level.◦ ItrunsonthegatewayanditisanAGILEmodule.◦ Coulditbeaserverapplicationrunningremotely?Onthecloud?
Autoconfig/recommenderSWcharacterization(2)Recommender:◦ contentbasedandcollaborativealgorithmscanbeapplieddependingontheusecasesandknowledgebase.
Configurator:◦ thebasicversioncanbebasedonaruleengineorConstraintSolver;◦ dependingontheusecases:◦ wecanadoptthebasicversion;◦ wecanextendthebasicversionwithamoreautonomoussolutionbasedonlearning,semantic,AI,…technologies.
Abstractionlevels
HARDWARE
FIRMWARE
OS
APPLICATION
JAVAVM
OSGi Framework
KuraFramework
KuraApplication
APPContainer APPContainer…
Application Application
Kernel
HOTSWAPPERIPHERALS PLUG&PLAYPERIPHERALS(e.g.USB)
Drivers
Libraries AUTOCONFIG
RECOMMENDER
Gatewayoffline
AGILEGateway
Conf.s&ModulesRepository
Recommender
Autoconfig
Gatewayconnected toaLAN(1)
AGILEGateway
AGILEGateway
AGILEGateway
AGILEGateway
Gatewayconnected toaLAN(2)
Conf.s &ModulesRepository
LAN LAN
Gatewayconnected toaLAN(3)
AGILEGateway
AGILEGateway
AGILEGateway
Conf.s &ModulesRepository
Recommender
LAN
AGILEGateway
AGILEGateway
AGILEGateway
AGILEGateway
Recommenderusagescenarios
Gatewayonline (1)
InternetAGILEGateway
AGILEGateway
AGILEGateway
Gatewayonline (2)
InternetAGILEGateway
AGILEGateway
Conf.s &ModulesRepository
Gatewayonline (3)
Internet
AGILEGatewayAGILEGateway
Conf.s &ModulesRepository
Recommender
Recommenderusagescenarios(2)
Topologyofthesolutiondecidedafterusecasedescriptionisavailable◦ 1stversionbasedoncloudrecommender◦ “Autonomous”version(autoconfig,recommender&knowledgebaseonthegateway)ismandatory
◦ Thebestsolutionisprobably:Gatewayonline(1)+gatewayonline(3):◦ itcoversbothofflineandonlinesituations;◦ itisscalableandflexible;◦ itcoversmanypotentialrequirementsofusecases.
Recommenderusagescenarios(3)Whenthegatewayisoffline,itshouldbeasmuchautonomousaspossible:◦ therecommender runsonthegateway;◦ arepositoryofconfigurationsandmodules isinstalledonthegateway.
WhenthegatewayisconnectedtoaLAN:◦ itcouldbeusedasinanofflinesituation;◦ alternatives:
◦ therecommenderisasoftwarerunningonaserverontheLAN,orinalocalprivatecloud;◦ asinglerepositorycouldbeavailableontheLAN.
Whenthegatewayisconnectedtotheinternet:◦ itcouldbeusedasinanofflinesituation;◦ alternatives:
◦ therecommenderisasoftwarerunningontheinternet,oronthecloud;◦ configurationsandmodules arestoredinoneormoreremoterepositories.
Recommenderusagescenarios(4)Scenariosthatjustifyahighlevelofautonomyforthegateway:◦ Inatransportationapplication,withdifferentconnectivityoptions(3G,HSDPA,Wifi hotspots,etc..)thegatewayshouldselect autonomously,dependingonthegeographicalpositionandavailableconnectivity,thebestcommunicationchannel(intermsofprice,connection,etc.)
◦ Onacruise linerasetofgatewaysisconnectedtotheshipLAN.Theshipsometimes isconnectedtothe internetsometimes not.Thegatewayscouldbefullyautonomouslyorcouldrelyonasharedlocalrepositoryandasharedrecommenderthat,inturns,couldrunonalocalcloud.
◦ …
Autoconfig/RecommenderfootprintConsideringthehardwareresourcesavailableonthetwoversionsofthegateway,therecouldbepotentialissuesrelatedtothefootprintoftheautoconfig/recommender:◦ theindustrialgatewayprovidesaIntelAtomclasscpu,atleast1GbofRAMandatleast16Gbofstorage.
◦ ThelimitationandconstraintsoftheRpi havetobeevaluated.◦ Accordingtotheusecases(whenandwhattorecommend/configureaccordingtowhat)andknowledgebases(size,howtoupdate,owner,location),ConfiguratorandRecommenderEngines locationandworkingprinciplescanbedecided.
GatewayprofileTheprofilecontains:◦ InstalledApps(Snappyapplications)◦ InstalledandDevelopedWorkflowsandNodes◦ Pluggeddevices(sensorsandcomm.devices)◦ Contextinformation(gw usecase:cruise,field,etc.)
Theprofileisstored:◦ locallyinthegateway;◦ thegatewayshares/publishes itsprofilewithAGILEservertobeusedforrecommendationsforotherGateways;(userconsentcanbeasked)
◦ distributed/remote storageofprofiles.
Requirements&KnowledgebaseRequirementsandknowledgebasewilldefinedincollaborationwithWP8:◦ T2.1managesknowledgebaseandhastheoverallviewoftherequirementsandknowledgebasedefinition:◦ specifieshorizontaltechnical,architecturalandfunctionalrequirements;◦ explainshowknowledgebasemustbedescribedandprovideanexample;◦ overviewstheknowledgebase“creation”.
WP8Usecaseownershavetodefine:◦ identifies autoconfig &recommenderrequirementsforspecificusecases;◦ theknowledgebaseforspecificusecases(HW,SW,Context).
WP1&WP2contributecreatingtheknowledgerelatedtothegatewayHWandOS(horizontalaspects).
Deadlines&versionsplanningM6:D2.1“descriptionofmechanismsdeveloped/integrated thatwillenabletheautomaticconfigurationofthegatewaybasedonthehardwaremodulesattachedeverytime”
M9:D2.2“initialversionofthemechanismsintegratedanddevelopedfortheself-cofinguration ofthegateway”
M12:1stautoconfig/recommenderscenario,recommenderisoutsidethegatewayoronasimulatedgateway
M18:D2.3“FinalversionofGatewaySelf-configuration”
M24:(AGILEFullSWstack)sophisticatedsolutionforrecommenderandautoconfig
M30:versionintegratedwithusecase/s
KnowledgeBases
ProposalInPhase-1,allknowledgebasesarelocatedonserver.RecommenderandConfiguratorarealsoexecutedonserverside.APIsofthoseknowledgebasesshouldbespecifiedbythedataowners.Recommender onGateway,operates onimported apps andWorkflows.If profiles of other users are included,recommendationshould be remote.
InPhase-2,someoftheknowledgebasescanbelocatedlocallyonthegateway.Somefunctionalities ofRecommenderandConfiguratorcanbealsoexecutedonthegatewaylocally.ThisPhaseprovidesanOFFLINEfunctionalityofRecommenderandConfigurator.(CruiseGatewaysmayrequiresuchofflineusages)
RecommenderRole-1RecommendApps(snaps)
UsesAppknowledgebase,otherGw ProfilesandownGw Profile
Case:WhenaIoT userwanttoseerecommendedappsontheAGILEManagementInterface,RecommendershouldusetheGw profile(whichsensorsareplugged?,etc.),otherpeopleGw profiles(whichappsareinstalledonsimilarlyconfiguredGws?,etc.)tosuggestsomeappstoinstall.
Case:Whenanewdeviceplugged,RecommendercanrecommendarelatedapplicationtotheuserviaManagementInterface.
RecommenderRole-2RecommendWorkflows
UsesGWprofileandworkflowknowledgebase
Case:WhenonAGILEDevelopmentInterfaceadeveloper isdevelopinganewworkflowusingTemperatureSensor,developermaywanttoseetherecommendednodesandflows.Inthatcase,currentGWProfile(whataretheotherpluggeddevices?,etc.)andworkflowknowledgebase(whatarepossiblenodesandflowsthatuseTemperatureSensorandmaybealsootherpluggeddevices together)willbeusedbytheRecommender tosuggestaNodeorFlowtothedeveloper.
Case:Whenadeveloper isdevelopingaworkflowusingSensor1,recommendercanrecommendtopluganduseSensor2thatiswidelyusedwithSensor1byothersimilarworkflows.
RecommenderRole-3RecommendConfigurations
UsesotherAGILEGWprofiles
Case:Whenawifi moduleisplugged,theremaybealsozigbee andBLEmodulespluggedbefore.Forsomeapps,all3optionscanbepossible.Forbestconfiguration,ConfiguratormayaskRecommender toselectanappropriateoneaccordingtootherGWconfigurations.
ConfiguratorRole-1ConfigureDriversConfiguratorcomesintoplaywhenkernelfailstoconfigureadriverofapluggeddevice.OSrequestsforanappropriatedriverforthenewdevicefromtheConfigurator.UsestheFeatures ofDriversandGatewayProfile◦ Driver1supports temperaturesensors◦ GatewayhasDriver2.
UsestheConstraintsofDrivers◦ Driver1isnotcompatiblewithDriver2.
UsestheDomains◦ Driverscanbeinstates(Loaded,NotLoaded,Installed,NotInstalled).
WhenmorethanonesolutionsisfoundbyConfigurator,tobeabletoselectbestsolutionRecommenderistriggered.RecommenderreturnsbestsolutionbacktoConfigurator.
ConfiguratorRole-2ConfigureAppsUsestheFeatures ofAppsandDevices(featuresoftheinstalledapps,whichsensorsordevicesarecompatibleorincompatible)◦ App1canuseWifi,ZigbeeorBLE.◦ App1hasTemperatureMeasuringFeature.◦ App1hasPressureMeasuringFeature.◦ App2canonlyuseWifi.◦ Zigbee cannotworkifWifi isinuse.◦ BLEcanworktogetherwithZigbee andWifi.◦ TemperatureSensor1doesnotworkifTemperatureSensor2isinuse.
UsestheConstraints ofGateway(whichactionshould betakeninwhichmode)◦ WhenNormalModeisenabled,thenenableWifi onapps.◦ WhenEnergySavingModeisenabled,thenenableBLEonappsanddisableothercommunicationprotocols.◦ WhenSecurityRestrictionModeisenabledonthegateway,disableallconnectionsontheinstalledapps.◦ WhenWifi hardwaremoduleisplugged,thenenablethecommunicationprotocolasWifioninstalledappsanddisablecurrent
protocol.◦ WhenTemperatureSensorisplugged,thenenabletheTemperatureFeatureofrelatedapps.◦ WhenWifi isunplugged,thenenableZigbee orBLEonrelatedapps.
UsestheDomains◦ Afeatureofanappcanbe(Disabled,Enabled).◦ Ahardwaremodulecanbe(Plugged,Unplugged).◦ Gatewaycanbeina(Normal,EnergySaving,SecurityRestricted)mode.
GatewayProfilesAGILEGatewayprofilescanbesharedwithacentralizedservertobeusedbyRecommender.Profilesshouldbeclassifiedaccordingtotheirsimilaritiesontheserver.ThereshouldbeaRecommendationAlgorithmrunningontheservertobeabletousetheseprofilesandrecommendsolutionstotheGateways.Aprofilecontains:◦ InstalledApps(Snappyapplications)◦ InstalledandDevelopedWorkflowsandNodes◦ Pluggeddevices(sensorsandcomm.devices)◦ Contextinformation (gw usecase:cruise,field,etc.)
Aprofileisstored:◦ locallyonthegateway;◦ thegatewayshares/publishes itsprofilewithAGILEservertobeusedforrecommendations forotherGateways;(userconsentcanbeasked)
◦ distributed/remotestorageofprofiles.
OpenQuestion-1CollectionGatewayProfilesonServerCanwecollectGw Profilesonaserver?
Gw Profilesonserver shouldbeclassifiedaccordingtosimilarities.Analgorithmshouldberunonserver.Willthereaserveravailable?
ShouldweaskconsentofusertoshareownGw Profilewithserverasanonymous?
IfuserdoesnotallowtoshareGw Profilewithserver, shouldwestillsupportthatuserwithrecommendationsusingotherGw Profilesornot?
OpenQuestion-2WorkflowKnowledgebaseWherewillitbelocated?
Howtoaccessit?
Whatkindoffeatures arestored?
Whencanwehaveasampleknowledgebase?
Whoisresponsiblewithdevelopingthisknowledgebase?
OpenQuestion-3SnapKnowledgebaseWherewillitbelocated?
Howtoaccessit?
Whatkindoffeatures arestored?
Whencanwehaveasampleknowledgebase?
Whoisresponsiblewithdevelopingthisknowledgebase?
OpenQuestion-4DriverConstraintsandFeaturesWherewillitbelocated?
Howtoaccessit?
Whatkindoffeatures arestored?
Whencanwehaveasampledata?
Whoisresponsiblewithdevelopingthisdata?
OpenQuestion-5AppsConstraintsandFeaturesWherewillitbelocated?
Howtoaccessit?
Whatkindoffeatures arestored?
Whencanwehaveasampledata?
Whoisresponsiblewithdevelopingthisdata?
OpenQuestion-6ConfiguringAppsHowtoconfigureanapp?AnappshouldbeconfigurablebyAgileSW.ThismeansanappshouldprovideanAPIforAgileSWtoconfigureit.◦ Suggestion:ThiscanbedonebyaddingaConfigurationEngineNode,duringaworkflowdevelopment.
Whatkindofinfocanberequested fromappdeveloper inConfigurationNode?◦ Suggestion:Optionaldevicestouse.(oneofgiventhecommunicationdevicescanbeusedaccordingtotheavailabilityontheGw anduserpreferences:Wifi,zigbee orBLE.
ContactinfoT2.1LeaderEurotech
PaoloAzzoni
TUGRAZ
InstituteofSoftwareTechnology
Prof.AlexanderFelfernig:[email protected] Akcay:[email protected]
SedaPolatErdeniz:[email protected]