Data gathering, client/server sync and querying framework