Inspired from:
but in python
- CLIENT established a socket connection to an ISO8583-SERVER
- Multiple HTTP calls are sent to the CLIENT and served by fastAPI http server
- FastAPI HTTP server's handler then makes a socket call to the ISO8583-SERVER
- The ISO8583-SERVER sends response via the socket/buffer to the CLIENT
- The CLIENT then reads the buffer and inserts it into a safe thread map/dict
- The fastAPI handler then read from the safe threaded map/dict by matching the STAN (element 11)
- The safe-threaded map will schedule to clean up any expired map/dict
- If CLIENT gets disconnected, it will retry to reconnect
- Use Redis instead of internal map
change the PYTHONPATH to whichever directory you are working on
make run-server make run-client docker-compose up -d curl --location 'http://localhost:8000/echo?value=080080200000000000000400000000000000RANDOM301'Response
{
"sent": "080080200000000000000400000000000000423482301",
"resp": "08108020000002000000040000000000000042348200301"
}
