Closed bumblepie closed 6 years ago
After exploring various options including Amazon RDS, DynamoDB, or hosting either MongoDB or Cassandra on EC2 instances, I've decided to use DynamoDB. The main issue with DynamoDB is that it doesn't give great flexibility when it comes to querying data, but I think that given the simplicity of the domain for this scenario (mainly fetching haiku related info by ids) it shouldn't be too much of an issue. It also fits in well with the serverless architecture I want to end up with. Another one of the main considerations was the fact that it is part of the forever free tier of AWS services - once the project is complete, you should be able to use dynamodb and lambda for free to host the API, and you should only need a single minimal instance to run the bot itself.
On further examination, DynamoDB's querying and index structure is pretty messy. RDS might be a better fit.
Currently the api "cheats" - it simply stores the haikus in memory. Look at something like Amazon Dynamo DB (with a view to move towards serverless infrastructure) to properly persist data.