Solved

Multi thread

Posted on 2000-03-20
5
157 Views
Last Modified: 2010-05-02
I want to pass a query from client to server.how to catch a query from client
to server.from server i want to create
thread for each query.and execute each
query with some prirorties.the query will come from differnet clients.
0
Comment
Question by:lakshmirprakashr
5 Comments
 

Author Comment

by:lakshmirprakashr
ID: 2635652
please give some idea about this
0
 
LVL 6

Accepted Solution

by:
VBGuru earned 50 total points
ID: 2635767
1.How to catch a query?
To communicate between the client and the server we have different methods namely, remote automation, MTS , DCOM, sockets, mail slots etc..
You have to decide upon them foirst. It will be very easy and good if you can go for MTS based approch,

2. execute each
query with some prirorties.the query will come from differnet clients.?

Once you have got the query from the client, it is in the server's hand to decide how it will allocate the priority. For assigning the priority there are many algorithms availbale like first come first server, long job first, shorter job first, round robin, last come first, etc...
decide on which will be of help to you in your application.

If you are planning to run the quries simultaniously then you meight need to use multithreading. For example on multithreading in VB check out the following site
0
 
LVL 6

Expert Comment

by:VBGuru
ID: 2635781
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2635791
What database system are you working on, because if u use SQL Server, Oracle or similar large DBMS products, queries are already executed using multiple threads (fibers in SQL Server)
What do you want to "Optimize"?
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2686659
Threading without rocket science.

http://homepage.eircom.net/~carafa/TEMP/AWXB.zip

Explanation / order of compilation
AWXB02MSG.exe - (ActiveX.exe, one thread for all objects) Messaging application that will take care of sending messages between spawned threads and the main application.
AWXB01Thread.dll - The code that will be run in each separate thread
AWXB04Starter.exe - (ActiveX.exe, one thread per object) Application that will take care of creating each new thread.
AWXB03Test.exe - Standard exe. Main application / test bed.

Hope this helps.

0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now