This looks interesting. <http://www.philipotoole.com/replicating-sqlite-using-raft-consensus/>
<https://github.com/otoolep/rqlite> It allows you to set up multiple computers on the internet to keep copies of a database in synch. Changes in one are promulgated to them all. As a side effect it proves a TCP server for SQL commands. Haven't had time to evaluate it, but there are people here who can do that far better than I can. Simon.