best way to communicate with a server?