Implementation notes

From AMTech WikiDocs
Revision as of 17:43, 4 October 2016 by Carlos (Talk | contribs)

Jump to: navigation, search
  • M2MBridge discovers and loads node.js modules that implement M2MBridge plugin interface (See Thing types) tacking into account activity observation production configuration (See Observation production configuration) and M2MBridge user access polices (See Actors and Edge Configuration).
    • It leverages AMTech IoT Protocol (See IoT Restful API)
      • Clone configuration from exiting M2MBridge template instance (See Edge Configuration)
      • Gets observation production configuration (See Observation production configuration API)
      • Gets things (See Get instances by thing type API)
      • Receive asynchronous commands and things changes (CRUD operations) (See CRUD and Commands API)
        • Dispatch command observations to plugin instance leveraging thing type instance @id (See Thing types)
        • Restart instance when supported properties change by calling stop and star plugin interface
      • Creates configuration information by Thing type leveraging configuration information and client side M2MBridge placeholders (See Observation production configuration and Placeholders)
      • Load plugin nodes modules required by configuration
      • Creates an instance of plugin for each thing type instance using instance @id as identifier (See Thing types)
        • Plugin object is extended with the properties values from the thing instance (See plugin example )
        • Properties and methods are injected: (See for details)
          • common logger
          • methods to send observations with and without enrichment
          • methods for restarting plugin
      • Creates a centralized observation dispatcher mechanism with persistence to ensure:
        • Observations delivery in the order that observations occurred.