← Back to the chapter · Previous detail · Next detail →
Technical detail · Choosing a Programming Language
Runtime Costs and Boundary Ownership
Some runtime terms need a concrete meaning. Garbage collection automatically reclaims memory that is no longer in use, but can take time while the program runs. The heap high-water mark is the largest heap use observed in a run. A TLS footprint is the memory and storage used by the library that protects network traffic. A linker script tells the build where code and data go in device memory. Both ends must agree on the fields in their shared data.
Runtime costs also decide whether a language is evidence for the target. Garbage collection, interpreter startup, package size, TLS library footprint, task stack, allocator policy, exception handling, debug logging, and update image size can change memory, power, and recovery behavior. Record those costs with the same seriousness as source code. For a battery node, boot-to-sample time, wake-to-publish time, heap high-water mark, sleep current, and watchdog recovery matter more than how compact the prototype source looks.
- Schema boundary: keep JSON Schema,
.protofiles, OpenAPI examples, CBOR maps, unit conventions, timestamp rules, and error states versioned with test vectors. - Runtime boundary: record interpreter footprint, garbage collection, event-loop delays, thread/task model, blocking calls, package size, startup time, and update footprint.
- Tooling boundary: record compiler version, board profile, SDK version, package lockfile, linker script, feature flags, static-analysis output, and debug/probe method.
- Handoff boundary: state what to keep, rewrite, check on target, or discard when moving from script, simulator, gateway app, or dashboard code to target firmware.
The language decision is strong when a reviewer can repeat the target run, host run, and shared-interface tests and see which constraints each runtime actually proved.
A mixed-language prototype is therefore healthy only when it has a boundary owner. One owner keeps the schema and test vectors current. One owner confirms target measurements after firmware changes. One owner records dashboard or gateway assumptions. Without those owners, each language can be locally reasonable while the system contract drifts across payload fields, units, error states, and retry behavior.