Sinq is a renowned chain of hotels and bars across Goa dedicated to provide premium experiences to their patrons. A unique project, Bar Wars, was ideated by them with a goal to provide a unique experience to their guests at a new heritage property. Logic Square helped them make this idea a reality.
Innovation
The brief given by the client was to build a game application for a bar that works similar to a stock exchange, controlling the prices of all drinks (instead of shares) depending on the demand for the same.
Similar drinks are paired and a competition begins among those who favor Drink A v/s Drink B. Prices fluctuate, and the popular drink is dynamically priced lower while the less popular drink is priced higher.
On special conditions, bartender can offer free or bonus (1+1) drinks as well.
Challenge
Our team ideated to provide the best solution for the above.
The system had to maintain state of the order sequence, current prices, and control timed events where special prices are made available.
The challenging part on this project was to maintain state accurately and the need to be highly precise in the algorithm.
A small mistake could lead to a chaotic system with 200+ patrons receiving incorrectly priced drinks.
What we used
Technology
Vue JS
Node JS
Ionic Framework
Mongo DB
Redis
Socket.IO
Conclusion
To achieve this, we separated the core business logic into a npm package which uses Redis to maintain transient state of the game and uses the Redis PubSub feature to communicate the state with the main service which in turns communicates real-time with the front end applications via socket.io.
Bar Wars is built on NodeJS, Vue JS and leverages technologies like Redis, Socket.io etc.
Currently, they host a party powered by Bar Wars that works on the agenda “the more you drink, the less you pay”.