Inspiration

Play 29

Play 29 is an online multiplayer cards game platform(iOS + Android + Web) born out of COVID-19 lockdown. It features real-time game play, watch, chat, buzz, and multiple shuffle options including revolutionary self-shuffle that players love and enjoy all over the world.

The platform is built on Google Cloud Platform(GCP) and have worked really well. 95% of users are on a mobile device connected to the internet via cell towers. However, the number one complaint from users are involved with connection issues and latency. For example, when players are sitting next to each other there is noticeable lag between the time a player plays a card and appearing on everyone's screen.

Amazon AWS/Verizon 5G edge computing challenge has been a great inspiration for me to rebuild the entire platform from ground up to take advantage of Verizon 5G and AWS edge computing to improve user experience in terms of connection reliability and latency. Verizon 5G and AWS edge computing enables Play 29 to have real-time game play experience as if players are connected on the same Wi-Fi network.

Since COVID-19 lockdown, players have gotten really fast at deciding which cards to play as users have gotten comfortable with the application, and the UI(iOS + Android + Web) has been optimized for super-fast game play. Verizon 5G combined with AWS Edge computing, and a brand new back-end Play 29 is able to meet the players demand.

What it does

Play from NYC to Mumbai @ the speed of light

Based on my demo I am able to send your card/move from NYC to Mumbai, India in 1/10th of a second. Literally at the speed of light. That is the theoretical limit.

The speed of electricity is the same as the speed of light. The cards you play are just electrical signals. Given the physical distance between NYC and Mumbai it takes about 100ms for light to travel from NYC to Mumbai.

If you play a card from NYC it will show up in Mumbai in little over 100ms. In other words, it will get there at the speed of light.

This is just ridiculous.

It’s possible b/c your cards and moves never enters the public internet. Signals travel over Amazon fiber optics. Thanks to Amazon Peer Connection.

How we built it

The project is built using Reactive Spring Boot as distributed microservices to serve client side streaming and API requests. Kafka and Zookeeper is used to pass messages between the microservices. Redis is used as a fast database for storing user and game data. The microservices run as a docker container hosted in EC2 instances in Virginia, Mumbai, and NYC(Verizon/AWS). The three locations are connected in a docker swarm to provide inter-region connectivity via AWS Peer Connection. AWS Global Accelerator is also used to provide a single URL to reach the nearest server based on user's location to provide low-latency connection.

Note: AWS Global Accelerator does not yet support Wavelength.


Website

NYC https://nyc.play29.com

Virginia https://va.play29.com

Mumbai https://mumbai.play29.com

Global Accelerator https://api.play29.com


A simple use case is when someone makes a move on the game while connected to Verizon wireless network anyone who is watching/playing that game will see it before anyone else. For example, a Verizon wireless connected device has just played a card. Everyone who is playing the same game or watching it will eventually see that the card was played on their screen. However, because of how awesome Verizon 5G and AWS Edge computing is everyone who is also connected to Verizon wireless will see the card appear on their screen before everyone else.

What ? How ?

Allow me to explain. When a play is requested on Verizon wireless in NYC it is verified and processed on a server hosted in Verizon/AWS datacenter. The request haven't left the verizon network and haven't entered the public internet. As soon as the play is verified and processed the server does two things. It bounces back the event of a play immediately to everyone who is streaming/playing this game on Verizon wireless and sends a kafka message to be delivered everywhere else such as Virginia and Mumbai. Thus, if you are connected to Verizon wireless in NYC you will receive the event immediately from the server that generated the event. It will avoid a round trip from Virginia. However, if you are located in NYC but not on Verizon wireless you will receive the event from the server located in Virginia. You will experience additional delay between the event being sent to Virgina and back to NYC over the public internet. Thus, the Verizon wireless player will get the event before anyone else.

This statement can be verified with ping-tools(below). Enter https://va.play29.com in the URL field and hit submit. Take note of the average response time. Enter https://nyc.play29.com in the URL field and hit submit. Now compare the average response times and validate that the NYC endpoint has faster response time if you are located in NYC.

Visit ping-tools a custom tool made specifically for 5G Edge Computing Challenge in order to verify and testing live response times.

Ping-Tools: https://ping-tools.web.app


Challenges we ran into

Client side load balancing as Edge instances cannot be accessed outside of Verizon wireless

Accomplishments that we're proud of

Super-fast game play with a stable connection

What we learned

Quickly respond to events. Avoiding round trips to centrally located servers and the public internet have huge effect on latency.

What's next for Play 29

QA & Release iOS + Android app update to take advantage of the newly built API.

Built With

  • aws-global-accelerator
  • aws-peer-connection
  • docker
  • docker-swarm
  • java
  • kafka
  • reactor
  • redis
  • spring-boot
Share this project:

Updates

posted an update

Play from NYC to Mumbai at the speed of light

Based on my demo I am able to send your card from NYC to Mumbai, India in 1/10th of a second. Literally at the speed of light. That is the theoretical limit.

The speed of electricity is the same as the speed of light. The cards you play are just electrical signals. Given the physical distance between NYC and Mumbai it takes about 100ms for light to travel from NYC to Mumbai.

If you play a card from NYC it will show up in Mumbai in little over 100ms. In other words, it will get there at the speed of light.

This is just ridiculous.

It’s possible b/c your cards and moves never enters the public internet. Signals travel over Amazon fiber optics. Thanks to Amazon Peer Connection.

Log in or sign up for Devpost to join the conversation.