shifu icon indicating copy to clipboard operation
shifu copied to clipboard

Evaluate how to best support custom device code

Open kedvall opened this issue 2 years ago • 5 comments

For each device we want to integrate, we often have to write a lot of device-specific code. Currently we can either create a layer on top of Shifu (between Shifu and our services), or create an image and have Shifu deploy / manage it. These approaches both have some downsides.

  • With a layer on top of Shifu, Shifu can't understand the data coming from the device and can't do things like health checks, error handling, state tracking or anything that needs parsing of the data returned
  • For both methods, each device we want to integrate requires writing a lot of boilerplate code such as health checks, communication interfaces, API registration, etc
  • We already have a system in place to deploy and manage Docker containers and communicate through these with physical devices. Going from service to Shifu resource to our image to the physical device adds another layer, additional configuration, and still requires us to develop a device-specific image each time. Although we'll always have to write device-specific code somewhere, the current feature set is not very different from our direct Docker image deployment method despite the additional overhead.

We hope we can instead offload some features we have to write for each device into Shifu, and find a way to better manage the device-level code required for each device.

This issue is not fully developed and likely needs to be revised / updated.

kedvall avatar Mar 28 '22 03:03 kedvall

Thanks @kedvall for opening this issue! This means a lot to us. Let's work closely to have Shifu deliver more value to developers : )

saiyan86 avatar Mar 28 '22 04:03 saiyan86

Hi @kedvall, this feature is now under development. ETA for this feature is by Jun 15th.

saiyan86 avatar May 23 '22 09:05 saiyan86

Hi @kedvall , do you have any suggestions to the design doc? #119

saiyan86 avatar Jun 19 '22 15:06 saiyan86

The design doc for this is currently in PR https://github.com/Edgenesis/shifu/pull/221

tomqin93 avatar Sep 14 '22 01:09 tomqin93

Fist implementation for this Issue https://github.com/Edgenesis/shifu/blob/main/docs/guide/quick-start-customized-device-shifu.md

tomqin93 avatar Oct 14 '22 01:10 tomqin93