In this repo I'm practicing with Mix and OTP; Agents, GenServers, Task, Supervisors, Distributed tasks, etc.
This project is based into project Mix and OPT
This project is a variant of KV Umbrella; I've used phoenix_pubsub_redis to discover Rkv nodes Dynamically
I've configured a Dev container project for VS Code, when you open this project make sure to use "open in a container" option.
If you don't have docker or not want to use Dev containers, can execute the commands to start the server and workers with your own redis configuration ej: REDIS_HOST=localhost REDIS_PORT=6379 iex --sname server_rkv -S mix
cd rkv_umbrella
iex --sname server_rkv -S mix
Open a terminal for each one
Ej: Terminal 1
cd rkv_umbrella/apps/rkv
iex --sname worker0_rkv -S mix
Ej: Terminal 2
cd rkv_umbrella/apps/rkv
iex --sname worker1_rkv -S mix
In other terminal install telnet (if you don't have it)
apt-get update
apt-get install telnet
then:
telnet 127.0.0.1 4040
now: you can play with these commands via telnet (tcp)
CREATE BUCKET my_bucket
LOOKUP BUCKET my_bucket
PUT my_bucket milk 4
GET my_bucket milk
DEL my_bucket milk
DELETE BUCKET my_bucket