Frameworks
Direct Web Remoting or DWR is a very unique framework for developing Ajax based applications. This framework has been in existence way before the concept of Ajax was created. Its main focus is controlling JavaScript through an equivalent Java coding, thus enabling developers to build JavaScript based applications even without writing a single line of it. When Ajax started to gain popularity in 2005, DWR become one of the pioneers in this type of framework along with GWT (Google Web Toolkit). A little tweak and integration with XML, developers should be able to build a highly effective Ajax based website.
On simple websites, DWR will show no problem in server performance. However, when you are dealing with a constant transaction between the server and the network, there is a big possibility that DWR might not live up according to expectations.
Due to excessive logging of information the CPU or more particularly the user’s browser might not be able to handle the processes of happening between the server and network. The bottlenecking the browser is not a good thing especially when you are dealing with an Ajax based websites since information will be completely lost without even a small bookmark by the browser.
To prevent bottlenecking of your browser, limit the logging of processes in your application. Scale down the logging and focus it only in errors. That way, you will be able to have a freely breathing logger that will never cause problems in your browser.
Also review your DWR version. If you are working with version 2.0, you should be able to be fine with this setting. The 2.0 version has the capability to cache browser transaction for a very long time. DWR calls this the “cache lifetime” – caching information in the browser and stores them in the user’s computer so that the webpage will load faster without affecting the whole system.
On the other hand, other versions have limited caching capability and it could cause a slowdown in the application execution. The older version might run in to a trouble of reading the webpage again and again causing delay and bottlenecking the network on the server’s end.
There are two solutions to that problem. First is to place all the JS files where your web-app files also reside. That way, the caching function will take a look at the web-app along with the coding. Sensing that the information is already in the web-app it should no longer cache the information.
The second option is to compress all JS into a single file and let it run through the Dojo compressor. Not only you will be saving space in your application, you will be able to limit its function to caching the information for the first time and let it stay there.
Extra caution in performance should always be done by developers if they wanted to build an Ajax based application. DWR might bottleneck but if you take the extra step in checking the logger and the version of your DWR, you will be able to ensure optimum performance of your application.