Blef-team / blef_game_engine

The game engine API service for the game of Blef
GNU Affero General Public License v3.0
1 stars 0 forks source link

Clean public games periodically #170

Closed maciej-pomykala closed 2 years ago

maciej-pomykala commented 3 years ago

We need to prevent the queries of public games from DynamoDB from consuming too much data.

We already make games private when they begin.

However, we should also have a Lambda function that gets triggered on a regular schedule (say, every 30 minutes) and privatises games that are public but have been inactive for a long time (say, last modified longer than 30 minutes ago).

adrian-golian commented 3 years ago

I believe this is made obsolete by one of the later commits in #169 EDIT: This one: https://github.com/Blef-team/blef_game_engine/pull/169/commits/b78b4b87fb11ef0fc86ef2e4d16e6a5b8e905f31

maciej-pomykala commented 3 years ago

I think it's not, actually. We stopped displaying those games by filtering the results of the query we make for public games. But they are still public and we just filter them using FilterExpression, which means that the query still accesses them, but just doesn't return them to us. When we make those games private they will be outside of the KeyConditionExpression, which is when they finally won't be accessed by the query and won't impose costs on us.

create-issue-branch[bot] commented 2 years ago

Branch issue-170-Clean_public_games_periodically created!