Java client-server implementation