resource-safe client-server