This is an example using Python3 and asyncio to do the following:
- Run a service that tracks of how many WebSocket requests per second it is receiving.
- Run a client that can throttle the number of WebSocket messages per second it sends concurrently.
This could also be implemented using the popular Requests library.
- Open a terminal to the working directory
- Run
python3 server.py
- Run
python3 client.py