I am trying to build a client application that will interact with both thermostat and web server.Web server will be connected to a database where it will store information of thermostat for each client.Periodically client application will run on its own and fetch data from the web server and using that data it will send instructions to thermostat. On the other end, end-users will directly interact with web pages on the web server and make necessary changes for the thermostat. I am using API for the thermostat which is based on RESTful architecture. I am confused what how should I build this thing. Should I build server using JSP/Servlet or some other tools? I would be glad if you could provide me some insight.