Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ElixirConf 2023 Embedded System with Elixir fo...

ElixirConf 2023 Embedded System with Elixir for millions AI-based point of sales

LiveView was the entry point as we needed a real-time dashboard monitoring our point of sales. We extended all the Core through Phoenix, including WebSockets for IoT devices. Finally, we developed our firmware with Nerves, and we are exploring evision for AI inference. We want to share our history and show some examples of security, simplicity, and improvements in our tech based on the Elixir ecosystem.

phonnz

June 05, 2024
Tweet

More Decks by phonnz

Other Decks in Technology

Transcript

  1. Building Embedded and Core Systems with Elixir for millions AI-based

    points of purchase Alfonso • 10+ yrs working with software • 6 yrs in the Elixir ecosystem • 3 years working to build our platform • phonnz
  2. ➔ Liveview Dashboard ➔ Remote firmware updates ➔ Nerves ➔

    Remote control ➔ Deployment ➔ Clostering ➔ Monitoring ➔ Dream of the product ➔ The business ➔ Tech challenges ➔ First architecture Agenda ➔ AWS deployments ➔ Custom System ➔ Custom Wizards ➔ AWS IoT Core Greengrass ➔ 5G network How it started? How Elixir helped us? Learnings & Tips
  3. Running in a low cost device Commercial Wallet integration Mobile

    availability On-site data collection Cloud Data sending Make a purchase Inference Charge the customer Register user & payment-method On-site operation Have a way to infer the products Charge Business requirements Technical requirements
  4. Git

  5. ➔ Liveview Dashboard ➔ Remote firmware updates ➔ Nerves ➔

    Remote control ➔ Deployment ➔ Clostering ➔ Monitoring Agenda How Elixir helped us?
  6. ➔ Limited resources ➔ Slow Startup ➔ Slow communication ➔

    Corrupted updates ➔ Limited USB bandwidth ➔ Power supply ➔ Current consumption Performance Issues
  7. ➔ gstreamer ? ➔ Omx encoder ? ➔ Nerves back

    with 32bits ? ➔ Membrane ? Nice! But we need video recording!
  8. Agenda ➔ AWS deployments ➔ Custom System ➔ Custom Wizards

    ➔ AWS IoT Core Greengrass ➔ 5G network Learnings & tips
  9. ➔ More FPS ➔ High resolutions ➔ Faster startup ➔

    Encode Still need to improve video recording!
  10. Brand new box Actual Firmware Recording high quality & high

    FPS Processing first step inside ARM Custom ARM-based board
  11. thing = Device thing group = group of things artifact

    = Installable bundle core device = Greengrass id Deployment = Workflows to make possible the upgrade Greengrass
  12. Component: Logic group with recipe and configs Recipe: metadata, configuration

    parameters,dependencies, lifecycle, and platform compatibility. Artifact: binary bundle (scripts, compiled code, statics, files). Component Recipe
  13. Greengrass daemon Diagram explaining Greengrass daemon workflow - Has certificates

    - Provide new certificates - Look for new artifacts (pending deployment) - Download artifact (bundle) - Run fwup
  14. 5G

  15. We did it ! ➔ Support Million Devices ➔ Real-Time

    status ➔ Remote everything ➔ Multiplatform Firmware ➔ Compatibility ➔ Enabled teams to experiment
  16. We did it ! ➔ Support M Devices ➔ Real-Time

    status ➔ Remote ➔ Multiplatform Firmware ➔ Team
  17. What we learn Train your Team Hardware is not easy,

    Nerves is really accessible though Choose your tools, and trust the expertise Get & Give support from community Replace / Migrate strategies Have hardware experts Study stack capabilities Measure Collect Data