Re: [Webware-discuss] MiddleKit Threading Error?

2008-11-04 Thread Roger Haase



--- On Sun, 11/2/08, Christoph Zwerschke [EMAIL PROTECTED] wrote:

 From: Christoph Zwerschke [EMAIL PROTECTED]
 Subject: Re: [Webware-discuss] MiddleKit Threading Error?
 To: [EMAIL PROTECTED], Discussion of Webware for Python including feedback 
 and proposals. webware-discuss@lists.sourceforge.net
 Date: Sunday, November 2, 2008, 3:14 PM
 Roger Haase schrieb:
  My revised solution is to put the lock at the
 beginning and end of the method.
 
 I never used MiddleKit, so I don't know how to test
 this, but since it 
 looks reasonable I've checked this in anyway, and
 cleaned up 
 MiddleObject.py a bit. Can you check whether this works for
 you?
 
 http://svn.w4py.org/Webware/trunk/MiddleKit/Run/MiddleObject.py
 
 Btw, I was trying to run the MiddleKit test suite, but I
 get many 
 errors. For instance when running python Test.py
 MKDelete I get a 
 Lock wait timeout exceeded (this hasn't
 anything to do with the lock 
 in the patch, I get it also without your patch). Does the
 test suite run 
 for you? If yes, on what OS, Py and database (driver)
 version?
 
 Also, while we're at it, can you or somebody else have
 a look at the 
 following MiddleKit patches:
 http://sourceforge.net/tracker/?group_id=4866atid=304866
 
 There are a handful of other very old open issues here,
 mostly MiddleKit 
 or other stuff I don't use. If anybody wants to work on
 these:
 http://sourceforge.net/tracker/?group_id=4866atid=104866
 
 Ideally I'd like to have a running MiddleKit test suite
 and most of the 
 issues above solved before releasing 1.0.
 
 -- Christoph

I had to revise your new MiddleObject.py to put the
_mk_cacheLock   = threading.RLock()
statement at the module level rather than in the MiddleObject __init__ method.  
A new MiddleObject instance is being created with each request so putting the 
lock inside the object instance does not force single-threading through the 
readStoreData method.

While doing some more testing, I found that the problem is largely dependent 
upon Firefox 3.  I have a static web page with 12 images and graphs that are 
generated by individual calls to Webware/MiddleKit.  To run the test that 
creates the conditions for failure, I must restart the AppServer, clear the 
browser cache, and reload the page.

Firefox 3 almost always causes the failure, Safari for Windows and Google 
Chrome rarely cause the failure, and IE 7 and Opera 9 never cause the failure 
(so far).

The MiddleKit test suite does not run for me either.

I will look over the 3 other 3 MiddleKit changes in the queue and update them 
for 1.0Rc1.  It will probably take me about 2 weeks to get around to the task.

Roger Haase




  

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] MiddleKit Threading Error?

2008-11-04 Thread Christoph Zwerschke
Roger Haase schrieb:
 I had to revise your new MiddleObject.py to put the _mk_cacheLock = 
 threading.RLock() statement at the module level rather than in the 
 MiddleObject __init__ method. A new MiddleObject instance is being 
 created with each request so putting the lock inside the object
 instance does not force single-threading through the readStoreData method.

Right. I've put the lock on the class level now in r7581, that should 
work as well.

 The MiddleKit test suite does not run for me either.
 
 I will look over the 3 other 3 MiddleKit changes in the queue and
 update them for 1.0Rc1.  It will probably take me about 2 weeks to
 get around to the task.

Thanks. Anybody else who wants to brush up MiddleKit a bit before 1.0?

-- Christoph

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss