473,326 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

compromise Design patterns for multi threading

I have a bridge windows service application that provide service for
two applications running on Oracle and SQL server 2000 respectively.
Oracle application has trip info and SQL application has GPS Log info.
My Application read trip, compare with Log and update GPS status back
to Oracle Application. I used producer object, work queue and consumer
object. My application must execute more or less 10000 jobs in queue
within in every 2 minute interval. Here is come to question I would
like to know, Is it safe and sound if I used foreground Threads for
each job in queue? How do I design application to do in time execution
if I used thread pooling offered from .NET framework? On the other
hand, I don't want to manage execution threads that need a lot of
ManualResetEvent objects. I was wondering your scalable design patterns
for scenario like this? Thanks in advance.

Nov 17 '05 #1
3 1798
AFAIK the solution with ThreadPool is most scalable if those 10000 of jobs
are shortrunning ones. Also you can set the number of threads in the thread
pool.

Do those jobs have to complete in 2 minutes timeout?

You can also try to use other ThreadPool implementations.

Here are some links:

( http://www.thecodeproject.com/csharp...S-Projects.asp )

--
Vadym Stetsyak aka Vadmyst

"Jonathan Woods" <ye******@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I have a bridge windows service application that provide service for
two applications running on Oracle and SQL server 2000 respectively.
Oracle application has trip info and SQL application has GPS Log info.
My Application read trip, compare with Log and update GPS status back
to Oracle Application. I used producer object, work queue and consumer
object. My application must execute more or less 10000 jobs in queue
within in every 2 minute interval. Here is come to question I would
like to know, Is it safe and sound if I used foreground Threads for
each job in queue? How do I design application to do in time execution
if I used thread pooling offered from .NET framework? On the other
hand, I don't want to manage execution threads that need a lot of
ManualResetEvent objects. I was wondering your scalable design patterns
for scenario like this? Thanks in advance.

Nov 17 '05 #2
Jobs have to execute one stored procedure ( I put all business logic
into one) and decide ReEnqueue or not based on outcoming result. Yes,
Jobs have to complete within 2 mintues for each round trip of queue.
And Jobs can vary over time.

In previous version, It has manager object and performance counter
object that try to assign jobs and control execution. I don't want to
use these overhead objects need to be created and destroyed. so, I
changed threadstart style.

Nov 17 '05 #3
I think thread pool will work okay in your case

--
Vadym Stetsyak aka Vadmyst

"Jonathan Woods" <ye******@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Jobs have to execute one stored procedure ( I put all business logic
into one) and decide ReEnqueue or not based on outcoming result. Yes,
Jobs have to complete within 2 mintues for each round trip of queue.
And Jobs can vary over time.

In previous version, It has manager object and performance counter
object that try to assign jobs and control execution. I don't want to
use these overhead objects need to be created and destroyed. so, I
changed threadstart style.

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Neil Zanella | last post by:
Hello, I would be very interested in knowing how the following C++ multi-instance singleton (AKA Borg) design pattern based code snippet can be neatly coded in Python. While there may be...
4
by: keepyourstupidspam | last post by:
Anyone know of a reliable design for a Windows C++ Task Scheduler Class. The scheduler will expose a member function that will add schedules, its parameters will be an interval to run the tasks...
6
by: csharpula csharp | last post by:
Hello, I am building multi platform application and I would like to ask are there any links which would provide me code with factory design pattern implementaion in c# for this? Thanks! ...
2
by: Pallav singh | last post by:
Hi Kindly Provide me Link about Concurrency patterns in C++ Thanks Pallav Singh
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.