open-horizon / examples

Code examples you can use with Horizon.
Apache License 2.0
40 stars 65 forks source link

Issue 316: Adding a FFT example service #331

Closed vkorn closed 1 year ago

vkorn commented 4 years ago

Example of horizon services: MQTT based system to analyze audio samples using FFT. Contains two horizon services:

  1. Client -- recording application
  2. Server + MQTT -- analyzer application

To make testing easier, simple console client is made which is using pre-recorded samples and sending them in a random order to the server through MQTT.

Per email discussion we are using docker manifests instead of separate images per arch.

Please let me know if I should change docker_id from my personal to openhorizon.

vkorn commented 4 years ago

Hi Glen,

Thank you for the comments!

each service in its own directory under examples/edge/services

Ok, will change that. What about testing? To test it we need to run mqtt + server. Just use server service only for the travis tests?

clear instructions to explain usage

Will add more details

Also, I think you should remove the Agent software install instructions in horizon/RPi.md as these do not belong in any of the examples

Initial idea was to run client ("recording" part) on the rpi which requires agent installation. I can remove it of course.

Do you support arm64

I didn't make a target for it, but it should work, I don't have a device to test.

Your client and server Dockerfiles are hard-coding ENV settings, e.g

Those are just a list of setting available for each service. Each setting is exposed through userInput

vkorn commented 4 years ago

As discussed over the phone, below is the list of further changes we want to see in the service (will go as a separate PR):

  1. Add configuration for device/card (right now using a default device)
  2. Probably suggests device/card combination if client is started in debug (same as we're doing for the bit rate now)
  3. Add queue of sounds waiting for analysis to the server
joewxboy commented 4 years ago

I've put together some basic documentation for installing the example service.

INSTALL.md.zip

I think we're now ready for @dabooz to review.

joewxboy commented 4 years ago

Do you support arm64? I am trying to set this up on my Jetson TX2 but I think i just discovered that you don't support arm64? I'll move to another machine.

@TheMosquito arm64 should be supported. When you build, you need to specify that you're building specifically for arm. Are you saying that the arm support is only for arm32?

joewxboy commented 3 years ago

@dabooz and @t-fine going back through this PR, it may have addressed your changes? If so, can we merge it?