wp3 – agile sw architecture
TRANSCRIPT
WP3– AGILESw ArchitectureFABIOANTONELLI , LUCACAPRA
CREATE-NET
AGILEPLENARYMEETING,14-15April2016,Athens,GR
AGILEPLENARYMEETING,14-15April2016,Athens,GR
AgendaqPlanningofArchitectureDefinition&MainMilestonesqPlanforRoadmappingFirstAGILESw StackImplementationqAGILESw Architecture:vFunctionalArchitecturevAGILEMicroModulesvLibrariesandToolsvExample:BLEDiscoveryworkflowvUIConceptsvSoftwarepackaging& Runtimedeployment
AGILEPLENARYMEETING,14-15April2016,Athens,GR
PlanningofArchitectureDefinition&MainMilestones
•NextMilestones:
•M6:•D1.1:AGILEGatewayarchitecture specificationsandinitialdesign(EUTROTECH)- Report•D2.1:CorerequirementsspecificationandIoT protocolintegration(Rulemotion)- Demonstrator•D3.1:Req.specification&Sw Architecture(CREATE-NET)- Report
•M9:•D3.1:InitialversionofGatewaySelfconfiguration,IoT Devicediscovery&Remotegatewaymanagement(Rulemotion)- Report
•D3.2:ApplicationInterfaces(Gateway,DataManagement&Developer’sInterface)– initialimplementation(CREATE-NET)– Report
•DemonstratorforFirstProjectReview
AGILEPLENARYMEETING,14-15April2016,Athens,GR
PhasesfromArchitectureDefinitiontoAGILEFw RoadmappingandImplementation
Architecture DefinitionArchitectural PatternPrototyping
UseCase(DiscoveryofBLEDevices)
AnalysisandIntegrationofIoT Standards
PrioritizationOfIoT Std/protocols
O.S.FrameworksandLibraries s
OSComponentsSelection
Mapping
AGILEFwRoadmap forImplementation
ValidationM09ReviewDemo
• What• When• Who
Timeline M09M04 M05
1st ActivityAfterAthens
PlenaryMeeting
AGILEArchitecture:Makersvs.IndustrialVersionPreliminaryClarifications
•Maker’sVersion:•Definitionaddressednin thefollowingslides
•Industrialversion:•InitialdiscussionwithWP1partnersstarted•Rationale:
•NeedtoshareaReferenceArchitecturewithMaker’sVersion•MaydeviatefromMaker’sversiononeduetodifferentrequirementslinkedtoindustrialapplication
•Startingcomponentforreuse:Kura•Needsanalysisforidentificationofcommonsw componentstobeintegrated
AGILEPLENARYMEETING,14-15April2016,Athens,GR
AGILEGatewayFunctionalReferenceArchitecture
(ContainerOS)
IoTAppDevelopersUI
WorkflowRecommender
CollaborationTool
GatewayManagementUI
RemoteGateway&FleetManagement System
DeviceManagementUI
IoTDataManagementUI
DataStorage
(User)IoTApps(Snapps..)
IoTApp
IoTApp
IoTApp
SomeDataCloud
DataCommunication,ApplicationCloudDeployment&Management,etc...
GatewayOperatingSystem
IoT Device & HW module Discovery
IoT Device Communication KNX ZWave ...
Security
Security
Security
Security
Security
GatewayManagement(ModulesforPower,Network,...)
IoTDevice&HWmoduleDiscoveryAbstraction
IoTDeviceComunication(ModulesforBluetooth,ZWave,others)
DataStorage
GatewayOS
RemoteGateway&FleetManagementSystem
IoTAppDevelopment
WorkflowRecommender
IoTDeviceMgmUI
IotGWMgmUI
AgileDeviceAPI
CollaborationTool
Bluetooth
DeviceMgm
ZWave
IotDataMgmUI
AgileDataAPI
DBCloudStorage DiscoveryAPI
AgileDeviceAPI
IoTDeviceMgmUI
DeviceMgm
AgileDeviceAPI
Networkhandler
AgileMgmAPI
Dev/Powermgm
AgileMgmAPI
IoTDeviceManagementUI
IotGWMgmUI
IoTApps
App1 App2
App3 App4
Appruntime
Runtimeimpl.
Bus
AGILERestfulAPI/Broker/Proxy&StaticServer
IotAppDevelopersUI
AGILEIOAPI
AGILECloudServices&CloudIntegration
AGILEGateway
AGILEPLENARYMEETING,14-15April2016,Athens,GR
GatewayManagement(ModulesforPower,Network,...)
IoTDevice&HWmoduleDiscoveryAbstraction
IoTDeviceComunication(ModulesforBluetooth,ZWave,others)
DataStorage
GatewayOS
RemoteGateway&FleetManagementSystem
IoTAppDevelopment
WorkflowRecommender
IoTDeviceMgmUI
IotGWMgmUI
AgileDeviceAPI
CollaborationTool
Bluetooth
DeviceMgm
ZWave
IotDataMgmUI
AgileDataAPI
DBCloudStorage DiscoveryAPI
AgileDeviceAPI
IoTDeviceMgmUI
DeviceMgm
AgileDeviceAPI
Networkhandler
AgileMgmAPI
Dev/Powermgm
AgileMgmAPI
IoTDeviceManagementUI
IotGWMgmUI
IoTApps
App1 App2
App3 App4
Appruntime
Runtimeimpl.
Bus
AGILERestfulAPI/Broker/Proxy&StaticServer
IotAppDevelopersUI
AGILEIOAPI
AGILEGateway
Notexplicitly representedhere:• Security• Recommendation
MappingofFunctionalArchitectureon“Micro-Modules”Architecture
AGILEPLENARYMEETING,14-15April2016,Athens,GR
AGILEIOAPIAgileDataAPI
AgileDeviceAPIAgileMgmAPI APIsofferabstractionoverBus andmodulescommunicationandaconvenientpackage ofcommonfunctionality
AgileModules areautonomousandpluggablecomponentswhichinteractsoverIPCwithothermodulesandexposeanUIandAPItoallowconfigurationandcontrolfromtheuser.
UI
AGILEAPI
Library/3rdyPartySoftware
AGILEimpl.
ExternalAPI
IPC
TheAgileimplementation involvetheactualsystemintegrationofanexistinglibraryorsoftwarewiththeGWAPIsandUItoreuse existingsoftwarewithminimaloverhead
UIsallowforuser interactionswithspecificconfigurationsormanagement toolsforthemodule.ModuleUIswillbeabletointeractwiththemainUIcontainerviatriggersandroutes/namespaces
AAPIgroupsaset of“functionalinterfaces”tocomplywithservicefeatures inter-communication.IdeallySDKmaybegenerated outofaschema definitiontoenforcemultilanguageinteroperabilityandoffer anunifiedintegrationdocumentationanddevelopment experience.
TheExternalAPIOffers anuniquepointofaccessproperlynamespaced andsecurity-aware tointernalfunctionalitiesoffered bymodules.ThiscanhappenviaIPCorothermethods,likeanHTTPProxy
“MicroModules”Architecture:Legenda
AGILEPLENARYMEETING,14-15April2016,Athens,GR
GatewayManagement(ModulesforPower,Network,...)
IoTDevice&HWmoduleDiscoveryAbstraction
IoTDeviceComunication(ModulesforBluetooth,ZWave,others)
DataStorage
GatewayOS
RemoteGateway&FleetManagementSystem
IoTAppDevelopment
WorkflowRecommender
IoTDeviceMgmUI
IotGWMgmUI
AgileDeviceAPI
CollaborationTool
Bluetooth
DeviceMgm
ZWave
IotDataMgmUI
AgileDataAPI
DBCloudStorage DiscoveryAPI
AgileDeviceAPI
IoTDeviceMgmUI
DeviceMgm
AgileDeviceAPI
Networkhandler
AgileMgmAPI
Dev/Powermgm
AgileMgmAPI
IoTDeviceManagementUI
IotGWMgmUI
IoTApps
App1 App2
App3 App4
Appruntime
Runtimeimpl.
Bus
AGILERestfulAPI/Broker/Proxy&StaticServer
IotAppDevelopersUI
AGILEIOAPI
MicroServicesArchitecture:Components&APIs
RemoteGateway&FleetmanagementSystemOperatingSystem
AGILEGatewayMicroServices
AGILEPLENARYMEETING,14-15April2016,Athens,GR
Librariesandtools
AGILEPLENARYMEETING,14-15April2016,Athens,GR
Librariesandtools:IoTApps(basedonnodered)
IoTApps
App1 App2
App3 App4
Appruntime
Runtimeimpl.
• redzilla:Anode-redas-a-serviceinstancelaunchersupportingcustomauthenticationandinstancemanagementapihttps://github.com/muka/redzillaDevelopedbyCREATE-NETforapreviousproject.Managenode-redinstancesindockercontainersandoffersaconvenientHTTPAPI.
AGILEPLENARYMEETING,14-15April2016,Athens,GR
Librariesandtools:IoTAppdevelopment
• OS.js:OS.js isaJavaScriptwebdesktopimplementationforyourbrowserwithafully-fledgedwindowmanager,ApplicationAPIs,GUItoolkitsandfilesystem abstraction.https://os.js.org/
• NodeRed:AvisualtoolforwiringtheInternetofThingshttp://nodered.org/
• CollaborationTool• WorkflowRecommender
IoTAppDevelopment
WorkflowRecommender
CollaborationTool
IotAppDevelopersUI
AGILEPLENARYMEETING,14-15April2016,Athens,GR
Librariesandtools:GatewayManagement
• Kura implementation(OSGIservice)http://www.eclipse.org/kura/• Customimplementation,takingadvantageoftheDBusexposedserviceslikeNetworkManager,
PowerManagerandother.PoCathttps://github.com/muka/node-dbus-network-manager
GatewayManagement
IotGWMgmUI
Networkhandler
AgileMgmAPI
AGILEPLENARYMEETING,14-15April2016,Athens,GR
Librariesandtools:DataStorage
• rethinkdborinfluxdb (oreitherunqlite,sqlite,...)• googledriveSDK https://developers.google.com/drive/• ...
DataStorage
IotDataMgmUI
AgileDataAPI
DBCloudStorage
AGILEPLENARYMEETING,14-15April2016,Athens,GR
Librariesandtools:IoTDeviceCommunication
• Bluetooth(Officiallinuxprotocolstack)bluez.org• Openzwaveopenzwave.com• ZigBee(dependonchip/hwimpl)• Moreon“ProtocolsandStandards”doc
IoTDeviceComunication
IoTDeviceMgmUI
AgileDeviceAPI
Bluetooth
DeviceMgm
AGILEPLENARYMEETING,14-15April2016,Athens,GR
Librariesandtools:IoTDeviceCommunication
• Pontehttp://www.eclipse.org/ponte/• MQTT,Mosquittohttp://mosquitto.org/• CoAP,Californiumhttp://www.eclipse.org/californium/• Dbusclient(s) (dbus.freedesktop.org/.../dbus-java/,sidorares/node-dbus)Bus
AGILERestfulAPIBroker/Proxy&StaticServer
AGILEIOAPI
AGILEPLENARYMEETING,14-15April2016,Athens,GR
DiscoveryAPI
GatewayManagement(ModulesforPower,Network,...)
IoTDevice&HWmoduleDiscoveryAbstraction
IoTDeviceComunication(ModulesforBluetooth,ZWave,others)
DataStorage
GatewayOS
RemoteGateway&FleetManagementSystem
IoTAppDevelopment
WorkflowRecommender
IoTDeviceMgmUI
IotGWMgmUI
AgileDeviceAPI
CollaborationTool
Bluetooth
DeviceMgm
ZWave
IotDataMgmUI
AgileDataAPI
DBCloudStorage
AgileDeviceAPI
IoTDeviceMgmUI
DeviceMgm
AgileDeviceAPI
Networkhandler
AgileMgmAPI
Dev/Powermgm
AgileMgmSDK
IoTDeviceManagementUI
IotGWMgmUI
IoTApps
App1 App2
App3 App4
Appruntime
Runtimeimpl.
Bus
AGILERestfulAPI/Broker/Proxy&StaticServer
IotAppDevelopersUI
AGILEIOAPI
NodeRed
BlueZ OpenZwave
Ponte
rethinkdb
AWS,GDriveNetworkManager UDev/UPower UDev
D-Bus
redzilla
AGILEPLENARYMEETING,14-15April2016,Athens,GR
Mapping ofLibrariesandtoolsonAGILEArchitecture
Example: BLEDiscoveryWorkflow
AGILEPLENARYMEETING,14-15April2016,Athens,GR
Exampleworkflow
UserStory:JanesearchforBluetoothdevicesandproceedtopairinginordertoregisteranduseherdeviceintotheAGILEgateway
AGILEPLENARYMEETING,14-15April2016,Athens,GR
DiscoveryUI DiscoveryAPI BLEadapter DeviceManagement
Searchscan()
1.Discoverdevices
2.checkisnew
3.syncdeviceinfo
isRegistered()
updateDevice(){device list}
Display
Pair(devID)connect(devID)
pair()
EnterPINOK
Deviceconnected
BLEDiscovery
BLEPairing
AGILEPLENARYMEETING,14-15April2016,Athens,GR
Exampleworkflow
UserStory:Athermostatappconnectstoacompatibledevicetogatherdataandcontroltemperaturedimmer
AGILEPLENARYMEETING,14-15April2016,Athens,GR
BLEadapter
{device list}
Bootstrap
BrokerThermostatApp DeviceManagement
find()
connect(devID)
subscribe(devID)
Datareceived
Device
Newdata
Newdata
Newdata
Datareceived
ThermostatApp
AGILEPLENARYMEETING,14-15April2016,Athens,GR
Security
GET /api/device/find
AgileBUS
User Request: Discoverdevices
ProxyobjectcallDeviceManager.find()
Publish[ns:DeviceManger.devices]
Founddevice!
Devicemanagement
Listen[ns:DeviceManger.devices]
2
3
5
6
BLEmodule
LWM2Mmodule
find(foo) {actualimpl }
find(foo) {actualimpl }
4
7
AGILEappsgetthenewdeviceinfo,shownotificationListen[ns:agile.devices.create]
1
UIconcepts
AGILEPLENARYMEETING,14-15April2016,Athens,GR
“Common”OS-likeUI foreasierunderstandingandusageClientbasedlimitedoverheadonthegatewayasrunscompletelyinthebrowser.VirtualFilesystemsupportegexportandsavedatatoGoogleDriveorMSCloudPackagesandapackagemanagerisavailable
UIconcept:OS-likeproposal
Onlinedemoathttps://osjsv2.0o.no/
AGILEPLENARYMEETING,14-15April2016,Athens,GR
PanelstocontainmodulesUI
Genericconfigurationsaregroupedandmanaged inanunifiedUI
Bindingsare offered toprovidewidgetoutofApps,eventuallyeitherfromautonomus/pre-existingUIs
NotificationswillusetemplatestodrivetheusertotherightUI
Modules andApps havedefaulthandlingandbindingtothemainUI
Devices canbelistedandgroupedinfolder-likeviews.DefaultactionfromtheUIallowtointeractdirectlywithadevice
Softwarepackaging&Runtimedeployment
AGILEPLENARYMEETING,14-15April2016,Athens,GR
Softwarepackaging& Runtimedeployment
AGILEPLENARYMEETING,14-15April2016,Athens,GR
GatewayManagement(ModulesforPower,Network,...)
IoTDevice&HWmoduleDiscoveryAbstraction
IoTDeviceComunication(ModulesforBluetooth,ZWave,others)
DataStorage
GatewayOS
RemoteGateway&FleetManagementSystem
IoTAppDevelopment
WorkflowRecommender
IoTDeviceMgmUI
IotGWMgmUI
AgileDeviceAPI
CollaborationTool
Bluetooth
DeviceMgm
ZWave
IotDataMgmUI
AgileDataAPI
DBCloudStorage DiscoveryAPI
AgileDeviceAPI
IoTDeviceMgmUI
DeviceMgm
AgileDeviceAPI
Networkhandler
AgileMgmAPI
Dev/Powermgm
AgileMgmAPI
IoTDeviceManagementUI
IotGWMgmUI
IoTApps
App1 App2
App3 App4
Appruntime
Runtimeimpl.
Bus
AGILERestfulAPI/Broker/Proxy&StaticServer
IotAppDevelopersUI
AGILEIOAPI
RemoteGateway&FleetmanagementSystemOperatingSystem
AGILEGatewayMicroModules
Whatabout,withreferencetopreviousarchitecturedefinition?
Softwarepackaging&Runtimedeployment
Debianpackages
DebianpackagesascommonapproachforbothIndustrialandMakersversion.
EnablesimmediatecompatibiltywithcommonreleaselikeDebianARM,Raspbian
Potentialconvergencetootherplatformswithcommunityeffortonpackaging(ArchLinux,Fedora,OpenWRT)
AGILEPLENARYMEETING,14-15April2016,Athens,GR
MAKERversion:Packaging&Runtimeoptions
SnappyappsWithpackagesinthe
marketplace
ContainerizedappsegCLI/registrywrappingDocker
APIsAGILEPLENARYMEETING,14-15April2016,Athens,GR
$ snappy install app-fitbit.agile
MAKERversion:Packaging&Runtimeoptions
GatewayManagement
IoTDevice&HWmodule
IoTDeviceComunication
DataStorage
UbuntuCore
IoTAppDevelopment
IoTApps(NodeRed)
NativeApps
AGILEPLENARYMEETING,14-15April2016,Athens,GR
$ agile install jdoe/fitbit
MAKERversion:Packaging&Runtimeoptions
GatewayManagement
IoTDevice&HWmodule
IoTDeviceComunication
DataStorage
DockerEngine
IoTAppDevelopment
IoTApps(NodeRed)
NativeApps
OperatingSystem
AGILEAppsRegistry
AGILEPLENARYMEETING,14-15April2016,Athens,GR
AGILEPLENARYMEETING,14-15April2016,Athens,GR
Back-upSlides
Java VM
Hardware + Gateway OS
Communication bus (OSGi Declarative Services, Event Admin and Wires)
Hardware Abstraction
Basic GatewayServices
FieldProtocols
NetworkManagement
RemoteManagement
Connectivityand
DeliveryApp 1 App n…
Hardware Abs UI GatewayServices UI
NetworkManagement UI
RemoteManagement UI
Connect. and Deliv. UI
App 1UI
App nUI
Main UI
AGILE Kura Architecture
AGILEPLENARYMEETING,14-15April2016,Athens,GR
AGILEmodules:questionsanddoubts.
• Busconcept:abusistypicallyintendedasacommunicationchannelthatallowsthecommunicationbetweendifferentcomponents.Regardingthehighlevelbus,wehaveabitofconfusionontheconceptofbus:1. theRESTAPIrepresentsanendpointthatexposesaprotocoltobeusedwhenexchanging
informationinapoint-to-pointmodel.2. Abrokerisa“concentrator”anddispatcherofeventsandinformation.Thecomplexityofa
broker, intermsofimplementationdependsgenerallyontheadoptedcommunicationprotocol.Generally,abrokerismorecomplexthanwhatisrequiredforasimplebus.
3. Arewereferringtoaspecificsolutionfortheproxy&staticserver?Arethereanyreferenceexample?
• Moreingeneral,thesethreeimplementationofthehighlevelbusareheterogeneous,bothintermsoffunctionalities,objectives,abstractionlevel,etc..
• Asimilarsolutioncouldhaveastrongnegativeimpactonperformances.
AGILEPLENARYMEETING,14-15April2016,Athens,GR
1) GW manages object and services as Object with methods and properties (as per DBus specs)
2) Client issue a request to a structured endpoint. EgGET /device/fridge1/temperature?unit=C
3) Restful HTTP API route request and params calling the managed object
4) Response is delivered. Eg. -4
RestfulAPImethodsmaptoGWmanaged objects/services
CallablemethodsofabstractobjectsallowstointeractwithGWmanaged devices.Example:Afridgedeviceinstance
Questionsanddoubts(1):RestfulHTTPAPIexample
{name: “fridge1”,int temperature(string unit)void setPower(bool on)
}
AGILEPLENARYMEETING,14-15April2016,Athens,GR
1)
2) Client register on broker topic(s) to receive updates for a device or device property
http.POST /fridge1/subscribe/temperaturemqtt.subscription >> /fridge1/temperature
3) Bridge receive properties updates from objects
4) Client get updated of the updated value(s)
mqtt.subscription << -8
Questionsanddoubts(1):Brokerexample
{name: “fridge1”,onChange(temperature)
}
DBussupportsDBus.Propertiestoreceive asyncronousupdatesonproperties
Brokertopiccanbeperpropertyorobjectwisetogroupmessages
RegistertoDBusPropertiesChanged forproperty(oneormore)andpublishonceupdatesflows
AGILEPLENARYMEETING,14-15April2016,Athens,GR
AGILEmodules:questionsanddoubts(2)
• Highlevelbus:threeimplementationsareproposed(AGILERestfulAPI/Broker/Proxy&StaticServer).• Willonlyoneimplementationbeselectedandfixed?Willonlyoneimplementationbe
selecteddependingontherequirements,verticalapplication,etc.?Arethethreeimplementationsavailableatthesametimeandintegrated?
• Iftheimplementationsareintegrated,whatistherelationbetweenthem?• Lowlevelbus:whyareweconsideringalowlevelbus?
• Consideringthat,independentlyfromtheSDK,alltheappshaveaccesstobothbusses,wouldn’tbebettertouseandmanageonlyonebus,thehighlevelbus?
• SDK:canyouprovideanexampleofSDK?• WhichcomponentstheSDKmustinclude?• InwhichwaytheSDKabstractsthelowlevelbus(DBUS)inordertoprovide
functionalitiestothehighlevelbus?
AGILEPLENARYMEETING,14-15April2016,Athens,GR
Highlevelbus:• Intendedforendusers/appsandUIovercommonprotocolsandconnectionslike
WiFi,Ethernet,HTTPorWebsocket• ApublicHTTPAPI,witheventuallyfurtherlevelofsecurityenforcement• Offersthreemainservicestointeractwithinternalservicesinanormalizedway
(singleAPIandentrypoint)
1. RESTful API+Brokerwillserveasrequestbased&eventeddatasource/actiontrigger
2. HTTPProxyisusedtopipetoapp/serviceswhichexposesHTTPAPIs.Eg onlineAPIsor3rdpartysoftware
3. Staticserverservestaticcontentlikehtml,js orfiles
Questionsanddoubts(2):Highlevelbus
AGILEPLENARYMEETING,14-15April2016,Athens,GR
Lowlevelbus• DBus isavailableinmostlinux distribution(withinsystemd)withkernelservices
exposed(NetworkManager,Bluez,PowerManager,PolicyKit).• AllowsforGWinternalserviceabstractionandinteraction.
SDKexample• Ajavabasedclasssettointeractwith“objectproxies”(ourAPIs)likeDevice
Communication,DeviceManagementorStorage.• AusecasemaybetohaveanOSGImoduletomapKuraGPIOcomponenttothe
DeviceCommunicationAPIofAGILEandhaveitexposedtootherGWcomponents
Questionsanddoubts(2):LowlevelBusandSDK
AGILEPLENARYMEETING,14-15April2016,Athens,GR
Questionsanddoubts(3):LowLevelBus
• Lowlevelbus:howtheUIcomponentscomposethemainUI?• “SpecificapplicationUI”standsforagraphicalUIorforasetofAPIusedbythe
MainUItocomposethegraphicalUI?• HowaddingorremovinganappinfluencesthemainUI?
AGILEPLENARYMEETING,14-15April2016,Athens,GR
Lowlevelbus• UIisawebapp composedofstaticresources(js,html)andanAPI• ConnectiontointernalGWeventshappensviatheinternalAPIsanddedicatedplugin
hooks• UIswillbecomposedofinterfacesstructuredasparentcontainerwherepluggable
childUIswillbeattached.Examples:• AControlPanelallowsto“attach”extensionslikeNetworkManager orUser
Management• ADatavisualizationinterfaceallowtoinjectdatavisualizationsubcomponent
basedondatatypeorsource
Questionsanddoubts(3):LowLevelBus&UIs
AGILEPLENARYMEETING,14-15April2016,Athens,GR