Re: concurrent request handling: advice
Re: concurrent request handling: advice
- Subject: Re: concurrent request handling: advice
- From: Jonathan Rochkind <email@hidden>
- Date: Wed, 7 Jan 2004 13:17:35 -0600
Thanks for the advice. Looking around (at my HUGE codebase; it's
possible I missed something), I can't really find ANYTHING I need to
change. All my application variables are initailized in app
constructor. All my static variables are initialized in static
initialization blocks in the same class they are declared in (that's
safe, right?). None of them are ever changed subsequently. I can't
find any variables in Application or static that are actually
modified, they are all just write-once-upon-instantiation kind of
things.
So I guess I'll just flip the 'handles requests concurrently' switch,
and hope for the best....
--Jonathan
At 11:11 AM -0800 1/7/04, Chuck Hill wrote:
Hi Jonathan,
I've done this recently. I think that only application level and static
stuff needs to be threadsafe. And then only if it is writable. I
initialize a bunch of app level stuff in the constructor when it is still
single threaded. After that it is read only and hence not a worry. And
of course EO locking, but you are very well aware of that! :-)
So far, I've had no trouble. It was far easier than I'd imagined. So far...
Chuck
At 02:38 PM 06/01/2004 -0600, Jonathan Rochkind wrote:
So, I have a large set of applications and frameworks that have grown
over a few years to have many many lines of code.
I want to take the plunge and turn on concurrent request handling.
Does anyone have any advice for what things to look at in my app that
I might need to modify to be safe under this environment?
The only things I can think of now are: variable access in
Application, or in any static methods/variables. Those seem to be
the main areas I will need to make sure are safe for concurrent
access once I turn on concurrent request handling. Stuff at the
WOSession level, or in any particular WOComponent---shouldn't need to
worry about this, since access to a session is still one thread at a
time, and a component normally lives within a certain session. Same
with EO objects.
But is there anything else I should be thinking about? Advice from
someone who's written, or better yet converted into, a large
concurrent request handling WO app especially welcome.
--Jonathan
_______________________________________________
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.
--
Chuck Hill email@hidden
Global Village Consulting Inc. http://www.global-village.net
_______________________________________________
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.