PECORA-PROXY(1)

2024-05-29

NAME

pecora-proxy - an alternative magmaProxy implementation

SYNOPSIS

pecora-proxy [-vn] [-p port] [host [port]]

DESCRIPTION

pecora-proxy is an alternative implementation of the magmaProxy. It forwards the agent's messages to the server and the server's messages back to the agent. If an agent does not respond to a message from the server within the time of one cycle, the proxy will send a syn message to keep the game running. This concept ensures that the agent has the correct amount of time available for responding, even with a very slow network connection to the server. However, in that case, pecora-proxy needs to run on the same machine as the agents that connect to it. Otherwise, the latency between these machines reduces the time available for the agent to respond. The use of this proxy does not require any changes on the client side. On the server side, the only requirement is the sync mode to be active.

The arguments host and port are used to specify the address of the rcssserver3d instance to connect agents to. If unspecified, these default to 127.0.0.1 and 3100. If the port is specified, the host has to be specified as well.

The options are as follows:

-n

Use Nagle's algorithm for sending messages to both the server and the agent. The default is to set TCP_NODELAY and disable Nagle's algorithm.

-p port

Set the port to to listen on for agent connections. (Default: 3100)

-v

Print the version information and exit.

During runtime, pecory-proxy accepts commands from stdin to provide an interactive mode. These commands are delimited with a newline character.

The following commands are available:

l, list

List the connected agents together with their amount of missed messages.

m

Enable/disable printing the start of each action message.

n

Enable/disable printing the start of each perception message.

q, quit

Exit the program with the exit code 0.

v, verbose

List the connected agents together with some statistics for their messages. Note that the avgTimeDelta for the perceptions is the average time passed between two perception messages. For actions, it is the average time passed between a perception and an action.

KNOWN BUGS

An agent might send a very large message just to "pause" the game or get a little more time. How it works: pecora-proxy is constantly getting data from the agent. With a single thread only in the proxy, the timer won't be able to trigger. Only if the reading suspends, the timer can trigger sending the syn message as a result. To get an indication when this might happen, a warning is printed if the message length exceeds 1 megabyte. This is probably a good limit, as it's nowhere near an actual message length. These messages are usually sent through the loopback device anyway, which can transfer 1 megabyte easily nowadays. So worring about a message slightly smaller is also not necessary.

AUTHORS

Created and maintained by Hannes Braun <hannes@hannesbraun.net>. Up-to-date sources can be found at https://git.sr.ht/~hannes/pecora-proxy. Bugs and patches can be submitted by email to ~hannes/public-inbox@lists.sr.ht.