inspired from https://github.com/ukigumo/Ukigumo-Server/blob/master/lib/Ukigumo/Server.pm#L17.
However it's different architecture Server and Agent, so may not need this logic.
How do you think?