Search code examples
restweb-servicesjspsoaprmi

Best way to connect two servers (Both using JSP tech) to access information stored in one of them?


In a "computer system" there are two web servers that manage independent applications, both using JSP technology. There is a necessity to have access from server A to information stored in server B. In case of interconnection with:

  1. Invocation of a data access service with GET/POST of an URL.
  2. Definition and use of Web services.
  3. Direct integration in Java, with Java RMI.

Which would be the best solution? Why? What are the advantages and disadvantages of each of them?


Solution

  • A solution would be to use REST API on the server from where you need to invoke the information. You might want to use an ajax call or just include contact via iframe.

    Get call will be simple and quick to develop and maintain however if it is low latency and high throughput application then you might want to go with Java RMI.