• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WO blocking/threading question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WO blocking/threading question


  • Subject: Re: WO blocking/threading question
  • From: David Teran <email@hidden>
  • Date: Sun, 15 Aug 2004 18:27:54 +0200

Hi,

Thanks for that information. That's really helpful information to have in my back pocket!

Be careful: each EOObjectStoreCoordinator will use one JDBC connection for each unique connection dictionary in an EOModel. Of course you can use a pooled jdbc adaptor, i saw one somewhere in the net, try google.

the RR loop is single threaded by default, you can turn it on by putting 'WOAllowsConcurrentRequestHandling=true' in a properties file or as commandline argument. Then the RR loop runs in multithreaded mode which means multiple request are processed in parallel. If each request uses another EOF stack then you have parallel database access, too.

Be aware that multithreaded apps tend to have more EOF deadlocks, so you really should know what you are doing. Some people are reporting that they have to problems with concurrent request handling as long as they are using the sessions default editingcontext, but fetching everything in one editingcontext is not a good idea (imho).

So if the RR loop is single threaded by default that means that if I have 100 concurrent users all on 24600 bps modem connections that all need to download a 50 k JPEG (i chose that number as it implies roughly a 2 second download at 24.6kbps), that WebObjects will block on each of those users while the output is being sent to the client or just that the inital page generation is blocked. if it's blocking all the way back to the client I'm at a loss as to how webobjects can manage high traffic sites if it does at all. Also if the EOF deadlocks occur, can these happen on pages that are read-only? I'm not sure what happens in an EOF deadlock. Does the application stop responding?

WebServerResources are delivered by the resourcerequesthandler which in turn works besides the normal component request handler. This means if you use WOResourceManager to deliver the images then this works fine even with singlethread rr loop. Using WOImage or WOActiveImage helps you here. If you use a WOComponent to return an Image by overriding appendToResponse then this will block.

You detect an EOF deadlock like this: a objectsWithFetchSpecification, generally every EOF method that tries to lock an EC or an EOOSC or an EODBCTX does not return, kill -3 PID helps you to see the stacktraces from the different threads. We are currently trying to implement deadlock detection using AspectJ and modifications in NSRecursiveLock but until now i was not able to use AspectJ with Eclipse 3.

On my site the majority of the long processes are making a webservices connection and have no EOF code in them so I'm wondering since I'm doing these webservices requests in a WOLongResponsePage, being that it launches a a separate thread, will this will allow for concurrent page access without setting the application to be multi-threaded as a whole and possibly mucking up the EOF parts of my application. Does anyone know how WOLongResponse is treated in that regard?

WOLR runs in its own thread, the RR loop is locked for the time WO needs to generate the status page from the WOLR page. If you do not use EOF at all turning concurrentrequesthandling on is very safe afaik.

I'm in the process of rebuilding a highly trafficked commercial site originally written with Servlets/JSP/JDBC in WebObjects right now and am very concerned that it's single-threaded RR is going to be a major bottleneck even for pages that aren't doing any JDBC access at all. It seems most posts always tend to point to the Apple Store as being the reason that WO is scaleable but even if the store is doing a $1M a day in transactions that's really only at most maybe 2000 orders a day which isn't high-volume by any stretch of the imagination.

Well, ITM is also in written in WO, Deutsche Bank germany uses WO for their online banking, use multiple instances if you have problems with concurrent request handling or ask someone to help you (maybe not for free) :-)

Its possible to have high traffic WO sites but as with every technology, you must know the pitfalls.


regards David _______________________________________________ webobjects-dev mailing list | email@hidden Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev Do not post admin requests to the list. They will be ignored.


References: 
 >WO blocking/threading question (From: Michael Engelhart <email@hidden>)
 >Re: WO blocking/threading question (From: David Teran <email@hidden>)
 >Re: WO blocking/threading question (From: Michael Engelhart <email@hidden>)

  • Prev by Date: Re: WO blocking/threading question
  • Next by Date: Re: PostgreSQL Adaptor and Plugin
  • Previous by thread: Re: WO blocking/threading question
  • Next by thread: Re: WO blocking/threading question
  • Index(es):
    • Date
    • Thread