We are using a three tiered architecture for an application. We have a database on one end, a front end server running IIS on the other end, and in the middle a glassfish server for java servlets.
So far we have been using javascript AJAX calls (which run on the client) to access the glassfish server to activate the servlets to get the data. When we make a call like this:
$.GET(url, function(response){
...code here
});
or
var data = new FormData();
var request = new XMLHttpRequest();
request.onreadystatechange = function() {
};
request.open("get", URL);
request.send(data);
Then the network notes that the middle tier is being accessed by the client, at least for the first example. We need instead for the IIS server to make the request to the glassfish server.
We've considered using Node.js with Socket I/O, or DropWizard, or a number of other products but since we already have an existing architecture we are hoping to find something that will enable us to make the calls server side with minimal rewrite. Is there a best practice for this, does it involve using RESTful or SOAP on the Java side? Any help in this regard would be appreciated.