0

I've been reading up on both GAE and GWT, and it seems that if you are deploying GWT apps to GAE then the following APIs are unnecessary:

  • PageSpeed
  • Channel API

Since GWT is already super-optimizing all client-side code, and includes all the necessary AJAX mechanisms to produce a "single page web app", then it seems to me that both of these can be ignored when deploying a GWT app to GAE.

My understanding of both these APIs is that PageSpeed helps optimize client-side code (GWT already does this), and that the Channel API is utilized for long-polling (which GWT obsolesces).

If I am incorrect, please help me understand why. Or, help illustrate scenarios where a GWT app would still benefit from these APIs. Thanks in advance!

IAmYourFaja
  • 50,141
  • 159
  • 435
  • 728

1 Answers1

1

I don't think they are entirely irrelevant.

  • PageSpeed: To be honest I don#t have much experience with PageSpeed. GWT does a lot of optimization to make sure that loading resources is fast (disclaimer: if you are using ClientBundle). As a result you might not see much of a speed increase when you activate PageSpeed for your GWT app. However according to the documentation it says:

PageSpeed Service will not serve stale HTML to your users. Typically 95% of the bytes needed to render a page are cacheable, but the HTML itself is not. PageSpeed Service speeds up loading of your page by caching the cacheable parts of your page (amongst other techniques). This includes resources such as images, JavaScript and CSS. Please refer to the information on controlling what resources PageSpeed Service caches.

So you probably can achieve caching of static resoruces yourself by configuring the web-server serving them to cache them, however I guess PageSpeed will do that for you out of the box. Furthermore it seems that Google will prefetch the resources and then serve them from their servers which might be optimized for serving static resources compared to GAE.
I would recommend to try it out and see how much it helps.

  • Channel API: Channel API might be quite useful for your GWT app. Long-polling has a different use case compared to traditional AJAX calls. For example if you want to create a web based chat app in GWT, you can use the Channel API to support "real-time" communication between the clients and the backend.
    So Channel API definately has its use case although 90% of the times you will probably use normal AJAX calls.
Ümit
  • 17,049
  • 7
  • 52
  • 73