Eclipse RAP application in horizontally scaled Azure WebApp Container [message #1838369] |
Tue, 23 February 2021 07:57  |
Eclipse User |
|
|
|
Hi,
we just deployed our application (based on RAP 3.15) in an Azure Cloud environment which uses horizontal scaling behind a load balancer to distribute sessions across a number of Tomcat instances. In this setup, the individual Tomcat instances share the same webapps folder.
When one instance terminated unexpectedly, the rwt-resources folder (including the /0/rap-client.js folder) was removed. This prevented other instances from working correctly, when trying to download rap-client.js.
I searched the rap source and saw, that it may be possible to prevent deletion of the rwt-resources folder by setting ApplicationContextImpl.skipResourceDeletion to true.
I am considering making this configurable from within the application's web.xml. I am uncertain, though, what other effects this may have.
Has anyone had experience with this kind of setup, yet ?
Best regards,
Gunnar
|
|
|
Re: Eclipse RAP application in horizontally scaled Azure WebApp Container [message #1838452 is a reply to message #1838369] |
Thu, 25 February 2021 05:52  |
Eclipse User |
|
|
|
Hi,
I have an additional question:
Other than skipping the deletion of the rwt-resources folder on application stop, I am considering ways to separate the actual rwt-resources folders for different webApp instances. I am thinking about, for instance, including the name of the webapp host or instance in the path to rwt-resouces or make it a part of the folder-name itself.
I noticed, that the name rwt-resources is hard-coded in some source code locations (e.g.: Connection.js, ThemeStore.js, SWT.js).
I do not like to modify the Javascript-part of the framework and it may be difficult to foresee consequences. So, a general change may be difficult to do.
I think that a servlet filter intercepting requests to /rwt-resources/* could be used to transparently map the request to a differently named folder. Of course, the Java-side of the framework would still need to be adjusted (probably ResourceManagerImpl).
Please comment.
Best regards
Gunnar
|
|
|
Powered by
FUDForum. Page generated in 0.12851 seconds