Liam Muller

BS of CS @ RIT

Remote - EST

Hubworld Pulse is a very simple application developed as a test meant to solve a similar problem that Raidr set out to solve, in a different way.

If you haven't already read about Raidr, I would suggest heading over there first to gain some context surrounding the project.

Raidr is an active tool mean to schedule time to play games with other. Hubworld Pulse is instead a passive tool. Rather than creating a calendar event and inviting a friend every time you want to play a game, in Hubworld Pulse you simply flip a switch indicating that you are online. This online status is visible to any of your friends and is a live update to anyone inside of the app. "Pulse" comes from the idea that by marking yourself as online, you are sending out a pulse to all of your friends that you are currently available. My idea for this came because apps like Discord, Steam, Origin, etc, have an online status, but that doesn't necessarily mean that you are looking to play with others - it just means the app is open. In Hubworld Pulse, being "online" means "I'm available right now. Reach out to me if you want to play.". This concept within multiplayer gaming is often called LFG - Looking For Group, but it usually is for people seeking parties to join that they are not usually a part of. Pulse is all about letting your friends know that you're ready to get together, and checking to see which of your friends are feeling the same.

In terms of development, Hubworld Pulse is probably the simplest app I have written. I wanted to try something different so I used AWS Appsync to work as my backend. In Appsync I defined my GraphQL schema as well as mutation and subscriptions. From there I wrote my resolvers inside of the Appsync UI. They connect directly to a DynamoDB instance that stores user, friend, and online data. The logic behind the online status is extremely simple. When you login, you can toggle your online status. This action fires a mutation that sets a database entry in the online table with a set TTL. Having an entry in this table with the TTL being in the future signifies that you are online. When the TTL is hit, DynamoDB will automatically delete the record. This is to ensure you do not just become "online" and close the app and stay online forever. While the app is open and you are online, this mutation will occassionaly ping again to push back that TTL. When you want to go offline, the same mutation is called with a TTL of 0 so the record is immediately invalidated and promptly autodeleted.

To view the online status of your friends, I use subscriptions within Appsync. When you are looking at your friends list, you are subscribed to their online status changes so if you have the app open you won't need to refresh to see if there are changes - you will see them in realtime!

Working with Appsync was very interesting because I have always written my own code for my backend APIs, but in Appsync the most intensive work was editing the VTL code within custom resolvers to make sure they would be querying the correct resources.

In the long-term, I would love to integrate this functionality into the full Hubworld application now that I have done it once.