Server application to communicate with iPad and database also to generate JSONs