9

How is GWT (Google Web Toolkit)'s RPC (Remote Procedure Call)'s for Asynchronous operations from browser/javascript to server is DIFFERENT or SIMILAR when compared to the AJAX calls ?

If they are different, could someone help me understand how they are different ?

I also heard that this RPC implementation does not works with all Server containers. For example, the GWT project did not work in Apache Tomcat.

Moreover, is this RPC a an custom implementation of Google , or is it a standard implementation ?

yathirigan
  • 5,619
  • 22
  • 66
  • 104
  • 3
    It used AJAX under the hood. Requests and responses are serialized and deserialized on the server and client sides. – Anurag Dec 06 '12 at 01:43

1 Answers1

11

1) GWT RPC uses AJAX to allow Data transfer for GWT applications.

2) GWT RPC abstracts out lot of information and wraps ajax to allow you to code in JAVA without worrying about different browsers.

3) It WORKS in tomcat, jetty and in every server container. In some cases people misconfigure the paths ( dev mode vs production mode causes confusion in image paths/ css)

4) RPC is indeed a CUSTOM implementation from Google.

appbootup
  • 9,537
  • 3
  • 33
  • 65
  • 10
    Put differently: HTTP is the transport, _AJAX_ (XMLHttpRequest actually) is the low-level API, and GWT-RPC is a high-level API and data-format (protocol) on top of them. – Thomas Broyer Dec 06 '12 at 09:35
  • Thank you @Sachin Shekhar and Thomas Broyer , one of our developers seemed to have tried in Tomcat and faced issue (not yet aware of the exact issue & error). Since our Development & Production environment are Websphere 7.1 , i was wondering if Google's implementation of RPC (i.e. the java code generated for the purpose of communication between client javascript code and server java code, will it work in all jdk Server containers). **could someone throw some light on this aspect** – yathirigan Dec 06 '12 at 12:56
  • Can you share the relevant log snippet? – appbootup Dec 06 '12 at 12:59
  • sure.. and also, would GWT require us to include any Library/JARs to be included along with the WAR/EAR of the application during runtime ? – yathirigan Dec 06 '12 at 13:08
  • Yes. gwt-servlet.jar is minimum requirement. There are bunch of other jars like request-factory-server.jar which are to be included if you use some specific gwt features. – appbootup Dec 06 '12 at 14:54