DEV Community

Aviral Agarwal
Aviral Agarwal

Posted on

1

How to ensure that two separate copies of same file on client and server side always be in sync?

Actually I have made a dns server in python using dnslib. The dns server first checks for the domain in its own dictionary ,if domain is found it returns the IP Address, if it is not found it fetches the ip address from an external dns.

I have also built a portal using which people can register their own domains with the dns server.
For this the domain and ip address are entered into the copy of the dictionary which is with the dns server.

Now using a TCP connection I am thinking of sending the changes made in the dictionary with the portal to the dictionary with the dns server.

But I am concerned that if for some time the data from client dictionary can't reach data to host dictionary then the two would be left async.

What can be the most efficient way to tackle this problem?

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay