[Zope] Advanced Transactions:
Paolo Quaglia
paolo@sitek.it
Wed, 13 Dec 2000 15:36:48 +0100
This is a multi-part message in MIME format.
------=_NextPart_000_0000_01C0651A.8170EAF0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Hi All,
I'm building a high transaction traffic db application using Zope.
I used for this tests two DB: MSAccess 97 and SQL Server 7.0 with the
ZODBCDA product
I have made some tests and I have found this:
The test is:
I have two DTML document called Test1 and Test2
I have 2 ZSQL Queries called Select1 and Select2
I have an external method (which id is Wait) that call the time.sleep(10)
#it sleeps 10 seconds
Test1 calls Select1 and then the Wait()
Test2 calls Select2
First transaction test:
Select1 and Select2 queries are equal:= select * from Users where
name='example'
I call test1 in a browser and immediately after test2 in another Browser.
RESULT: Test2 wait the end of test1 before the page was displayed
Second Transaction test:
Select1 = select * from Users where name='example'
Select2 = select * from Products where id='example'
I call test1 in a browser and immediately after test2 in another Browser.
RESULT: Test2 wait the end of test1 before the page was displayed!!
Third Transaction test:
Select1 = select * from Users where name='example' on the Access Connection
Select2 = select * from Products where id='example' on the SQL sever
Connection
I call test1 in a browser and immediately after test2 in another Browser.
RESULT: Test2 wait the end of test1 before the page was displayed!!!!!!!!!!
:(
Now Summarizing:
I think the Zope transaction Server works in every Zope operation. This is
good, but it seems that it uses a bad locking method. I mean when I read a
DB (usually a select) I wouldn't to lock the entire DB and I would let the
other DB session free to call select statements!!
Am I right?? Or I do some mistake??
Thanks Very much for your cooperation
Paolo Quaglia
Information Technology Coordinator
Sitek S.p.A.
paolo@sitek.it
------=_NextPart_000_0000_01C0651A.8170EAF0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D121485813-13122000>Hi=20
All,</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D121485813-13122000>I'm =
building a high=20
transaction traffic db application using Zope.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D121485813-13122000>I used =
for this=20
tests two DB: MSAccess 97 and SQL Server 7.0 with the ZODBCDA=20
product</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D121485813-13122000></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D121485813-13122000>I =
have made=20
some tests and I have found this:</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D121485813-13122000></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D121485813-13122000>The =
test=20
is:</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D121485813-13122000>I have =
two DTML=20
document called Test1 and Test2</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D121485813-13122000>I have =
2 ZSQL=20
Queries called Select1 and Select2</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D121485813-13122000>I have =
an external=20
method (which id is Wait) that call the time.sleep(10) #it sleeps 10=20
seconds</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D121485813-13122000></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D121485813-13122000>Test1 =
calls Select1=20
and then the Wait() </SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D121485813-13122000></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D121485813-13122000>Test2 =
calls Select2=20
</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D121485813-13122000></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D121485813-13122000>First =
transaction=20
test:</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D121485813-13122000>Select1 and Select2=20
queries are equal:=3D select * from Users where =
name=3D'example'</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D121485813-13122000>I call =
test1 in=20
a browser and immediately after test2 in another=20
Browser.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D121485813-13122000>RESULT: Test2 wait=20
the end of test1 before the page was displayed</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D121485813-13122000></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D121485813-13122000>Second =
Transaction=20
test:</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D121485813-13122000>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D121485813-13122000>Select1 =3D select *=20
from Users where name=3D'example'</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D121485813-13122000>Select2 =3D select *=20
from Products where id=3D'example'</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D121485813-13122000>I call =
test1 in=20
a browser and immediately after test2 in another=20
Browser.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D121485813-13122000>RESULT: Test2 wait=20
the end of test1 before the page was=20
displayed!!</SPAN></FONT></DIV></SPAN></FONT></DIV>
<DIV><SPAN class=3D121485813-13122000></SPAN> </DIV>
<DIV><SPAN class=3D121485813-13122000></SPAN> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D121485813-13122000>Third =
Transaction=20
test:</SPAN></FONT></DIV>
<DIV><SPAN class=3D121485813-13122000>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D121485813-13122000>Select1 =3D select *=20
from Users where name=3D'example' on the Access =
Connection</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D121485813-13122000>Select2 =3D select *=20
from Products where id=3D'example' on the SQL sever=20
Connection</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D121485813-13122000>I call =
test1 in=20
a browser and immediately after test2 in another=20
Browser.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D121485813-13122000>RESULT: Test2 wait=20
the end of test1 before the page was displayed!!!!!!!!!! =
:(</SPAN></FONT></DIV>
<DIV><SPAN class=3D121485813-13122000></SPAN> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D121485813-13122000>Now=20
Summarizing:</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D121485813-13122000>I =
think the Zope=20
transaction Server works in every Zope operation. This is good, but it=20
seems that it uses a bad locking method. I mean when I read a DB =
(usually a=20
select) I wouldn't to lock the entire DB and I would let the other DB =
session=20
free to call select statements!!</SPAN></FONT></DIV>
<DIV><SPAN class=3D121485813-13122000></SPAN> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D121485813-13122000>Am I =
right?? Or I do=20
some mistake?? </SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D121485813-13122000>Thanks =
Very much for=20
your cooperation</SPAN></FONT></DIV></SPAN></DIV>
<P><FONT face=3DArial size=3D2>Paolo Quaglia<BR>Information Technology=20
Coordinator<BR>Sitek S.p.A.<BR>paolo@sitek.it </FONT></P>
<DIV> </DIV></BODY></HTML>
------=_NextPart_000_0000_01C0651A.8170EAF0--