mstar.utils.socket_prefix

mstar.utils.socket_prefix#

Default IPC socket prefixes for the server entry points.

Every process of a deployment binds fixed names under its prefix (conductor.ipc, api_server.ipc, worker_0.ipc, …), and libzmq replaces an existing socket file on bind. Two servers on one prefix therefore take over each other’s inboxes, so each default here is unique to one server on the host.

Functions

per_launch_socket_prefix()

A new /tmp/mstar_<user>_<random> directory (mode 0700) for a server with no port of its own; the caller removes it at exit.

per_port_socket_prefix(port)

/tmp/mstar_<user>_<port>/ for an HTTP server: the port is already unique to one server on the host.

mstar.utils.socket_prefix.per_launch_socket_prefix()[source]#

A new /tmp/mstar_<user>_<random> directory (mode 0700) for a server with no port of its own; the caller removes it at exit.

Return type:

str

mstar.utils.socket_prefix.per_port_socket_prefix(port)[source]#

/tmp/mstar_<user>_<port>/ for an HTTP server: the port is already unique to one server on the host.

Parameters:

port (int)

Return type:

str