Echo client and server with serialization