Commit Graph

9 Commits

Author SHA1 Message Date
9f12b7bea4 Separated out the metadata about the agents and clients from the agentConnection and clientConnection objects. Now, the state does not need to be copied anymore when sending notifications.
The matchmaker uses copy on write every time a new agent or client connects or disconnects.
2024-09-08 11:16:49 +02:00
96c62ab925 concurrency for the expiry time 2024-09-08 11:16:49 +02:00
fc7977f7bb now using maps of Guid to Agent/Client in the state, working towards the definitive solution.
Using LinkedMap that preserves insertion order for the implementation and also added unit tests for that.
2024-09-08 11:16:49 +02:00
556315906d introdcution of typesafe ids. 2024-09-08 11:16:49 +02:00
2d426f8db3 using unbuffered channels everywhere now. Only change required was to initialize prometeus and the websessions before the matchmaker. This is because at startup the matchmaker wants to write a notification when it starts up but then prometheus and the websessions would not be there to read them.
Alternative solution would be to run all initialization code in go routines to make it independent of initialization order but having a defined initialization order is much cleaner.
2024-09-08 11:16:49 +02:00
f83d7b2c83 added a utility function for logging request data. 2024-09-08 11:16:49 +02:00
30a49217e4 Much imporoved websocket connection closure will now detect closing of
websockets immediately.
2024-09-08 11:16:49 +02:00
567d9a4031 now a single websocket is opened from the webui to converge.
The browser sends a hello message anytime the user switches to the
sessions page, upon which the server sends the current state back.
THis also improves the timeout handling of broken connecions.
2024-09-08 11:16:49 +02:00
a06d8b0ca6 renamed converge package to matchmaker. 2024-09-08 11:16:49 +02:00