All work

Backend

Building the services behind Avicus Network

Services that ran game servers across dedicated machines for Avicus, a Minecraft network with 579K unique players, plus its GraphQL API and client tools.

Avicus Network LLC · Software Developer · Dec 2015 – Dec 2017

The problem

Avicus was a Minecraft network running game servers across several dedicated machines. It needed services to start, stop and coordinate those servers, an API that the team and outside developers could build on, and deploys that didn’t eat half a day.

What I built

  1. Rails APIGraphQL schema
  2. Introspectionschema as JSON
  3. graphql_java_genERB templates
  4. Java clientquery builders + responses
  5. Pluginstyped API calls
How the game servers got a typed client for the API.

Using the generated client

A sketch of the idea, not the production code.

# generate
schema = GraphQLSchema.new(introspection_json)
GraphQLJavaGen.new(schema, package_name: "net.avicus.api", custom_scalars: ...).save(path)

// use it from a plugin
query = Schema.query(q -> q.user(id, u -> u.username().rank(r -> r.name())))
response = QueryResponse.fromJson(api.post(query.toString()))
if response.getErrors().isEmpty(): show(response.getData().getUser())

The scale

Over its life the network saw 579K unique players, 8M unique logins and 105M unique player-to-player encounters.

Stack

Links