View in #help on Slack
@Christian_Alexander_Bahrdt: Hey everyone. I’d like to integrate my own microservice into EdgeX in such a way, that it uses the EdgeX infrastructure just like all other EdgeX microservices do. However I am unable to find requirements for external microservices to be a part of EdgeX. Are there any resources on this topic? Thanks in advance!
I figured e.g., my own service should log into the logging microservice, it should be able to be started and stopped via the system service, etc. But that’s about anything I could get from the documentation. I have probably missed something.
@Michael_Hall: @Christian_Alexander_Bahrdt if you’re building a device service or application service, using the SDKs will do all of that for you
@Christian_Alexander_Bahrdt: Hi Michael, I have considered this for the device services already, but apparently I failed to see that they’re SDKs for application services as well. I’ll look into that. Thank you very much!
@Michael_Hall I am afraid this is not what I was looking for. Let’s say I’d want to replace the rules engine with a custom local analytics microservice. What is necessary to program a microservice like that, so that it can be considered a part of EdgeX?
I’m sorry if I wasn’t specific enough.
@Michael_Hall: You should be able to do that with the Application Services SDK
Application Services can do local processing of data, publishing to a remote service, or both
@Christian_Alexander_Bahrdt: Ah okay. I’m sorry. I was confused by the graphic over here https://docs.edgexfoundry.org/Ch-ApplServices.html, which seemed to imply it is only possible to write microservices that work on the Export Services layer.
@Michael_Hall: Exporting is a special-case kind of application service. In fact, the current rules-engine is implemented as an export service
In previous versions of EdgeX, exporting was the primary form of application service, but with the introduction of the App Functions SDK it’s now much easier to write local data-handling services
the current rules-engine is one of the oldest pieces of code in EdgeX, it dates back to when EdgeX was written in Java, we just haven’t found a good replacement for it yet. So don’t think that you need to implement a replacement that works the same way, because the way the rules-engine works now is mostly legacy. The App Functions SDK is definitely the better approach for you.
@Christian_Alexander_Bahrdt: Thanks again. I actually do not want to rewrite the rules engine, I’d just wanted to know if its possible to replace a Support Service layer microservice with the App Func SDK, that’s why I was referring to the rules engine in particular. The graphic on the AppServices page that I linked to seemed to imply, that it is only possible to build services that are located on the Export Services layer, just like the Device Services SDK just seems to allow building microservices, that are located in the Device Services layer.
The current capabilities of EdgeX are perfectly fine for my use case, I just need a way to register my microservice in such a way, that one could consider it a part of EdgeX.
@Michael_Hall: @tsconn23 @jpwhite do we have anything that specifies the “standard” set of API integrations that an EdgeX Service should follow? I’m thinking registry, logging, system-management, etc
@tsconn: I don’t think there’s a document, but all the steps are found in the Retry function in the init.go for every service.
@Marcelo_Gallardo: @Christian_Alexander_Bahrdt You should consider using the app-functions-sdk. I am using and works pretty good. https://github.com/edgexfoundry/app-functions-sdk-go
@Christian_Alexander_Bahrdt: @Marcelo_Gallardo thanks, but as outlined earlier, this may not work for me.
@Marcelo_Gallardo: @Christian_Alexander_Bahrdt You should ask in the applications channel. As far as I know, the export services and all the applications in the service layer will be done using the app-functions-sdk.
@Christian_Alexander_Bahrdt: @Marcelo_Gallardo The problem that I am facing is, that I need documentation on what constitutes an EdgeX microservice as such. As @Michael_Hall forwarded this question to @tsconn23 and @jpwhite, I will await their answer. I still consider the applications channel as well. Thanks.
@tsconn23 Thank you so much, I’ll check this out. @Michael_Hall Thanks again as well.
@Michael_Hall: Happy to help @Christian_Alexander_Bahrdt
takes a note of new documentation that needs to be written