carlquistb / FormulaCraft

An SMS-based service for running Minecraft server on AWS.
MIT License
0 stars 1 forks source link

close stack after player initiated shut down #12

Closed carlquistb closed 4 years ago

carlquistb commented 5 years ago

We will work together on this

carlquistb commented 5 years ago

question: do we need to use the minecraft save command before the s3 upload?

carlquistb commented 4 years ago

event handers

lambda function / API gateway

simple. Operates similarly to other functions on the API. Phase 2 addition: verifies that no players are on the server and supplies an error if there are.

other?

I think the best thing to do would be to have all triggers utilize the same event. However, it may not be possible to assign permissions to the lambda function to the ec2 instance.

triggers

shut down stack through player comment in-game

we can listen and react to player comments in-game, but reactions occur on the server level. It is bad practice for the server-level to be able to shut down the stack, so we'd need to pipe the request back up and create another channel for that. (booo) This trigger should be delayed indefinitely, until we have a more concrete structure for our channels in and out of the stack.

shut down stack through user request on site

we can use the API channels to initiate the shut down of a stack from the site. This would also give a UI (in the future) for monitoring the shut-down for errors.

shut down stack automatically when idle for 15 minutes

This seems like the most important trigger, but I know the least about how to implement it. We would need to implement what I had considered a phase two concept, which is listening to game comments such as "___ has left the game." We should implement this in phase two, but not in the first part. My thought is to move this trigger into phase 2.

carlquistb commented 4 years ago

this is done!

There is a new issue for the 15 minute plan. That will take a little more doing to use good style.