WIP: Add server side web socket interface for server->client sync

Update rsync to working code
Add methods to use web sockets to communicate with client to perform a sync
Deep nesting again.  Also, I feel like I'm re-reading the same code.  Should we reuse some functions?