Skip to content
This repository has been archived by the owner on Aug 21, 2020. It is now read-only.

How to integrate the algorithm written by myself into edgex, and process the data collected by edgex connected devices through this algorithm? #42

Open
wanght3w opened this issue Jul 24, 2020 · 3 comments

Comments

@wanght3w
Copy link

How to modify the sample implementation to integrate the algorithm written by myself into edgex's APPservices, and the data processed by the algorithm is obtained through the device connected to edgex?

@lenny-goodell
Copy link
Contributor

Are you trying to create you own custom App Service with your custom algorithm function?

@wanght3w
Copy link
Author

@lenny-intel ,Yes, but I don’t know how to import the data collected by the device into the algorithm for calculation and processing. How can I modify the provided examples to implement it?
Another question is, can the results processed by the edgex algorithm here be sent to another edgex for collaboration?

@lenny-goodell
Copy link
Contributor

How can I modify the provided examples to implement it?

  1. Copy example as template to your own development repo
  2. Run go mod init <your app service name> at root of you repo
  3. Run go build to do initial build which will update go.mod.
    Fix any error due to imports that need to be adjusted.
  4. App your custom algorithm function by following the docs on how to use SDK to write custom app service https://docs.edgexfoundry.org/1.2/microservices/application/ApplicationFunctionsSDK/

Another question is, can the results processed by the edgex algorithm here be sent to another edgex for collaboration?

Result of you custom app service can be published back to the message bus, this can be the same edgex instance or configured to be another edgex instance
https://docs.edgexfoundry.org/1.2/microservices/application/GeneralAppServiceConfig/#messagebus
or you can use the HTTP export to send the result to another instance's Core Data Event API if you need the data stored in that instance.
https://docs.edgexfoundry.org/1.2/microservices/application/BuiltIn/#http

As you can see the documentation covers all this. Please review it completely.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants