Slackbot
12/22/2022, 9:03 AMOr Weis
12/22/2022, 9:43 AMcan the opal-server save some state to which clients it published to and which all clients have successfully made the update and reverted back to opal-serverYes, 1. This is available via the Statistics feature, you turn it on with
OPAL_STATISTICS_ENABLED=true
and then query /statistics
on the OPAL server
2. You can also query each OPAL client health-check / or even create a specific Rego policy to query which uses that healthcheck state
Note - for clarity - the client callbacks don’t have to be to the OPAL-server- they will open up http connections to the URLs you configure for them; so you can easily create a reporting/ logging service this way- if you need more than the basic topic tracking the OPAL server currently providesOr Weis
12/22/2022, 9:46 AMRajat
12/22/2022, 11:07 AMRajat
12/22/2022, 11:07 AMRajat
12/22/2022, 11:08 AMOr Weis
12/22/2022, 11:08 AMRajat
12/22/2022, 11:09 AMpolicy_data
topicRajat
12/22/2022, 11:10 AMOr Weis
12/22/2022, 11:14 AMOr Weis
12/22/2022, 11:14 AMOr Weis
12/22/2022, 11:19 AMOPAL_STATISTICS_ENABLED=true
on the clients as well?Rajat
12/22/2022, 11:19 AMRajat
12/22/2022, 11:20 AM2022-12-22T11:19:12.339820+0000 | opal_server.statistics | INFO | Serving statistics
2022-12-22T11:19:12.340503+0000 | uvicorn.protocols.http.httptools_impl | INFO | 172.31.80.108:41126 - "GET /statistics HTTP/1.1" 200
Or Weis
12/22/2022, 11:20 AMRajat
12/22/2022, 11:20 AMRajat
12/22/2022, 11:21 AMOr Weis
12/22/2022, 11:22 AM"Set client statistics {client_id} on channel {rpc_id} with {topics}"
Or Weis
12/22/2022, 11:22 AMas in, not a pub-sub based architecture but rather a websocket connection is established between client and server, right?Yes the pub/sub is a protocol on top of the websocket
Or Weis
12/22/2022, 11:22 AMRajat
12/22/2022, 11:23 AMRajat
12/22/2022, 11:23 AMAsaf Cohen
12/22/2022, 1:11 PMBefore publishing to the clients, can the opal-server save some state to which clients it published to and which all clients have successfully made the update and reverted back to opal-server?The opal server can receive the callbacks from the clients and thus you will see in the logs what updates where successful. Other than that - the statistics features is only tracking which clients are currently connected so it's a bit limited in that regard. We are planning to expand the statistics feature in the near future, but if you want to contribute something back we would be happy to guide you.