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

Adding Compute to your Conference Badge

Adding Compute to your Conference Badge

In this demo, Adrian Todorov and I explain the do's and dont's when building a SBC-powered conference badge.

This version of the talk was given at the Southern California Linux Expo (21st Edition) in March 2024.

Kerim Satirli

March 15, 2024
Tweet

Resources

More Decks by Kerim Satirli

Other Decks in Programming

Transcript

  1. computing that takes place at or near the physical location

    of the producer or consumer of data. point of presence mobile datacenter Similar: edge com·put·ing noun
  2. computing that takes place on your conference or event badge,

    using a SBC and e-paper screen. noun badge com·put·ing
  3. PiDayConf "Nomad" screen "Baedge" screen Allocation: 1a2b3c4d Address: 192.168.0.246 Version:

    1.7.5 Nomad Runtime PiDayConf Kerim Satirli Model: 2in7b Revision: v2 BAEDGE
  4. Software Support ▪ operating system (type and version) ▪ system-specific

    device fingerprinting ▪ driver and port availability Hardware Support ▪ CPU architecture and speed ▪ resource availability (disk / memory) ▪ security rating (ports exposed or sealed) Targeting Patterns
  5. Uplinks ▪ wired or wireless (or both) ▪ fall-back uplinks

    and networks ▪ additional uplink methods Power ▪ hardwired or battery ▪ battery health (cycles, maintenance) ▪ battery percentage vs. required runtime Targeting Patterns, cont'd.
  6. HashiCorp Nomad https:!"nomadproject.io/ Container Orchestration Deploy, manage, and scale containers

    in production with ease. Application Orchestration Deploy and manage legacy applications without the need to refactor or rewrite. Alternative to Kubernetes Deploy and scale containers without complexity. Multi-Orchestrator Pattern Deploy and scale containers with multiple orchestrators. Multi-OS Support Deploy to Linux, macOS, or Microsoft Windows. Edge Workload Management Globally scale edge deployments with a simple single-cluster topology.
  7. job "baedge" { region = "baedges" datacenters = [“edge"] node_pool

    = "baedges" type = "system" namespace = "default" priority = 10 constraint { attribute = "${attr.kernel.arch}" value = "aarch64" } group "baedge" { constraint { attribute = "${meta.battery_level}" operator = ">" baedge.nomad.hcl Constraints
  8. node_pool = "baedges" type = "system" namespace = "default" priority

    = 10 constraint { attribute = "${attr.kernel.arch}" value = "aarch64" } group "baedge" { constraint { attribute = "${meta.battery_level}" operator = ">" value = "33" } constraint { attribute = "${meta.battery_cycles}" operator = "<" value = "400" } constraint { attribute = "${meta.epaper_size}" value = "2in7b" baedge.nomad.hcl Constraints
  9. value = "33" } constraint { attribute = "${meta.battery_cycles}" operator

    = "<" value = "400" } constraint { attribute = "${meta.epaper_size}" value = "2in7b" } constraint { attribute = "${meta.epaper_revision}" value = "V2" } ephemeral_disk { migrate = true size = 128 sticky = false } baedge.nomad.hcl Constraints
  10. local-first ▪ limit need for active uplinks ▪ gracefully degrade

    service ▪ architect for local operations reconnecting ▪ back-off and retry strategy ▪ support for network roaming ▪ alternate backhauls) Connectivity Patterns
  11. data / system integrity ▪ data deduplication strategy ▪ forced

    updates ▪ manage device replacement lifecycle coverage ▪ continuously evaluate service ▪ map outages (time, physical location) ▪ expand coverage of network Connectivity Patterns, cont'd.
  12. Connectivity Spectrum Scan (2.4 GHz) 09:12 10:24 11:36 12:48 14:00

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 Channels
  13. namespace = "default" priority = 10 node_pool = "baedges" constraint

    { attribute = "${attr.kernel.arch}" value = "aarch64" } group "baedge" { disconnect { ttl = "4h" stop_after = "2h" replace = true reconcile = "keep_original" } ephemeral_disk { migrate = true size = 128 sticky = false } network { mode = "host" baedge.nomad.hcl Disconnect
  14. flexible ▪ hot-reload config ▪ functional tiers tolerant ▪ gracefully

    degrade ▪ easy deployments Application Patterns
  15. observable ▪ predict maintenance ▪ utilize digital twins mindfully replaceable

    ▪ data inheritance strategy ▪ modular SW / HW architecture Application Patterns, cont'd.
  16. """ application """ import importlib import logging import os import

    platform import qrcode from PIL import Image, ImageDraw, ImageFont import helpers as hlp import config as cfg logging.basicConfig(level=cfg.app["logging"]["level"]) hlp.log_debug(!#name!#, 'detected platform: `' + platform.system() + '`') baedge.py
  17. object: Object containing EPD library and configuration """ hlp.log_debug('initialize_screen', 'init

    function') try: epd = epd_library.EPD() hlp.log_debug('initialize_screen', 'initialize screen') epd.init() hlp.log_debug('initialize_screen', 'clear screen') epd.Clear() hlp.log_debug('initialize_screen', 'end function') return epd except IOError as e: hlp.log_exception('initialize_screen', e) return None def clear_screen(epd, sleep_screen=False): """ Clear contents on screen baedge.py