Slide 1

Slide 1 text

What We Learned From Building Edge Compute

Slide 2

Slide 2 text

Sr. Developer Advocate at HashiCorp he / him @ksatirli Kerim Satirli

Slide 3

Slide 3 text

edge com·put·ing noun computing that takes place at or near the physical location of the producer or consumer of data. point of presence mobile datacenter Similar:

Slide 4

Slide 4 text

01 The Airport Over-engineering a thermostat

Slide 5

Slide 5 text

"pnr": "RMT33W",
 "action": "boarding"

Slide 6

Slide 6 text

Challenge: understand an area's pulse

Slide 7

Slide 7 text

Solution: deploy wireless IoT network

Slide 8

Slide 8 text

var C // capacity (mAh) var I // current when in sleep mode (mA) var Imeas // current in measurement mode (mA) var Irx // current in Rx mode (mA) var Itx // current in Tx mode (mA) var N // measurements (count) var T // milliseconds per hour (3.6M) var Tmeas // duration of measurement mode (ms) var Trx // duration of Rx mode (ms) var Ttx // duration of Tx mode (ms) var U // usable capacity incl. self-discharge (percentage) Projecting Battery Capacity

Slide 9

Slide 9 text

// active capacity usage / day var cA = ((N * ((Ttx * Itx) + (Trx * Irx) + (Tmeas * Imeas))) / T) // sleep capacity usage / day var cS = I * (24 - ((Ttx + Trx + Tmeas) * N) / T) // total capacity consumed / day var cT = cA + cS // projected battery life var Bd = (cU / cT) / 24 // in days var By = Bd / 365.25 // in years Projecting Battery Capacity

Slide 10

Slide 10 text

= 7.6 years !

Slide 11

Slide 11 text

Occupancy Sensor 0 20 40 60 80 100 Q4 2018 Q2 Q3 Q4 2019 2022 2023 " # $ Graphing Battery Capacity

Slide 12

Slide 12 text

// assembled and decoded payload (via webhook) var payload // remaining battery capacity (0...254) var capacity = var.payload.capacity // remaining battery capacity (0...254) var capacity_in_percent = (var.capacity / 254) * 100 // overwrite capacity value with percentage-based one payload.capacity = var.capacity_in_percent Calculating Battery Capacity

Slide 13

Slide 13 text

Learning: go beyond the software

Slide 14

Slide 14 text

02 The Grocer Orchestrating a DDoS from within

Slide 15

Slide 15 text

150 x hypermarkets 63 x supermarkets 1000 x minimarkets

Slide 16

Slide 16 text

+ 37 points

Slide 17

Slide 17 text

{ "id": "5d1caf08-4235-451d-9fac-4f8d56e89e2e", "timestamp": "2023-01-01T05:01:57Z", "card": "966255423827", "amount": "37.26" } Customer Transaction Data

Slide 18

Slide 18 text

single transaction size 200 Bytes envelopes and overages + 1.25 x per-store transactions 2500 per-store transaction size 610 Kilobytes total transaction size 723 Megabytes total transaction count 3.032.500 Customer Transaction Data

Slide 19

Slide 19 text

Challenge: don't DDoS ourselves

Slide 20

Slide 20 text

Solution: build a local "cache"

Slide 21

Slide 21 text

SQLite packages the entire database into a single, cross-platform compatible file. - SQLite documentation

Slide 22

Slide 22 text

Learning: develop with constraints

Slide 23

Slide 23 text

Learning: build for offline-first

Slide 24

Slide 24 text

03 The Farm Feeding without the Frenzy

Slide 25

Slide 25 text

2 out of 3 farms use IIoT but farmers aren't SW engs

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

Learning: optimize generously

Slide 29

Slide 29 text

Learning: use boring hardware

Slide 30

Slide 30 text

edge compute nodes 115 containerized workloads 900 data transfer / month 80 Terabytes combined memory 115 Gigabytes combined CPU 103 GHz Boring Hardware?

Slide 31

Slide 31 text

Powerful Food arstechnica.com/science/2023/05/researchers-craft-a-fully-edible-battery

Slide 32

Slide 32 text

Thank you speakerdeck.com/ksatirli