You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by ar...@apache.org on 2003/02/06 02:25:18 UTC
cvs commit: db-ojb/xdocs performance.xml faq.xml
arminw 2003/02/05 17:25:18
Modified: . release-notes.txt build.xml
xdocs performance.xml faq.xml
Log:
update build script, docs, release notes
Revision Changes Path
1.4 +39 -11 db-ojb/release-notes.txt
Index: release-notes.txt
===================================================================
RCS file: /home/cvs/db-ojb/release-notes.txt,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- release-notes.txt 9 Jan 2003 17:36:08 -0000 1.3
+++ release-notes.txt 6 Feb 2003 01:25:18 -0000 1.4
@@ -1,14 +1,25 @@
+========================================================================
ObJectRelationalBridge -- Bridging Java Objects and Relational Databases
+========================================================================
ObJectRelationalBridge (OJB) is an Object/Relational mapping tool that
provides transparent transactional persistence for Java Objects against
relational databases.
OJB supports ODMG and JDO.
-Changes in Release 0.9.9.1
+---------------------------------------------------------------------
+Release 0.9.9.1
+---------------------------------------------------------------------
+
+NEW FEATURES:
+- With this release we are feature complete for the 1.0 release!
+For 1.0 you should not expect more features to be added.
+
+
+CHANGES:
- Metadata handling was improved. The persistent object
-metadata now is decoupled from the connection metadata.
+metadata is decoupled from the connection metadata.
- Multiple database support was simplified. Now you only
need one repository file and it is allowed to define several
@@ -27,34 +38,51 @@
Now it's possible to define a separate sequence manager for each
jdbc-connection-descriptor.
+- Refactored sequence package, better support for database
+based id gerneration.
+
- The connection factory implementations using connection
pooling (ConnectionFactoryDBCPImpl, ConnectionFactoryPooledImpl)
now support a 'validationQuery' to check if the returned pooled
connection is valid.
+- Make JdbcAccess, ConnectionManager, StatementManager pluggable
+via setting in OJB.properties
+- PersistenceBroker api changes of methods used in kernel
+getExtentClass ---> getTopLevelClass
+getConnectionManager --> serviceConnectionManager
+getStatementManager --> serviceStatementManager
+getUniqueXXX methods removed ---> use serviceSequenceManager instead
+add new method removeListener
-new features:
-With this release we are feature complete for the 1.0 release!
-For 1.0 you should not expect more features to be added.
+- Improve the OJB performance test suite. Add a simple test
+framework to allow comparison of OJB with other O/R mapping tools.
-bug fixes:
+BUG FIXES:
-Changes in Release 0.9.8
-new features:
+---------------------------------------------------------------------
+Release 0.9.8
+---------------------------------------------------------------------
+
+NEW FEATURES:
- a release notes file :-)
- On the fly database generation
- JDO support by providing a plugin to the JDO reference implementation
- support for nested fields
-bug fixes:
-- tons of bug fixes
-
With this release we are feature complete for the 1.0 release!
For 1.0 you should not expect more features to be added.
+
+CHANGES:
+- tons
+
+BUG FIXES:
+- tons of bug fixes
+
More information is available at http://jakarta.apache.org/ojb
1.66 +50 -4 db-ojb/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/db-ojb/build.xml,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- build.xml 4 Feb 2003 22:43:15 -0000 1.65
+++ build.xml 6 Feb 2003 01:25:18 -0000 1.66
@@ -685,7 +685,8 @@
<!-- Performance tests -->
<!-- ================================================================== -->
<target name="performance" depends="prepare-repository, copy-testdb"
- description="run the Performance Benchmark">
+ description="Performance benchmark, compare the PB-api/ODMG-api
+ with direct JDBC calls">
<java fork="yes" classname="org.apache.ojb.broker.PerformanceTest"
dir="${build.test}/ojb" taskname="ojb" failonerror="true" >
<classpath refid="runtime-classpath"/>
@@ -719,7 +720,7 @@
<!-- Performance tests 2 / stress test -->
<!-- ================================================================== -->
<target name="performance2" depends="prepare-testdb"
- description="Stress test and Performance Benchmark for PB- and ODMG-api">
+ description="Performance benchmark and stress test for PB- and ODMG-api">
<java fork="yes" classname="org.apache.ojb.broker.PerformanceTest2"
dir="${build.test}/ojb" taskname="ojb" failonerror="true" >
<classpath refid="runtime-classpath"/>
@@ -728,17 +729,62 @@
<arg value="false"/> <!-- if 'false' we use autoincrement key generation, default false -->
<arg value="3"/> <!-- 1 = PB-test, 2 = ODMG-test, 3 = Both, default was 3 -->
<arg value="3"/> <!-- Number of test loops, default was 3 -->
+ <arg value="false"/> <!-- if 'false' we use performance mode, 'true' we do run in stress mode -->
<jvmarg value="-Xms128m"/>
<jvmarg value="-Xmx256m"/>
</java>
</target>
<!-- ================================================================== -->
+ <!-- Simple Performance Framework -->
+ <!-- ================================================================== -->
+ <target name="perf-test" depends="prepare-testdb"
+ description="Simple performance benchmark and stress test for PB- and ODMG-api">
+ <java fork="yes" classname="org.apache.ojb.performance.PerfMain"
+ dir="${build.test}/ojb" taskname="ojb" failonerror="true" >
+ <classpath refid="runtime-classpath"/>
+ <arg value=
+ "org.apache.ojb.broker.OJBPerfTest$PBPerfTest,org.apache.ojb.broker.OJBPerfTest$ODMGPerfTest"
+ /> <!-- comma separated list of the PerfTest implementations -->
+ <arg value="3"/> <!-- test loops, default was 3 -->
+ <arg value="10"/> <!-- performed threads, default was 10 -->
+ <arg value="2000"/> <!-- number of managed objects per thread, default was 2000 -->
+ <arg value="false"/> <!-- if 'false' we use performance mode, 'true' we do run in stress mode -->
+ <jvmarg value="-Xms128m"/>
+ <jvmarg value="-Xmx256m"/>
+ </java>
+ </target>
+
+ <target name="perf-test-jar" depends="init">
+ <!-- compile perf classes -->
+ <javac srcdir="${build.srctest}"
+ includes="**/performance/*"
+ destdir="${build.desttest}"
+ debug="${debug}"
+ optimize="${optimize}"
+ deprecation="${deprecation}"
+ >
+ <classpath refid="compilation-classpath"/>
+ </javac>
+
+ <!-- jar the connector classes -->
+ <jar jarfile="${dist}/${archive}-performance.jar"
+ basedir="${build.desttest}"
+ includes="**/performance/*"
+ >
+ <manifest>
+ <attribute name="Vendor" value="db-ojb"/>
+ <attribute name="Title" value="Simple performance framework"/>
+ </manifest>
+ </jar>
+ </target>
+
+ <!-- ================================================================== -->
<!-- Performance tests 3 / stress test multiple db -->
<!-- ================================================================== -->
<target name="performance3" depends="prepare-testdb"
- description="Stress test and Performance Benchmark for PB- and ODMG-api
- using multiple databases">
+ description="Stress test for PB- and ODMG-api using multiple
+ databases">
<java fork="yes" classname="org.apache.ojb.broker.PerformanceTest3"
dir="${build.test}/ojb" taskname="ojb" failonerror="true" >
<classpath refid="runtime-classpath"/>
1.6 +222 -100 db-ojb/xdocs/performance.xml
Index: performance.xml
===================================================================
RCS file: /home/cvs/db-ojb/xdocs/performance.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- performance.xml 31 Jan 2003 17:42:44 -0000 1.5
+++ performance.xml 6 Feb 2003 01:25:18 -0000 1.6
@@ -3,49 +3,117 @@
<properties>
<author email="thma@apache.org">Thomas Mahler</author>
+ <author>Armin Waibel</author>
<title>ObJectRelationalBridge</title>
</properties>
<body>
-<section name="the ojb performance test suite">
-<P>
-<B>How OJB compares to native JDBC programming</B>
-</P>
+<section name="The OJB Performance Test Suite">
+
+
+<ul>
+ <li><a href="#1">Introduction</a></li>
+ <li><a href="#2">The Performance Test Suite</a></li>
+ <li><a href="#3">Interpreting test results</a></li>
+ <li><a href="#4">How OJB compares to native JDBC programming?</a></li>
+ <li><a href="#5">OJB performance in multi-threaded environments</a></li>
+ <li><a href="#6">How OJB compares to other O/R mapping tools?</a></li>
+ <li><a href="#7">Using OJB to write clean JDBC code</a></li>
+</ul>
+
<P>
-<FONT COLOR="#ff0000"><I><B>important note: this document is not finished yet.</B></I></FONT>
+<font color="#ff0000"><i><b>important note: this document is not finished yet.</b></i></font>
</P>
-<H2>introduction</H2>
-<P><I>"<B>There is no such thing as a free lunch."
-</B><br/></I><FONT SIZE="2">(North American proverb)</FONT></P>
-<P>Object/relational mapping tools hide the details of relational
+
+
+<subsection name="Introduction" anchor="1">
+<p><i>"
+<b>There is no such thing as a free lunch."</b><br/>
+</i>
+<font size="-2">(North American proverb)</font></p>
+<p>
+Object/relational mapping tools hide the details of relational
databases from the application developer. The developer can
concentrate on implementing business logic and is liberated from
-caring about RDBMS related coding with JDBC and SQL.</P>
-<P>O/R mapping tools allow to separate business logic from RDBMS
+caring about RDBMS related coding with JDBC and SQL.
+</p>
+
+<p>
+O/R mapping tools allow to separate business logic from RDBMS
access by forming an additional software layer between business logic
and RDBMS. Introducing new software layers always eats up additional
-computing resources. <br/>In short: the price for using O/R tools is
-performance.
-</P>
-<P>Software architects have to take in account this tradeoff between
+computing resources.
+<br/>In short: the price for using O/R tools is performance.
+</p>
+
+<p>
+Software architects have to take in account this tradeoff between
programming comfort and performance to decide if it is appropiate to
-use an O/R tool for a specific software system.</P>
-<P>This document describes the OJB Performance TestSuite. This
-TestSuite allows to compare OJB against native JDBC programming
-against your RDBMS of choice.</P>
-<P>Interpreting the result of these benchmarks carefully will help to
+use an O/R tool for a specific software system.
+</p>
+<p>
+This document describes the <i>OJB Performance Test Suite</i>.
+</p>
+</subsection>
+
+<subsection name="The Performance Test Suite" anchor="2">
+<p>
+The <i>OJB Performance Test Suite</i> allows to compare OJB
+against <a href="#4">native JDBC programming</a>
+against your RDBMS of choice and run OJB in a <a href="#5">virtual multithreaded
+environment</a>. Further on you only need to implement two test
+classes to <a href="#6">compare OJB against any O/R mapping tool</a>.
+</p>
+<p>
+All tests are integrated in the OJB build script,
+perform the according ant target.
+</p>
+<p>
+By changing the JdbcConnectionDescriptor in the repository.xml file
+you can point to your specific RDBMS. Please
+refer to this <a href="platforms.html">document for details</a>.
+</p>
+</subsection>
+
+
+
+<subsection name="Interpreting test results" anchor="3">
+<p>
+Interpreting the result of these benchmarks carefully will help to
decide whether using OJB is viable for specific application scenarios
-or if native JDBC programming should be used for performance reasons.</P>
-<H2>The Performance TestSuite</H2>
-<P>The OJB Performance TestSuite consist of two JUnit Testcases. The
-TestCase <FONT FACE="Courier, monospace">test.ojb.broker.PerformanceTest</FONT>
-contains the OJB based test. And The TestCase
-<FONT FACE="Courier, monospace">test.ojb.broker.PerformanceJdbcReferenceTest
-</FONT>contains the JDBC based tests.</P>
-<P><br/><br/>
-</P>
+or if native JDBC programming should be used for performance reasons.
+</p>
+<p>
+If the decision made to use an O/R mapping tool the comparison with
+other tools helps to find the best one for the thought scenario.
+<br/>
+But performance should not be the only reason to take a specific
+O/R tool.
+
+<font color="#ff0000"><i><b>
+bla bla TODO
+</b></i></font>
+
+</p>
+
+</subsection>
+
+
+
+<subsection name="How OJB compares to native JDBC programming?" anchor="4">
+
+<font color="#ff0000"><i><b>
+TODO
+</b></i></font>
+
+<p>
+test.ojb.broker.PerformanceTest
+test.ojb.odmg.PerformanceTest
+test.ojb.broker.PerformanceJdbcReferenceTest
+<br/>
+<br/>
<H3>the Test scenarios</H3>
<H4>inserting objects</H4>
<H4>updating objects</H4>
@@ -54,82 +122,136 @@
<H4>fetch objects from a cursor</H4>
<H4>deleting objects</H4>
<H3>running the test suite</H3>
-<P>The TestSuite is integrated into the OJB build mechanism. You can
-invoke it by typing<br/><FONT FACE="Courier, monospace">build[.sh]
-performance</FONT>.</P>
-<P>If running OJB out of the box the tests will be performed against
+</p>
+
+<p>
+The test suite is integrated into the OJB build mechanism. You can
+invoke it by typing <code>bin\build.bat performance</code> or
+<code>bin/build.sh performance</code>.
+</p>
+
+<p>
+If running OJB out of the box the tests will be performed against
the Hypersonic SQL shipped with OJB. A typical output looks like
-follows:</P>
-<PRE>performance:
- [ojb] [BOOT] INFO: OJB.properties:
- file:/home/tom/ojb-1-0/build/test/ojb/OJB.properties
- [ojb] .[performance] INFO:
- [ojb] [performance] INFO: inserting 10000 Objects: 6374 msec
- [ojb] [performance] INFO: updating 10000 Objects: 6083 msec
- [ojb] [performance] INFO: querying 10000 Objects: 2878 msec
- [ojb] [performance] INFO: querying 10000 Objects: 171 msec
- [ojb] [performance] INFO: fetching 10000 Objects: 514 msec
- [ojb] [performance] INFO: deleting 10000 Objects: 2126 msec
+follows:
+<source>
+performance:
+ [ojb] .[performance] INFO: Test for PB-api
+ [ojb] [performance] INFO: inserting 2500 Objects: 1462 msec
+ [ojb] [performance] INFO: updating 2500 Objects: 942 msec
+ [ojb] [performance] INFO: querying 2500 Objects: 761 msec
+ [ojb] [performance] INFO: querying 2500 Objects: 50 msec
+ [ojb] [performance] INFO: fetching 2500 Objects: 260 msec
+ [ojb] [performance] INFO: deleting 2500 Objects: 341 msec
[ojb] [performance] INFO:
- [ojb] [performance] INFO: inserting 10000 Objects: 4479 msec
- [ojb] [performance] INFO: updating 10000 Objects: 7232 msec
- [ojb] [performance] INFO: querying 10000 Objects: 2918 msec
- [ojb] [performance] INFO: querying 10000 Objects: 153 msec
- [ojb] [performance] INFO: fetching 10000 Objects: 853 msec
- [ojb] [performance] INFO: deleting 10000 Objects: 1968 msec
+ [ojb] [performance] INFO: inserting 2500 Objects: 681 msec
+ [ojb] [performance] INFO: updating 2500 Objects: 971 msec
+ [ojb] [performance] INFO: querying 2500 Objects: 621 msec
+ [ojb] [performance] INFO: querying 2500 Objects: 30 msec
+ [ojb] [performance] INFO: fetching 2500 Objects: 210 msec
+ [ojb] [performance] INFO: deleting 2500 Objects: 301 msec
[ojb] [performance] INFO:
- [ojb] [performance] INFO: inserting 10000 Objects: 5601 msec
- [ojb] [performance] INFO: updating 10000 Objects: 6471 msec
- [ojb] [performance] INFO: querying 10000 Objects: 2682 msec
- [ojb] [performance] INFO: querying 10000 Objects: 151 msec
- [ojb] [performance] INFO: fetching 10000 Objects: 678 msec
- [ojb] [performance] INFO: deleting 10000 Objects: 1956 msec
- [ojb]
- [ojb] Time: 54,151
- [ojb]
- [ojb] OK (1 tests)
- [ojb]
- [jdbc] [BOOT] INFO: OJB.properties:
- file:/home/tom/ojb-1-0/build/test/ojb/OJB.properties
- [jdbc] .[performance] INFO:
- [jdbc] [performance] INFO: inserting 10000 Objects: 2494 msec
- [jdbc] [performance] INFO: updating 10000 Objects: 3229 msec
- [jdbc] [performance] INFO: querying 10000 Objects: 2129 msec
- [jdbc] [performance] INFO: querying 10000 Objects: 1905 msec
- [jdbc] [performance] INFO: fetching 10000 Objects: 116 msec
- [jdbc] [performance] INFO: deleting 10000 Objects: 927 msec
- [jdbc] [performance] INFO:
- [jdbc] [performance] INFO: inserting 10000 Objects: 2435 msec
- [jdbc] [performance] INFO: updating 10000 Objects: 3224 msec
- [jdbc] [performance] INFO: querying 10000 Objects: 1906 msec
- [jdbc] [performance] INFO: querying 10000 Objects: 1911 msec
- [jdbc] [performance] INFO: fetching 10000 Objects: 126 msec
- [jdbc] [performance] INFO: deleting 10000 Objects: 909 msec
- [jdbc] [performance] INFO:
- [jdbc] [performance] INFO: inserting 10000 Objects: 2482 msec
- [jdbc] [performance] INFO: updating 10000 Objects: 3603 msec
- [jdbc] [performance] INFO: querying 10000 Objects: 2091 msec
- [jdbc] [performance] INFO: querying 10000 Objects: 2335 msec
- [jdbc] [performance] INFO: fetching 10000 Objects: 271 msec
- [jdbc] [performance] INFO: deleting 10000 Objects: 1046 msec
- [jdbc]
- [jdbc] Time: 50,568
- [jdbc]
- [jdbc] OK (1 tests)
- [jdbc]
+ [ojb] [performance] INFO: inserting 2500 Objects: 761 msec
+ [ojb] [performance] INFO: updating 2500 Objects: 901 msec
+ [ojb] [performance] INFO: querying 2500 Objects: 631 msec
+ [ojb] [performance] INFO: querying 2500 Objects: 30 msec
+ [ojb] [performance] INFO: fetching 2500 Objects: 221 msec
+ [ojb] [performance] INFO: deleting 2500 Objects: 300 msec
-BUILD SUCCESSFUL</PRE><P>
-By changing the JdbcConnectionDescriptor in the repository.xml file
-you can point to your specific RDBMS. <A HREF="platforms.html">Please
-refer to this document for details</A>.</P>
-<P><br/><br/>
-</P>
-<H2>Interpreting test results</H2>
-<H2>using OJB to write clean JDBC code</H2>
-<P><br/><br/>
-</P>
+ [ojb] Time: 10,916
+
+ [ojb] OK (1 test)
+</source>
+
+</p>
+</subsection>
+
+
+
+
+<subsection name="OJB performance in multi-threaded environments" anchor="5">
+
+<font color="#ff0000"><i><b>
+TODO
+</b></i></font>
+
+<p>
+To test the performance of OJB in an multithreaded environment call
+<code>bin\build.bat perf-test</code> or
+<code>bin/build.sh perf-test</code>.
+</p>
+
+<p>
+A typical output of this test looks like:
+<source>
+ [ojb] ----------------------------------------------------
+ [ojb] TEST SUMMARY - ODMG
+ [ojb] ----------------------------------------------------
+ [ojb] 10 concurrent threads, handle 2000 articles per thread
+ [ojb] Test period: 46.72 [sec]
+ [ojb] Inserting period: 25878 [msec]
+ [ojb] Fetching period: 6551 [msec]
+ [ojb] Deleting period: 10725 [msec]
+
+ [ojb] Test was successful
+ [ojb] ----------------------------------------------------
+
+ [ojb] ----------------------------------------------------
+ [ojb] TEST SUMMARY - PB
+ [ojb] ----------------------------------------------------
+ [ojb] 10 concurrent threads, handle 2000 articles per thread
+ [ojb] Test period: 16.697 [sec]
+ [ojb] Inserting period: 11731 [msec]
+ [ojb] Fetching period: 162 [msec]
+ [ojb] Deleting period: 2247 [msec]
+
+ [ojb] Test was successful
+ [ojb] ----------------------------------------------------
+
+ [ojb] PerfTest takes 201 [sec]
+</source>
+</p>
+<p>
+To change the test properties go to target <code>perf-test</code>
+in the <code>build.xml</code> file and change the program parameter.
+<br/>
+The test needs five parameter:
+<br/>- A comma separated list of the test implementation classes
+<br/>- The number of test loops
+<br/>- The number of concurrent threads
+<br/>- The number of managed objects per thread
+<br/>- The desired test mode. <code>false</code> means run in
+performance mode, <code>true</code> means run in stress mode.
+</p>
+</subsection>
-</section>
+
+
+<subsection name="How OJB compares to other O/R mapping tools?" anchor="6">
+<p>
+
+<font color="#ff0000"><i><b>
+TODO
+</b></i></font>
+
+</p>
+</subsection>
+
+
+
+
+<subsection name="Using OJB to write clean JDBC code" anchor="6">
+<p>
+
+<font color="#ff0000"><i><b>
+TODO
+</b></i></font>
+
+</p>
+</subsection>
+
+
+</section>
</body>
</document>
1.14 +18 -1 db-ojb/xdocs/faq.xml
Index: faq.xml
===================================================================
RCS file: /home/cvs/db-ojb/xdocs/faq.xml,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- faq.xml 31 Jan 2003 17:42:44 -0000 1.13
+++ faq.xml 6 Feb 2003 01:25:18 -0000 1.14
@@ -17,6 +17,8 @@
<li><a href="#8">How is OJB related to ODMG and JDO?</a></li>
<li><a href="#17">What are the OJB design principals?</a></li>
<li><a href="#18">Where can I learn more about Object/Relational mapping in general?</a></li>
+ <li><a href="#34">How OJB performance compares to native JDBC programming?</a></li>
+ <li><a href="#35">How OJB performance compares to other O/R mapping tools?</a></li>
</ul>
@@ -25,7 +27,7 @@
<li><a href="#1">Help! I'm having problems installing and using OJB!</a></li>
<li><a href="#2">Help! I still have serious problems installing OJB!</a></li>
<li><a href="#4">Does OJB support my RDBMS?</a></li>
- <li><a href="#10">What are the OJB internal tables for?</a></li>
+ <li><a href="#33">What are the OJB internal tables for?</a></li>
</ul>
@@ -247,6 +249,21 @@
<a href="links.html#further readings on O/R mapping">We have a link list pointing to further readings.</a>
</p>
</subsection>
+
+
+ <subsection name="How OJB performance compares to native JDBC programming?" anchor="34">
+ <p>
+ See section <a href="performance.html">Performance</a>.
+ </p>
+ </subsection>
+
+ <subsection name="How OJB performance compares to other O/R mapping tools?" anchor="35">
+ <p>
+ See section <a href="performance.html">Performance</a>.
+ </p>
+ </subsection>
+
+
<subsection name="How can Collections of primitive typed elements be mapped?" anchor="19">
<p>