Use flexible json messages and Gson for communication.