The pull request rounds out necessary changes for 3.1.2 including:
Single process mode: If all tasks would run in one process, and a GraphServer/SHMServer combo are already up, ez.run will not attempt multiprocessing. Critical for using ezmsg in REPL/notebook environments.
Associate Publisher and Subscriber objects with OutputStream and InputStream instead of individual tasks:
Should drastically reduce the number of connections/sockets required for systems, enhancing performance
Allows for control over individual OutputStream...
hostname/port specification; allowing outbound TCP communications to other PCs
number of buffers; down to 1 buffer for direct control of channel latency and backpressure
initial SHM allocation size; to avoid resizing SHM while running
force TCP message passing; for small message sizes, there's no performance loss and this allows us to run perf benchmarks including TCP transmission without multi machine CI setups.
IMPORTANT BREAKING CHANGE -- it is no-longer possible to subscribe to OutputStreams and publish to InputStreams. This was previously possible (unintended) and should be fixed in downstream projects. If you can come up with a valid use-case, please let me know.
Command line tool that allows for serving/shutting down GraphServer and SHMServer from command line. After installing ezmsg, simply run ezmsg serve from the command line to start up the ezmsg background servers
This pull request also:
Fixes several small bugs
Switches SHMServer and GraphServer ports (25978/9). GraphServer now sits at 25978 by default, and SHMServer now sits at 25979 by default.
Incidentially, this was driven by trying to run the servers through SSH forwarding on a remote machine. I learned we should NEVER forward the SHMServer port (oops; seems pretty obvious to me now). Figured we should set the GraphServer to the base port -> 25978 represented as a 16-bit unsigned number in binary is 0110010101111010, which when represented by two ascii characters is the string ez 👍
SHMServer, GraphServer and the publisher port-range start are now individually configurable by environment variables.
GraphServer's pause and resume are no-longer asynchronous; don't need to be await'ed
Shuts down immediately after NormalTermination is raised, rather than waiting up to 0.5 seconds
Unsure if these feature additions merit a minor version bump (3.2.0) instead of a bugfix bump (3.1.2); would welcome feedback on that. @pperanich @hannahgooden
The pull request rounds out necessary changes for
3.1.2
including:GraphServer
/SHMServer
combo are already up,ez.run
will not attempt multiprocessing. Critical for usingezmsg
in REPL/notebook environments.Publisher
andSubscriber
objects withOutputStream
andInputStream
instead of individual tasks:OutputStream
...OutputStream
s and publish toInputStream
s. This was previously possible (unintended) and should be fixed in downstream projects. If you can come up with a valid use-case, please let me know.GraphServer
andSHMServer
from command line. After installingezmsg
, simply runezmsg serve
from the command line to start up theezmsg
background serversThis pull request also:
SHMServer
andGraphServer
ports (25978/9). GraphServer now sits at 25978 by default, and SHMServer now sits at 25979 by default.SHMServer
port (oops; seems pretty obvious to me now). Figured we should set the GraphServer to the base port -> 25978 represented as a 16-bit unsigned number in binary is 0110010101111010, which when represented by two ascii characters is the stringez
👍SHMServer
,GraphServer
and the publisher port-range start are now individually configurable by environment variables.GraphServer
'spause
andresume
are no-longer asynchronous; don't need to beawait
'edNormalTermination
is raised, rather than waiting up to 0.5 seconds