In a nutshell my question is of the pros and cons of the following potential approaches to migrating an existing java GUI the shows a map being built by a robot in realtime to an HTML5 GUI:
Approach 1 use JQuery, JSON and websockets to connect with the Java back-end and grab the map building information then use the HTML Canvas feature (along with one of the Canvas Libraries) to visualize this information. I believe with this approach I do not need a server side scripting language and that the websockets will allow for the server to send updates without a request.
Approach 2 use JSP. I know very little about JSP but am well versed in java. My thinking is that JSP would allow for direct calls to the existing Java back-end objects requiring less changes to the existing application, however I am not sure if that is how JSP works. Ideally, I would like to call the same functions that are currently used to take the robots sensor data and create a visual map within the HTML5 web app. Further, with this approach I believe I would not need to use JSON or any type of websockets since everything is being done with JSP. However, because this is using a server side scripting language can the server send updated information about the robot and its environment to the HTML client without a request.
Approach 3: I may be completely missing the boat and there is a better alternative
When looking at the two approaches the following elements are needed 1) Whichever approach has to be able to connect to the java back-end 2) All of the information about the robot and the environment are on the Java back-end therefore the approach needs to allow for the HTML client to receive updates without a request 3) Maybe more but not sure
More details: This project involves a robot navigating an unknown environment and building a 2D map based on its sensor data. In the original java GUI version the robot operator would see a blank screen with only the robot visualized as it moved a map of the environment would be built. I need for the HTML5 GUI to do this same functionality.