Skip to content

Commit 596dae7

Browse files
committed
Prepare for Beta2.
1 parent dd4c4fe commit 596dae7

File tree

6 files changed

+28
-20
lines changed

6 files changed

+28
-20
lines changed
Binary file not shown.
Binary file not shown.

TaskParallelFoundation/Databases/SqlServer/Schema Objects/Schemas/dbo/Programmability/Stored Procedures/TPW_DBMS_ALERT_REGISTER.proc.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ AS
1717

1818
IF @@ROWCOUNT = 0
1919
INSERT INTO TPW_DBMS_ALERT (ALERT_NAME, ALERT_SIGNAL, REFERENCE_COUNT, FIRST_REGISTER, LAST_REGISTER, EXPIRY_TIME)
20-
VALUES (@inAlert_Name, 0, 0, @tNow, @tNow, @tExpiry_Time);
20+
VALUES (@inAlert_Name, 0, 1, @tNow, @tNow, @tExpiry_Time);
2121

2222
----------------------------------------------------------------------------------------------------
2323
--

TaskParallelFoundation/Databases/SqlServer/Scripts/Pre-Deployment/0-TPW_RESET_DATA.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ TRUNCATE TABLE TPW_SYS_ERROR;
55
TRUNCATE TABLE TPW_PUMP_SERVER;
66
TRUNCATE TABLE TPW_WK_LOG;
77
TRUNCATE TABLE TPW_WK_LOG_ARCHIVE;
8+
TRUNCATE TABLE TPW_DBMS_ALERT;
89
DELETE FROM TPW_PJOB;
910
DELETE FROM TPW_PJOB_ARCHIVE;
1011

TaskParallelFoundation/Documents/Setup for Oracle.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
DbParallel.Dispatcher.dll
1212
DbParallel.DataAccess.dll
1313

