Re: Implementation PrevaylerEight
Christian Stein <[email protected]> Sat, 18 Oct 2014 17:37:00 +0200
| Newsgroups | gmane.comp.java.prevayler |
|---|---|
| Message-ID | <CAJi8+g7Zxco4mBS+T7fKNtK7aksmDGQTSGO+MWoPtTnpbX=_VA@mail.gmail.com> |
--===============6486870474315901984== Content-Type: multipart/alternative; boundary=001a11c25d4aae72680505b4409e --001a11c25d4aae72680505b4409e Content-Type: text/plain; charset=UTF-8 Hi Klaus, my answers are inlined: On Sat, Oct 18, 2014 at 4:44 PM, Klaus Wuestefeld <[email protected]> wrote: > Hi Christian, > > Very nice results. I don't know what PrevaylerEight provides in terms > of ACID guarantees. How do you compare PrevaylerEight to Prevayler in > that regard? > As the main implementation goal of P8 (PrevaylerEight) was to support a single threaded environment, it doesn't provide any built-in tools for synchronization. But I've two easy to use wrapper classes, that care about that. Somehow like the "Synchronization Wrappers" http://docs.oracle.com/javase/tutorial/collections/implementations/wrapper.html regarding, but using Lock and ReadWriteLock internally. I put some basic thoughts into ACID-ness. *A*: the tx copy is written immediatly to the store, but the commit (increase of the tx counter) is only done after the execution didn't throw an exception. didn't tested is against a jvm-crash, box-crash, power failure or even a full hard disk or heap memory. *C*: consistency is not worse/better than the Prevayler/JDBC scalability test yields. *I*(1): single-thread case: no isolation issue (and overhead) due to non concurrent execution of tx, *I*(n): multi-thread case: using system-wide lock (or read-write lock) from java.util.concurrent keeps the isolation guaranteed *D*: mh, didn't use force() <http://docs.oracle.com/javase/1.5.0/docs/api/java/nio/MappedByteBuffer.html#force()> on each commit, did I? have to check... or at least provide an option to force flush. Is there a test harness, testing the default implementation against ACID-ness? May be, I just can switch the implementation used. I believe 2s for a test run is way too little. Your numbers vary > greatly because of GC interference between runs. > Ja, like I wrote: didn't like that change, either. Going back to 20s, but no consistency checks. ;-) > The Prevayler results are still growing almost linearly with 8 > threads. You have to increase the number of threads until the result > peaks out, possibly with hundreds or even thousands of threads. > > Sure. Gonna give it a shot. Cheers, Christian --001a11c25d4aae72680505b4409e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hi Klaus,<div><br></div><div>my answers are inlined:<br><d= iv class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Sat, Oct 18, 201= 4 at 4:44 PM, Klaus Wuestefeld <span dir=3D"ltr"><<a href=3D"mailto:mail= @klaus.pro" target=3D"_blank">[email protected]</a>></span> wrote:<br><bloc= kquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-= width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;paddin= g-left:1ex">Hi Christian,<br> <br> Very nice results. I don't know what PrevaylerEight provides in terms<b= r> of ACID guarantees. How do you compare PrevaylerEight to Prevayler in<br> that regard?<br></blockquote><div><br></div><div>As the main implementation= goal of P8 (PrevaylerEight) was to support a single threaded environment, = it doesn't provide any built-in tools for synchronization. But I've= two easy to use wrapper classes, that care about that. Somehow like the &q= uot;Synchronization Wrappers" <a href=3D"http://docs.oracle.com/javase= /tutorial/collections/implementations/wrapper.html">http://docs.oracle.com/= javase/tutorial/collections/implementations/wrapper.html</a> regarding, but= using Lock and ReadWriteLock internally.</div><div><br></div><div>I put so= me basic thoughts into ACID-ness.</div><div><br></div><div><b>A</b>: the tx= copy is written immediatly to the store, but the commit (increase of the t= x counter) is only done after the execution didn't throw an exception. = didn't tested is against a jvm-crash, box-crash, power failure or even = a full hard disk or heap memory.</div><div><br></div><div><b>C</b>: consist= ency is not worse/better than the Prevayler/JDBC scalability test yields.</= div><div><br></div><div><b>I</b>(1): single-thread case: no isolation issue= (and overhead) due to non concurrent execution of tx,=C2=A0</div><div><b>I= </b>(n): multi-thread case: using system-wide lock (or read-write lock) fro= m java.util.concurrent keeps the isolation guaranteed</div><div><br></div><= div><b>D</b>: mh, didn't use <a href=3D"http://docs.oracle.com/javase/1= .5.0/docs/api/java/nio/MappedByteBuffer.html#force()">force()</a>=C2=A0on e= ach commit, did I? have to check... or at least provide an option to force = flush.</div><div><br></div><div>Is there a test harness, testing the defaul= t implementation against ACID-ness? May be, I just can switch the implement= ation used.</div><div>=C2=A0</div><div><br></div><blockquote class=3D"gmail= _quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left= -color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> I believe 2s for a test run is way too little. Your numbers vary<br> greatly because of GC interference between runs.<br></blockquote><div><br><= /div><div>Ja, like I wrote: didn't like that change, either. Going back= to 20s, but no consistency checks. ;-)=C2=A0</div><div>=C2=A0</div><blockq= uote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-wi= dth:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-= left:1ex"> The Prevayler results are still growing almost linearly with 8<br> threads. You have to increase the number of threads until the result<br> peaks out, possibly with hundreds or even thousands of threads.<br><br></bl= ockquote><div><br></div><div>Sure. Gonna give it a shot.</div><div><br></di= v><div>Cheers,</div><div>Christian</div></div><br></div></div></div> --001a11c25d4aae72680505b4409e-- --===============6486870474315901984== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho --===============6486870474315901984== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion _______________________________________________ "Databases in Memoriam" -- http://www.prevayler.org --===============6486870474315901984==--