DEV Community

Cover image for Wheel Of Fortune
Jack McGuire
Jack McGuire

Posted on

Wheel Of Fortune

Overview of My Submission

A Wheel Of Fortune project that utilises REDIS in order to maintain wheel segment prize allocation and distribution.

This project comes with a GRPC Server, Client and Admin client built in GO to maintain wheels.

A VUEJS website built with GRPC, ENVOY was created to spin the virtual Wheel Of Fortune!

Submission Category:

Wacky Wildcards

Screenshots!

Wheel Of Fortune vueJS app

Frontend - backend GRPC

Server listening!

Wheel spins - CLI

Language Used

GO, Javascript, LUA

Link to Code

GitHub logo jackmcguire1 / wheeloffortune

grpc - wheel of fortune svc

REDIS - Wheel Of Fortune

A simualted Wheel Of Fortune backed by Redis exposed by a GRCP Server & Client.

How it works

This project simulates a Wheel Of Fortune by making use of Redis to maintain the segments of a wheel i.e. prize allocation and distribution

The server makes use of Redis LUA scripts to synchronously execute user spins and exposes an API via GRPC to maintain and spin and wheels of fortune!

How the data is stored:

Segments and Operational Flags of a wheel of fortune are stored in Redis Keys.

Wheel Of Fortune Creation

  • When a wheel is CREATED the following keys are generated:
wheel of fortune segment(s)

For each defined segment within a wheel of fortune with an allocated prize a REDIS key like 'wheel:{wheelname}:segment:{index}', data is stored like INCRBY {KEY} {VALUE} in a TX

wheel of fortune Enabled Status

To set the enable status…

Additional Resources / Info

  • REDIS for wheel of fortune management
  • GO to expose a GRPC API
  • ENVOY is used to provide a HTTP TO GRPC proxy
  • VUEJS for front-end webapp

Jack McGuire https://github.com/jackmcguire1

Top comments (0)