I have two computers in geographically dispersed locations, both connected to the internet. On each computer I am running a Python program, and I would like to send and receive data from one to the other. I’d like to use the most simple approach possible, while remaining somewhat secure.
I have considered the following solutions, but I’m not sure which is the simplest:
- HTTP server and client, using protobuf*;
- SOAP web service and client (pywebsvcs maybe?);
- Some sort of IPC over an SSH tunnel — again, protobuf maybe?
Like I said, I’d like the solution to be somewhat secure, but simplicity is the most important requirement. The data is very simple; object of type A, which contains a list of objects of type B, and some other fields.
*I have used protobuf in the past, so the only difficulty would be setting up the HTTP server, which I guess would be cherrypy.
The cheapest and simplest way to transmit would probably be XML-RPC. It runs over HTTP (so you can secure it that way), it’s in the standard library, and unlike protobuf, you don’t have to worry about creating and compiling your data type files (since both ends are running Python, the dynamic typing shouldn’t be a problem). The only caveat is that any types not represented in XML-RPC must be pickled or otherwise serialized.