# Open Source in Israel - Ground Control

- Speaker: [Dotan Nachum](/wiki/speakers/dotan-nachum.md)
- Event: [Reversim Summit 2014](/wiki/years/2014.md)
- Video: https://www.youtube.com/watch?v=02c0z_ErW1E
- Transcript: [/transcripts/2014/19-02c0z_ErW1E.md](/transcripts/2014/19-02c0z_ErW1E.md)
- Language: Hebrew · Type: ignite · Level: intermediate
- Topics: [Software Engineering](/wiki/topics/software-engineering.md), [IoT](/wiki/topics/iot.md), [Debugging](/wiki/topics/debugging.md)

> Written by an LLM from machine transcripts. It can contain errors. Check the transcript before you quote it.

## Summary

The speaker presents Ground Control, an open-source monitoring and control daemon designed for low-power devices like the Raspberry Pi. Faced with strict resource limitations, the speaker chose Go over Python for its efficiency, low memory footprint, and ease of cross-compilation. The resulting application provides system health metrics, alerting features, and a declarative web UI for executing custom commands like operating home appliances. Ultimately, the talk demonstrates how lightweight systems programming in Go can effectively manage resource-constrained hardware.

## Key points

- [0:08](https://www.youtube.com/watch?v=02c0z_ErW1E&t=8s) The speaker introduces Ground Control, a project built to monitor the health and performance of a Raspberry Pi.
- [0:08](https://www.youtube.com/watch?v=02c0z_ErW1E&t=8s) After rejecting Python due to excessive memory consumption, the speaker chose Go for its efficiency and low resource usage.
- [1:14](https://www.youtube.com/watch?v=02c0z_ErW1E&t=74s) Ground Control collects system metrics such as disk usage, temperature, and CPU load using an Elasticsearch Go library.
- [1:14](https://www.youtube.com/watch?v=02c0z_ErW1E&t=74s) The daemon pushes metrics to external services like Librato and Graphite to provide alerts and SMS notifications.
- [2:22](https://www.youtube.com/watch?v=02c0z_ErW1E&t=142s) The project includes a declarative web UI and API configured through a simple file to execute commands like controlling home appliances via an IR blaster.
- [3:22](https://www.youtube.com/watch?v=02c0z_ErW1E&t=202s) The final Go binary is self-contained, lightweight at around 4 megabytes, and runs smoothly on resource-constrained hardware.
- [4:29](https://www.youtube.com/watch?v=02c0z_ErW1E&t=269s) Go enables seamless cross-compilation, allowing developers to build binaries on a Mac and deploy them directly to Linux-based ARM devices.

## Takeaways

- Use Go when developing applications for resource-constrained environments like the Raspberry Pi to minimize CPU and memory overhead.
- Leverage cross-compilation capabilities to easily build software on powerful workstations and deploy it to distinct target architectures.
- Design configuration-driven, modular architectures with interfaces to make utility tools adaptable for various use cases.

## Questions this talk answers

- Why is Go a better choice than Python for resource-constrained devices like the Raspberry Pi?
- How does cross-compilation work in Go for different target architectures?
- How can a lightweight monitoring daemon be structured to handle both system metrics and custom UI commands?

## Technologies

Go, Python, Raspberry Pi, Elasticsearch, Graphite, Librato

## Tags

cross compilation, iot, monitoring, raspberry pi, systems programming
