Hi,
I want to implement something like this. Lets say I have 10 genserver nodes connected in the circle.
How are they connected ? Every genserver contains “PID” of its successor genserver.
Every genserver contains in the state some random “KEYS” as well. Lets say I start the entire system.
Now all the 10 genservers are up and running. Now I select one genserver and ask for the key using “Genserver.call” [I do this from iex shell] . The current genserver can contain the key or not. If it does not contain the key then the GenServer makes a call on the successor genserver using “GenServer.call”. This is how the cycle goes. Once the keys is found the answer is returned.
But my GenServer.call leads to a timeout. Let’s say I increase the timeout time for 10 nodes. But what if my system contains “1000000” nodes.
How to solve this problem ? I am very new to elixir.