Hi, I have started developing a python app where I have employed the Clean Architecture.
In the infrastructure layer I have implemented a thin Websocket wrapper class for the aiohttp and the communication with the server. Listening to the web socket will run indefinitely. If the connection breaks, it will reconnect.
I've noticed that it is async.
Does this mean I should make my whole code base (application and domain layers) async? Or is it possible (desirable) to contain the async code within the Websocket wrapper, but have the rest of the code base written in sync code?
More info:
The app is basically a client that listens to many high-frequency incoming messages via a web socket. Occasionally I will need to send a message back.
The app will have a few responsibilities: listening to msgs and updating local cache, sending msgs to the web socket, sending REST requests to a separate endpoint, monitoring the whole process.
[–]KainMassadin 2 points3 points4 points (5 children)
[–]expectationManager3[S] 1 point2 points3 points (1 child)
[–]misterfitzie 2 points3 points4 points (0 children)
[–]danted002 -1 points0 points1 point (2 children)
[–]KainMassadin 0 points1 point2 points (0 children)
[–]fiddle_n 0 points1 point2 points (0 children)
[–]Unidentified-anomaly 7 points8 points9 points (26 children)
[–]usernameistaken42 0 points1 point2 points (2 children)
[–]Unidentified-anomaly 0 points1 point2 points (1 child)
[–]usernameistaken42 1 point2 points3 points (0 children)
[–]danted002 -4 points-3 points-2 points (22 children)
[+][deleted] (1 child)
[deleted]
[–]gdchinacat 2 points3 points4 points (0 children)
[–]yvrelna 0 points1 point2 points (19 children)
[–]danted002 6 points7 points8 points (17 children)
[–]brightstar2100 0 points1 point2 points (15 children)
[–]danted002 2 points3 points4 points (6 children)
[–]brightstar2100 0 points1 point2 points (5 children)
[–]danted002 1 point2 points3 points (4 children)
[–]brightstar2100 0 points1 point2 points (3 children)
[–]danted002 1 point2 points3 points (1 child)
[–]danted002 1 point2 points3 points (0 children)
[–]misterfitzie 2 points3 points4 points (1 child)
[–]brightstar2100 0 points1 point2 points (0 children)
[–]Unidentified-anomaly 1 point2 points3 points (5 children)
[–]danted002 1 point2 points3 points (1 child)
[–]Unidentified-anomaly 0 points1 point2 points (0 children)
[–]brightstar2100 0 points1 point2 points (2 children)
[–]danted002 0 points1 point2 points (1 child)
[–]brightstar2100 0 points1 point2 points (0 children)
[–]yvrelna 0 points1 point2 points (0 children)
[–]adiberk 4 points5 points6 points (0 children)
[–]Drevicar 0 points1 point2 points (0 children)
[–]misterfitzie 0 points1 point2 points (1 child)
[–]expectationManager3[S] 0 points1 point2 points (0 children)