Version 1.3

Vortrag: A Tale of Overengineering

How we Implemented the SpaceAPI in Rust

Rust logo 128x128

A talk about the implementation of the SpaceAPI in Rust.

At the hackerspace coredump we started to play around with the Rust programming language around 2015. In order to learn the language by means of overengineering a real world project, we started an implementation of the SpaceAPI. Since then the project grew and includes:

spaceapi-rs (https://github.com/coredump-ch/spaceapi-rs) Implementations of the SpaceAPI types
spaceapi-server-rs (https://github.com/coredump-ch/spaceapi-server-rs) Server which uses the Iron (https://docs.rs/iron/) framework to serve the SpaceAPI JSON. To support dynamic data like sensors it provides a REST API to update values in a redis database.
status (https://github.com/coredump-ch/status) The SpaceAPI implementation for coredump, based on spaceapi-server-rs

In the meantime, we also implemented a SpaceAPI validator (https://github.com/spacedirectory/validator) micro-service which checks if a given JSON object according to the SpaceAPI schema.

We will give a tiny overview about the SpaceAPI, if you're interested in the details you should attend the "The SpaceAPI, and Why Your Hackerspace Should Implement It" talk. We will then continue to show how we replace our 50 lines Python implementation of the SpaceAPI with a slightly overengineered Rust iplementation, consisting of multiple crates. Then we will take a look at how we used Rust's type system to reach our design goal of "making it impossible to produce invalid SpaceAPI JSON".

Info

Tag: 17.06.2017
Anfang: 18:30 Uhr
Dauer: 00:45
Raum: Movie Room
Track: Software
Sprache: en

Links:

Dateien

Concurrent Events

Workshop Room
42birds: Creative Coding with Processing