Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Prototype API specification #9

Merged
merged 5 commits into from
Mar 9, 2022
Merged

Prototype API specification #9

merged 5 commits into from
Mar 9, 2022

Conversation

jdno
Copy link
Owner

@jdno jdno commented Mar 9, 2022

The API for Auto Traffic Control is built using the gRPC framework. Protocol Buffers are used to specify the data format of the API as well as its services and endpoints. gRPC has been chosen for this project for three reasons:

  1. gRPC and Protocol Buffers provide a strongly-typed interface. This reduces the chance of errors, and makes it easier to document the use the API.
  2. gRPC is widely supported in many languages, giving players the freedom to pick their tech stack.
  3. Auto-generated client libraries hide the low-level complexities of the API, and give players a simple starting point.

This commit introduces the first Protocol Buffer specifications, which aim to provide ongoing information about the state of airplanes in the simulation. The API exposes a single service and endpoint, which streams all state changes as events to the player. The specifications are linted during CI to ensure that we follow best practices.

A client library for Rust is auto-generated from the specification. The library has a feature flag to generate the server stubs, which are required by the game to implement the server-side of the API.

@jdno jdno self-assigned this Mar 9, 2022
@jdno jdno merged commit 9430133 into main Mar 9, 2022
@jdno jdno deleted the create-protobufs branch March 9, 2022 15:52
@jdno jdno added the R-added Add a new feature to the release notes label Mar 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
R-added Add a new feature to the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant