I am trying to transmit objects of a particular class from one server to another.
The options I'm looking at are:
- Serialize the data as JSON and send it over the wire using HTTP, and de-serialize at the other end.
- Serialize the data into some binary form and transmit using TCP sockets.
What are the best practices in this area? What are the gotchas?
Ideally I would like the interface to be versioned, so the sender and receiver can be upgraded independently.
I'm considering the JSON approach as I already have code that will serialize/deserialize the objects into JSON.