Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

➔ 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

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Frist System Arch Diagram

Slide 7

Slide 7 text

Websockets Client

Slide 8

Slide 8 text

Linux service

Slide 9

Slide 9 text

Git

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

➔ Liveview Dashboard ➔ Remote firmware updates ➔ Nerves ➔ Remote control ➔ Deployment ➔ Clostering ➔ Monitoring Agenda How Elixir helped us?

Slide 12

Slide 12 text

➔ Limited resources ➔ Slow Startup ➔ Slow communication ➔ Corrupted updates ➔ Limited USB bandwidth ➔ Power supply ➔ Current consumption Performance Issues

Slide 13

Slide 13 text

Phoenix Liveview Dashboard

Slide 14

Slide 14 text

PM2 Concurrency

Slide 15

Slide 15 text

➔ 3 video capturing ➔ 2 devices ➔ Communication between devices ➔ Video Sync ➔ *learning

Slide 16

Slide 16 text

Rusty Version

Slide 17

Slide 17 text

Technical requirements (still) ★ Running in a low cost device ★ Remote everything

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

➔ gstreamer ? ➔ Omx encoder ? ➔ Nerves back with 32bits ? ➔ Membrane ? Nice! But we need video recording!

Slide 23

Slide 23 text

We tried… ➔ Mix release & PIOS ➔ Nerves + Docker ➔ Nix

Slide 24

Slide 24 text

We tried… ➔ Mix release & PIOS ➔ Nerves + Docker ➔ Nix

Slide 25

Slide 25 text

We liked…

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

Agenda ➔ AWS deployments ➔ Custom System ➔ Custom Wizards ➔ AWS IoT Core Greengrass ➔ 5G network Learnings & tips

Slide 29

Slide 29 text

➔ More FPS ➔ High resolutions ➔ Faster startup ➔ Encode Still need to improve video recording!

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

Adding packages. Using search *rtl8188eu wifi adapter

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

When updating Kernel: check diff and build

Slide 34

Slide 34 text

Brand new box Actual Firmware Recording high quality & high FPS Processing first step inside ARM Custom ARM-based board

Slide 35

Slide 35 text

Greengrass

Slide 36

Slide 36 text

thing = Device thing group = group of things artifact = Installable bundle core device = Greengrass id Deployment = Workflows to make possible the upgrade Greengrass

Slide 37

Slide 37 text

Requirements: - Valid Identity - Check for Artifacts - Download/Install - Run - Keep it safe Greengrass

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

Building firmware in the cloud

Slide 42

Slide 42 text

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

Slide 43

Slide 43 text

Component Recipe

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

Allocate Greengrass daemon

Slide 46

Slide 46 text

Allocate Greengrass daemon

Slide 47

Slide 47 text

Run Greengrass daemon

Slide 48

Slide 48 text

Run Greengrass daemon

Slide 49

Slide 49 text

Run Greengrass daemon

Slide 50

Slide 50 text

Greengrass daemon Diagram explaining Greengrass daemon workflow - Has certificates - Provide new certificates - Look for new artifacts (pending deployment) - Download artifact (bundle) - Run fwup

Slide 51

Slide 51 text

5G

Slide 52

Slide 52 text

Multiregion

Slide 53

Slide 53 text

Multiregion

Slide 54

Slide 54 text

We did it !

Slide 55

Slide 55 text

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

Slide 56

Slide 56 text

We did it ! ➔ Support M Devices ➔ Real-Time status ➔ Remote ➔ Multiplatform Firmware ➔ Team

Slide 57

Slide 57 text

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

Slide 58

Slide 58 text

Q&A Alfonso Gonzalez [email protected] phonnz ● intuitivo.com intuitivo.com/careers Linkedin.com: intuitivo-ai ●