fix clustering problems with singleton processes#1330
Conversation
|
@Teifion @geekingfrog Please let me know what do u think 🙏 |
|
Thank you for taking the time to make this PR, I've not had a chance to go through it properly at all but the first thought is there's a little bit of context missing here. The main part being many of these sections are going to be removed as we swap from the Spring protocol to the Tachyon protocol and this is probably not the right time for this PR (though some of the config stuff may well be very appropriate). If you are on the discord (there is no obligation to be there) please feel free to ping me if you see me online and I'll happily jump into a voice chat with you to answer questions in real time if that is of interest to you. |
|
Yeah, I'm not really into teiserver :D |
|
I don't intend to close the PR without a proper examination and evaluation of what parts should be cherry picked out :) |
geekingfrog
left a comment
There was a problem hiding this comment.
There is an AI policy that you almost certainly ignored, the description screams llm.
The author of the PR must write the description in part to demonstrate their understanding of the chnage. [sic]
Then, this PR does too many things.
- automatic cluster formation with libcluster
- "fix" singleton conflicts
- just file to start several nodes locally
That should be broken down.
And finally, we are not going to do clustering for the lobby protocol, fixing the singleton conflict for these is a complete waste of time.
For tachyon (and matchmaking), maybe that makes sense, but it still doesn't fix the problem of what happen when the node running the queue goes down. What happen to the state then?
Simply fixing the error at startup isn't enough.
|
Thanks for honest review! |
Proposition of fixing clustering in teiserver 🤞
Fix
Why env reads moved to runtime.exs
config.exs/test.exs are evaluated at build time: for a release, a System.get_env there bakes in the build machine's environment and is ignored at server start (it only appears to work in dev because Mix re-evaluates config each run). runtime.exs is evaluated at boot in every environment and loads last, overwriting earlier config per key.
Testing
you can run different nodes using just command that automatically bumps required ports to avoid conflicts
https://github.com/casey/just