Skip to content

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

@ale-rinaldi

Description

@ale-rinaldi

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions