(2). replace your command line client program with one that keeps the same interface but communicates with the server over a socket. You must now support two possible queries: (a) compute the closest from a time-series which is in the database (the argument here is the id) (b) compute the distance from a timeseries provided and thus shipped over the wire to the server. One complication in this second scenario is that calculating the distance of an incoming timeseries against the vantage points now needs to happen on the server. Earlier it happened in the process which used the database as a library. This will slow down your IO (the GIL) but we shall let it be.
(3). You will need to develop a protocol to communicate between client and server, and set up the sockets.
(2). replace your command line client program with one that keeps the same interface but communicates with the server over a socket. You must now support two possible queries: (a) compute the closest from a time-series which is in the database (the argument here is the id) (b) compute the distance from a timeseries provided and thus shipped over the wire to the server. One complication in this second scenario is that calculating the distance of an incoming timeseries against the vantage points now needs to happen on the server. Earlier it happened in the process which used the database as a library. This will slow down your IO (the GIL) but we shall let it be.
(3). You will need to develop a protocol to communicate between client and server, and set up the sockets.
Example code is shown in the P9 document