14-
(This binary distribution uses DataDirect Connect for ADO.NET v3.5 as the provider for Oracle,
15-
Please download source code if you want to replace it by other ADO.NET provider)
14+
There are two binary distributions separately for using DataDirect and using ODP.NET.
15+
Please download source code if you want to replace it by other ADO.NET provider for Oracle.
16+
(See also: http://databooster.codeplex.com)
1617

1718
Change DbParallel.PumpService.exe.config:
1819
TPW_Database (under connectionStrings) to be custom database connection string;

TaskParallelFoundation/Documents/wikipage_home.htm

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,49 +4,50 @@
44
<title>dbParallel WikiPage Home</title>
55
</head>
66
<body>
7-
<p><strong>Project Description</strong><br />The dbParallel is a Database Task Parallel Foundation that provides database developers an application level support for parallel programming. Being distinct from Oracle 11g R2's DBMS_PARALLEL_EXECUTE parallelism within a query by chunks, dbParallel works more like a .NET Task Parallel Library implemented on database side, it handles the partitioning of the asynchronous job, the scheduling of tasks, state management, and other low-level details in a lightweight implement which using about eight hundred lines of SQL code and one thousand lines of C# code in total (except test code).</p>
7+
<p><strong>Project Description</strong><br />The dbParallel is a Database Task Parallel Foundation that provides database developers an application level support for parallel programming. Being distinct from Oracle 11g R2's DBMS_PARALLEL_EXECUTE parallelism within a query by chunks, dbParallel works more like a .NET Task Parallel Library implemented on database side, it handles the partitioning of the asynchronous job, the scheduling of tasks, state management, and other low-level details in a lightweight implementation.</p>
88
<div><strong>Get started</strong><br />A quick example (for Oracle Version)</div>
99
<div style="color: black; background-color: white;">
1010
<pre><span style="color: blue;">PROCEDURE</span> TEST_1
1111
<span style="color: blue;">AS</span>
1212
tPJob_ID PLS_INTEGER;
1313
tSQL VARCHAR2(256);
1414
<span style="color: blue;">BEGIN</span>
15-
tPJob_ID := XYZ.TPW_CALL.CREATE_PJOB(<span style="color: #a31515;">'App1'</span>, <span style="color: #a31515;">'User1'</span>, <span style="color: #a31515;">'This is test1.'</span>);
15+
tPJob_ID := <span style="color: #808080;">XYZ.TPW_CALL.</span>CREATE_PJOB(<span style="color: #a31515;">'App1'</span>, <span style="color: #a31515;">'User1'</span>, <span style="color: #a31515;">'This is test1.'</span>);
1616

1717
tSQL := UTL_LMS.FORMAT_MESSAGE(<span style="color: #a31515;">'DBMS_LOCK.SLEEP(%d)'</span>, 10);
18-
XYZ.TPW_CALL.ADD_TASK(tPJob_ID, tSQL, 60, <span style="color: #a31515;">'Task1 sleep for 10 seconds.'</span>);
18+
<span style="color: #808080;">XYZ.TPW_CALL.</span>ADD_TASK(tPJob_ID, tSQL, 60, <span style="color: #a31515;">'Task1 sleep for 10 seconds.'</span>);
1919

2020
tSQL := UTL_LMS.FORMAT_MESSAGE(<span style="color: #a31515;">'DBMS_LOCK.SLEEP(%d)'</span>, 70);
21-
XYZ.TPW_CALL.ADD_TASK(tPJob_ID, tSQL, 60, <span style="color: #a31515;">'Task2 sleep for 70 seconds.'</span>);
21+
<span style="color: #808080;">XYZ.TPW_CALL.</span>ADD_TASK(tPJob_ID, tSQL, 60, <span style="color: #a31515;">'Task2 sleep for 70 seconds.'</span>);
2222

2323
tSQL := UTL_LMS.FORMAT_MESSAGE(<span style="color: #a31515;">'DBMS_LOCK.SLEEP(%d)'</span>, 30);
24-
XYZ.TPW_CALL.ADD_TASK(tPJob_ID, tSQL, 60, <span style="color: #a31515;">'Task3 sleep for 30 seconds.'</span>);
24+
<span style="color: #808080;">XYZ.TPW_CALL.</span>ADD_TASK(tPJob_ID, tSQL, 60, <span style="color: #a31515;">'Task3 sleep for 30 seconds.'</span>);
2525

2626
tSQL := UTL_LMS.FORMAT_MESSAGE(<span style="color: #a31515;">'DBMS_LOCK.SLEEP(%d)'</span>, 70);
27-
XYZ.TPW_CALL.ADD_TASK(tPJob_ID, tSQL, 120, <span style="color: #a31515;">'Task4 sleep for 70 seconds.'</span>);
27+
<span style="color: #808080;">XYZ.TPW_CALL.</span>ADD_TASK(tPJob_ID, tSQL, 120, <span style="color: #a31515;">'Task4 sleep for 70 seconds.'</span>);
2828

2929
tSQL := UTL_LMS.FORMAT_MESSAGE(<span style="color: #a31515;">'DBMS_LOCK.SLEEP(%d)'</span>, 15);
30-
XYZ.TPW_CALL.ADD_CALLBACK_FOR_SUCCESS(tPJob_ID, tSQL, 180, <span style="color: #a31515;">'Sleep for 15s if all success.'</span>);
30+
<span style="color: #808080;">XYZ.TPW_CALL.</span>ADD_CALLBACK_FOR_SUCCESS(tPJob_ID, tSQL, 180, <span style="color: #a31515;">'Sleep for 15s if all success.'</span>);
3131

3232
tSQL := UTL_LMS.FORMAT_MESSAGE(<span style="color: #a31515;">'DBMS_LOCK.SLEEP(%d)'</span>, 25);
33-
XYZ.TPW_CALL.ADD_CALLBACK_FOR_FAIL(tPJob_ID, tSQL, 180, <span style="color: #a31515;">'Sleep for 25s if fail.'</span>);
33+
<span style="color: #808080;">XYZ.TPW_CALL.</span>ADD_CALLBACK_FOR_FAIL(tPJob_ID, tSQL, 180, <span style="color: #a31515;">'Sleep for 25s if fail.'</span>);
3434

35-
XYZ.TPW_CALL.START_PJOB(tPJob_ID);
35+
<span style="color: #808080;">XYZ.TPW_CALL.</span>START_PJOB(tPJob_ID);
3636

3737
DBMS_OUTPUT.PUT_LINE(<span style="color: #a31515;">'New PJob_ID#'</span> || tPJob_ID);
3838
<span style="color: blue;">END</span> TEST_1;</pre>
3939
</div>
4040
<div>The example executes Task1-4 in parallel and when everything is finished, the callback task is executed <em>(in this case callback will be a fail since task 2 failed - timeout)</em>.<br /><img style="vertical-align: middle;" src="http://www.codeplex.com/Download?ProjectName=dbparallel&amp;DownloadId=370939" alt="" width="635" height="230" /></div>
4141
<p><strong>Features</strong><br />Following API list of current version reflects the features:</p>
4242
<ol>
43-
<li>XYZ.TPW_CALL.CREATE_PJOB<br />Each of the above sample processing units are called a PJob. PJob represents an asynchronous operation. This method returns a pJob Id for below methods (2, 3, 4, 5, 6). </li>
44-
<li>XYZ.TPW_CALL.ADD_TASK<br />Each pJob contains one or more parallel tasks. Each task is a dynamic SQL. Call the ADD_TASK multiple times to add every parallel tasks into the pJob. </li>
45-
<li>XYZ.TPW_CALL.ADD_CALLBACK_FOR_SUCCESS<br />This is a optional method. Since a pJob is asynchronous, the callback Task is called to execute a continuation when all the parallel Tasks successfully completed. </li>
46-
<li>XYZ.TPW_CALL.ADD_CALLBACK_FOR_FAIL<br />This is a optional method. Similar but opposite to previous callback for success, the callback Task for fail is called to execute a continuation when all the parallel Tasks completed but any of them throw out database exception(s). </li>
47-
<li>XYZ.TPW_CALL.START_PJOB<br />Starts the pJob, scheduling it for execution. </li>
48-
<li>XYZ.TPW_CALL.TRY_CANCEL_PJOB<br />Try to cancel a scheduled pJob if it hasn't begin to execute. </li>
49-
<li>XYZ.TPW_CALL.START_NEW_SINGLE_TASK<br />This method encapsulates a series of steps for conveniently creating and starting single task and callback task. </li>
43+
<li><span style="color: #808080;">XYZ.TPW_CALL.</span>CREATE_PJOB<br />Each of the above sample processing units are called a PJob. PJob represents an asynchronous operation. This method returns a pJob Id for below methods (2, 3, 4, 5, 6). </li>
44+
<li><span style="color: #808080;">XYZ.TPW_CALL.</span>ADD_TASK<br />Each pJob contains one or more parallel tasks. Each task is a dynamic SQL. Call the ADD_TASK multiple times to add every parallel tasks into the pJob. </li>
45+
<li><span style="color: #808080;">XYZ.TPW_CALL.</span>ADD_CALLBACK_FOR_SUCCESS<br />This is a optional method. Since a pJob is asynchronous, the callback Task is called to execute a continuation when all the parallel Tasks successfully completed. </li>
46+
<li><span style="color: #808080;">XYZ.TPW_CALL.</span>ADD_CALLBACK_FOR_FAIL<br />This is a optional method. Similar but opposite to previous callback for success, the callback Task for fail is called to execute a continuation when all the parallel Tasks completed but any of them throw out database exception(s). </li>
47+
<li><span style="color: #808080;">XYZ.TPW_CALL.</span>START_PJOB<br />Starts the pJob, scheduling it for execution. </li>
48+
<li><span style="color: #808080;">XYZ.TPW_CALL.</span>TRY_CANCEL_PJOB<br />Try to cancel a scheduled pJob if it hasn't begin to execute. </li>
49+
<li><span style="color: #808080;">XYZ.TPW_CALL.</span>START_NEW_SINGLE_TASK<br />This method encapsulates a series of steps for conveniently creating and starting single task and callback task. </li>
50+
<li><span style="color: #808080;">XYZ.TPW_CALL.</span>WAIT_PJOB<br />Waits for all provided Tasks (parallel subtasks and callback task) of a pJob to complete execution.<br />To support this method, Oracle version utilizes the signaling mechanism come from SYS.DBMS_ALERT package; SQL Serverv version imitates it by a polling loop at present.</li>
5051
</ol>
5152
<p>(XYZ is the schema name, it should be replaced by your schema name)</p>
5253
<p>Open the source code of Oracle package TPW_CALL <em>(or SQL Server stored procedures with prefix TPW_CALL_)</em> for detail parameters.</p>
@@ -71,14 +72,19 @@
7172
<ul>
7273
<li>Supported Databases:<br />- Oracle (dev and test on version 11g R1 and R2, hasn't try on earlier version);<br />- SQL Server 2005 or later version; </li>
7374
<li>Windows Service:<br />.NET Framework 4.0 Client Profile </li>
74-
<li>ADO.NET Provider:<br />- Oracle - <em>DataDirect Connect for ADO.NET v3.5 (the provider can be easily replaced by other provider for Oracle with the source code)</em><br />- SQL Server - .NET Framework build-in SqlClient provider. </li>
75+
<li>ADO.NET Provider:<br />+ Oracle - <em>DataDirect Connect for ADO.NET v3.5<br />
76+
&nbsp;Or&nbsp;&nbsp; - ODP.NET<br />
77+
&nbsp;(the provider can be easily replaced by other provider for Oracle with the source code)</em><br />
78+
+ SQL Server - .NET Framework build-in SqlClient provider. </li>
7579
</ul>
7680
<p style="padding-left: 30px;">At present the dbParallel only support Oracle and SQL Server.</p>
7781
<p><strong>Contribute</strong></p>
7882
<ul>
7983
<li>Welcome all feedback through the CodePlex project (through comments, patches, or items in the Issue Tracker); </li>
8084
<li>Earnestly request adding support for other databases; </li>
8185
</ul>
86+
<p>Documentation</p>
87+
<p style="padding-left: 30px;">To be prepared ...</p>
8288
<p><strong>Support</strong></p>
8389
<p style="padding-left: 30px;">Feel free to use the source in your apps, and products.<br />For production support, please mark [PROD] in email subject to <a href="mailto:[email protected]">[email protected]</a>.<br />This project is developed in personal time, the source code support can be available only at night - Easten Time (US &amp; Canada).</p>
8490
</body>

0 commit comments

Comments
 (0)