DEV Community

Cover image for Scoreboard of Rose Bowl Games powdered by Redis & MySQL - Use Terraform To Provision All Resources
mrboogiej
mrboogiej

Posted on • Edited on

Scoreboard of Rose Bowl Games powdered by Redis & MySQL - Use Terraform To Provision All Resources

Here is a tutorial to simulate a scoreboard of past Rose Bowl Games, with MySQL as the persistent data store and Redis as the cache layer.
You can also apply this solution to your backend of mobile gaming, sports event, online education, etc.
Watch Now (15 mins)>

【Main Contents】
1) Deploy the cloud resource: Redis, MySQL, ECS, using Terraform script
2) Configure application environment - Java, step by step
3) Demonstrate the SQL Query either through cache(Redis) or database(MySQL)

You will learn followings.
💯 Using Redis as data cache to accelerate data accessing to database.
💯 The simplest solution for RDS MySQL database caching with Redis. This solution relies on the expiration time (TTL) of the key in Redis. Redis won't be updated proactively when MySQL is updated.

💡 The approach is simple to implement, but the inconsistency duration may be very long especially for the scenario that the read request is very frequent and the expiration time is relatively long, a lot of long-term dirty data will be generated.

【Source Code】
Please refer to the documentation on GitHub.

【About ApsaraDB for Redis】
ApsaraDB for Redis Series >

【Bonus】
Get up to 60 days FREE trial now >

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay