Reliable Server Client Communication in python

175 Views Asked by At

Trying to create a reliable communication from server to client in python. the loss and delay of reception should be as low as possible. Here is my thought,

  • client notices server(DNS) when internet is up
  • server saves client IP
  • broadcast data1 to saved IPs
  • client ack msg idx to server
  • server resend until client ack (with timeout)
  • server removes IP if 3 broadcasts without ack

where data (json/df/db):

  • data1: msg idx & broadcast msg
  • data2: ip, last msg idx & connected timestamp

Now, just wanna make it simple but wish to be expandable. Is there any general practice of doing it? a backend(REST) may be necessary in future. I previously thought FCM notification might suit my need but seem not much python related resources to start up with. Please advise if the above idea is good enough.

0

There are 0 best solutions below