Closed skywolf829 closed 7 months ago
Backend and frontend both now threaded listeners (polling for a new message to receive) while being available locally to send a message if another component requires it. Using multiprocessing.connection
library for managing a connection over a socket.
Designed messages in JSON/dict format with "tags" describing the type of data, e.g. {"loss_values": loss_data, "render_image": image_data, "error_log": err_data}.
On frontend, created paradigm where any window that is interested in "listening" for certain tag can subscribe to the AppController
to be alerted about that data when a message with that tag is received.
Backend has not been changed like so since it is much more static.
Next, will be testing some simple messaging back and forth.
At a workable state now where each window will be able to subscribe for the messages they want to listen for, and be automatically routed those messages from the AppController
. The ServerController
will take care of all the messages itself so as to keep networking tasks outside of the Trainer
, GaussianModel
, and Dataset
classes.
Complete an outline for the networking system, including threading and support for sending and receiving messages on both the frontend and backend.
Additionally, designing an archetype for message format should be considered. When the backend sends some loss values for iterations to the front end, how are they packaged? JSON/dict? How should the entries be named for parsing in the backend?