Lightweight RESTful lobby service that supports different games simultaneously backed by Redis. It functions similarly to the JackBox game lobby, but has additional (optional) features. You'd use this service to allow game clients to locate game servers hosted by peers.
Swagger exposes the API; rely on it instead of documentation which may be out of date. You can also check out the API controller.
Create a lobby for the "gitgame" game:
curl -H "Content-Type: application/json" -X POST -d '{"port":6969,"name":"host nickname","hidden":false,"meta":{}}' https://lobby.autometa.io/api/gitgame
This can be extended with metadata:
curl -H "Content-Type: application/json" -X POST -d '{"port":6969,"name":"host nickname","hidden":false,"meta":{"metakey1":"metavalue1","metakey2":"metavalue2"}}' https://lobby.autometa.io/api/gitgame
Look for lobbies for the "gitgame" game:
curl -H "Content-Type: application/json" https://lobby.autometa.io/api/gitgame
Search results can be further filtered by metadata.
Lobbies that are not called for a time are dropped. Call this method to refresh the TTL. This is for a lobby with an ID of "2KQPG" for the "gitgame" game.
curl -H "Content-Type: application/json" https://lobby.autometa.io/api/gitgame/2KQPG
Join a lobby as a player named "player1", declaring a desire to use port 7000. This isn't technically necessary to use the service.
curl -H "Content-Type: application/json" -X POST https://lobby.autometa.io/api/gitgame/2KQPG/player1?port=7000
This method is overloaded. If the caller is the host, they can kick any player. If they kick themself, the lobby is destroyed. If the caller is not the host, they may only kick themself. This isn't technically necessary to use the service.
curl -H "Content-Type: application/json" -X DELETE https://lobby.autometa.io/api/gitgame/2KQPG/player1
- Create a Redis ElastiCache server.
- Set up an AWS Lambda function targetting Io.Autometa.Lobby.Server::Io.Autometa.Lobby.Server.Gateway::FunctionHandler. Set the ElasticacheConnectionString environment variable on it to point to the Redis server. Give it permissions to access the Redis server.
- Set up an API Gateway to point to the Lambda function. It should be set up in proxy mode, since the same function will handle all paths.
- Set up an external DNS in AWS and point it to the API Gateway.
TODO: Make this all automatic on publish.
See the integration test for an example.