All Projects → cjus → hydra-hpp

cjus / hydra-hpp

Licence: MIT license
Hydra Hot Potato Player (game)

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to hydra-hpp

hare
🐇 CLI tool for websockets and easy to use Golang package
Stars: ✭ 40 (+233.33%)
Mutual labels:  sockets, messaging
Hydra Express
A module which wraps Hydra and ExpressJS into a library for building distributed applications - such as microservices
Stars: ✭ 166 (+1283.33%)
Mutual labels:  distributed-computing, hydra
Hydra
A light-weight library for building distributed applications such as microservices
Stars: ✭ 611 (+4991.67%)
Mutual labels:  distributed-computing, hydra
Bigq
Messaging platform in C# for TCP and Websockets, with or without SSL
Stars: ✭ 18 (+50%)
Mutual labels:  sockets, messaging
plivo-python
A Python library for communicating with the Plivo API and generating Plivo XML.
Stars: ✭ 57 (+375%)
Mutual labels:  messaging
lightning-hydra-template
PyTorch Lightning + Hydra. A very user-friendly template for rapid and reproducible ML experimentation with best practices. ⚡🔥⚡
Stars: ✭ 1,905 (+15775%)
Mutual labels:  hydra
Whatsapp Android App
This is sample code for layout for chatting app like Whatsapp.
Stars: ✭ 32 (+166.67%)
Mutual labels:  messaging
Server
FerrisChat's Server
Stars: ✭ 21 (+75%)
Mutual labels:  messaging
sample-spring-cloud-stream
sample microservices communicating asynchronously using spring cloud stream, rabbitmq
Stars: ✭ 22 (+83.33%)
Mutual labels:  messaging
gordo
An API-first distributed deployment system of deep learning models using timeseries data to predict the behaviour of systems
Stars: ✭ 25 (+108.33%)
Mutual labels:  distributed-computing
SuperSimpleTcp
Simple wrapper for TCP client and server in C# with SSL support
Stars: ✭ 263 (+2091.67%)
Mutual labels:  messaging
ShadowClone
Unleash the power of cloud
Stars: ✭ 224 (+1766.67%)
Mutual labels:  distributed-computing
raven-distribution-framework
Decentralized Computing Backend for Artificial Intelligence, Web3, Metaverse, and Gaming Application
Stars: ✭ 31 (+158.33%)
Mutual labels:  distributed-computing
zenoh-c
zenoh client library written in C and targeting micro-controllers.
Stars: ✭ 28 (+133.33%)
Mutual labels:  messaging
azure-service-bus-go
Golang library for Azure Service Bus -- https://aka.ms/azsb
Stars: ✭ 67 (+458.33%)
Mutual labels:  messaging
amqv7-workshop
No description or website provided.
Stars: ✭ 22 (+83.33%)
Mutual labels:  messaging
specification
RDF vocabulary and specification
Stars: ✭ 21 (+75%)
Mutual labels:  hydra
socketwrapper
Async/Sync networking library including UDP, TCP and TLS/TCP socket classes written in C++ 17.
Stars: ✭ 33 (+175%)
Mutual labels:  sockets
muon-java
Muon Core for the JVM. APIs and Microservices taken to the next level
Stars: ✭ 18 (+50%)
Mutual labels:  messaging
rce
Distributed, workflow-driven integration environment
Stars: ✭ 42 (+250%)
Mutual labels:  distributed-computing

hydra-hpp

Hydra Hot Potato Player (game)

A variation on the children's classic game, Hot Potato. Adopted as a distributed computing example of network messaging using Hydra.

Read Building a Microservices Example Game with Distributed Messaging on the RisingStack community site.

Seeing this work

There are a few ways you can see this project working.

You can:

  • watch this quick video demo to see the game running across three machines on AWS.
  • or continue reading to build and run from the code in this repo.

Install

Installation is simple, just npm install to pull the package dependencies.

$ npm install

Requirements

This sample project has only one external dependency, a running instance of Redis. If you're new to Redis checkout this Redis quick start guide on YouTube.

You're free to run multiple instances of the Hot Potato Player on a single machine. However, it's a lot more fun to run multiple instances across a network of machines. If you try that, make sure your HPP instances and Redis are also network accessible.

Starting a game

Before you start a game, check the config object in the constructor of the hpp.js file. Make sure to update the Redis section with the location of your Redis instance.

"redis": {
  "url": "127.0.0.1",
  "port": 6379,
  "db": 1
}

Note: The Redis credentials in the config/config.json file are no longer valid. You can visit RedisLabs to create your own free account or simply point to a local Redis server or one you have access to.

You can add a player to the game by:

$ node hpp.js John true

This adds a player called John who is also the one initially holding the potato.

You can add other players, but make sure to provide unique names to keep results clear.

$ node hpp.js Susan

On another shell tab or machine:

$ node hpp.js Jane

After a 15 second countdown the game begins and the potato is passed around. The game ends after another 30 seconds and the player left holding the potato is declared the loser.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].