Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify client and server, allow multiple instances in the same process #20

Open
ale-rinaldi opened this issue Nov 8, 2019 · 2 comments

Comments

@ale-rinaldi
Copy link
Member

ale-rinaldi commented Nov 8, 2019

There's no reason why client and server should be two different executables. Also, there's no reason why a single process can hold only a single configuration.

It would be more comfortable to be able to insert multiple configurations into the same YML file, and run them together into the same process. Each config would have a "type" parameter to specify if it's client or server.

For example:

pcToServer:
    type: client
    description: "I am the first client"
    listenAddr: "127.0.0.1:59402"
    dstAddr: "203.0.113.1:59401"
    webManager:
        listenAddr: "0.0.0.0:9001"

pcToAnotherServer:
    type: client
    description: "I am the second client"
    listenAddr: "127.0.0.1:59402"
    dstAddr: "203.0.113.2:59401"
    webManager:
        listenAddr: "0.0.0.0:9002"

iAlsoActAsServer:
    type: server
    description: "This time, I am a server"
    listenAddr: "0.0.0.0:59501"
    dstAddr: "127.0.0.1:59301"
    webManager:
        listenAddr: "0.0.0.0:9003"

To keep compatibility with the current config file, a configuration named "client" would automatically set its type as client, and a configuration name "server" would automatically set its type as server.

This issue is also a discussion point to evaluate the feature: if you feel like this could break your workflow, or that there's a better way to handle this, let's talk about it!

@xela92
Copy link
Contributor

xela92 commented Dec 9, 2019

If it's not gonna break compatibility with the actual configuration (that I feel more confortable, even if it's limited) I think it could be useful to manage complex configurations. One can simply configure everything he needs in one place and then run one single process to handle everything. Do you think it could have side effects? E.G. limit speedrates?

@Marctraider
Copy link

It would indeed be handy having just a single executable for both client/server, easier for future development/build generation and for end users to maintain/update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants