2

I'm developing a very large application in JAVA / Sping MVC / Jquery over Oracle Weblogic that has a couple of screens called overviews that make multiple ajax calls to the server. All this calls should be made in parallel as they provide the summary of the different types of information to the end client. From this screens the user can then drill down to the detail of the information.

Since I have a lot of calls I'm constantly observing a behavior of the server that suggest en-queuing of the requests at the server (In the logs everything happens sequentially and when a specific type of information takes more time to process the other are only resolved when that ends).

I think I understand why this is happening, however I would like to process the requests in parallel in the server also. I'm considering two possible alternatives:

  • Change some configurations on weblogic (I don't know which one...)
  • Implement reverse ajax

I prefer the second however my server is bound to servlet 2.5 (weblogic 10.3.6) so I cannot take advantage of the new assynchronous API in servlet 3.0

I'm looking closely at atmosphere which has a very clean design IMHO. Also I'm open to other technologies suggestions. The problem is how can I do something like this in atmosphere. What I want is to shoot the requests to the server and have them processed in parallel. As soon as they are ready I want to receive the answer and close underlying connection.

How can I achieve this ?

oguz ismail
  • 1
  • 16
  • 47
  • 69
Ivo Leitão
  • 337
  • 1
  • 4
  • 16

1 Answers1

1

Check out DWR: http://directwebremoting.org/dwr/index.html

It seems like the best AJAX/java solution I have seen. It can do batching of requests in a nice way, which is important for AJAX.

However, AJAX should be processed asynchronously by default, so there could be something else going on with your implementation.

Perhaps this could help: Parallel asynchronous Ajax requests using jQuery

Also, note that there is a limit to the max number concurrent of requests to a server: How many concurrent AJAX (XmlHttpRequest) requests are allowed in popular browsers?

Community
  • 1
  • 1
Solubris
  • 3,603
  • 2
  • 22
  • 37
  • Hello first of all tnks for your answer. I think the problem is that weblogic allocates only a thread per user (session) And since I'm making multiple requests from the same user they leave the broser at the same time but are enqued in the weblogic – Ivo Leitão Sep 25 '12 at 13:43
  • Concerning dwr I have investigated that solution but I think in terms of performance atmosphere is the only one that takes advantage of native support in weblogic – Ivo Leitão Sep 25 '12 at 21:58