WO 5.4, Ajax polling and multi-threading questions
WO 5.4, Ajax polling and multi-threading questions
- Subject: WO 5.4, Ajax polling and multi-threading questions
- From: Karthik N <email@hidden>
- Date: Wed, 18 Feb 2009 06:00:59 -0800
Hi All,
I'm hoping we can seek some of advice on a WO Java 5.4 app and multi-threading. Some background:
- This is a WO Java web app that uses EOF to persist data in oracle
- This app has to be enhanced to support a new feature that's going to need a lot of Ajax polling
- This Ajax polling has no correlation to EOF. It doesn't need to talk to a db at all, but the WOA needs to talk to another web service
- However due to some architectural limitations we still have to host the Ajax polling in the same WOA that uses EOF
- Because of this Ajax polling, we hope to increase the threading of each WOA instance, so that we don't have to spin off more instances
We plan to run the WOA multi-threaded like this
-WOAllowsConcurrentRequestHandling YES -WOWorkerThreadCountMax 32
We did a thread dump of our current app and here's how it looks
at sun.reflect.GeneratedMethodAccessor693.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.webobjects.appserver.WODirectAction.performActionNamed(WODirectAction.java:128)
at com.***.webobjectsextras.BaseDirectAction.performActionNamed(ISBaseDirectAction.java:125)
at com.***.login.WOLoginDirectAction.performActionNamed(ITWOLoginDirectAction.java:1357)
at com.***.account.DirectAction.performActionNamed(DirectAction.java:33)
at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:240)
at com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:142)
at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1306)
at com.***.webobjectsextras.BaseWOApplication.dispatchRequest(ISBaseWOApplication.java:675)
at com.***.webobjectsextras.WOApplication.dispatchRequest(ISWOApplication.java:255)
at com.***.login.WOLoginApplication.dispatchRequest(ITWOLoginApplication.java:367)
at com.***.account.Application.dispatchRequest(Application.java:476)
at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:173)
at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:254)
Clearly we're not overriding any of the WO default request handlers.
Do you think this is a good approach?
1. We implement a CustomRequestHandler that extends WODirectActionRequestHandler [All our app alls are DAs]
2. In the CustomRequestHandler#handleRequest() method we conditionally call requestHandlingLock() for all the existing EOF requests and do not lock for the new Ajax ones?
In short we're trying to reach a situation where any EOF calls block behind each other like they do today. But any Ajax calls are not limited by the fact that EOF is single-threaded - they are only limited by the # of worker threads in the WOA.
Thanks for your help!
Karthik
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden