g++ multi threaded advice.

D

Dave

Hi.

I am new to theads and I wanted some advice on my client/server
program on Linux.

I want to create a CD database with this functionality.

1. Multiple client requests for the same CD don't require a trip to
the database for the same CD. ie 3 requests for "ZZ Tops" = 1 DB read.
By storing it in memory.

2. A process that changes the price for the "ZZ Tops" cd notifies the
client requests that the data has changed and another DB read is
required.

So I thought of this.
A multi-thread app with 2 public variables 1 called Request_Status
(either OK or DB Read required) the other called CD id Number. So both
process 1 and process 2 can communicate with each other.

Sound ok?

Thanks
 
J

Jack Klein

Hi.

I am new to theads and I wanted some advice on my client/server
program on Linux.

I want to create a CD database with this functionality.

1. Multiple client requests for the same CD don't require a trip to
the database for the same CD. ie 3 requests for "ZZ Tops" = 1 DB read.
By storing it in memory.

2. A process that changes the price for the "ZZ Tops" cd notifies the
client requests that the data has changed and another DB read is
required.

So I thought of this.
A multi-thread app with 2 public variables 1 called Request_Status
(either OK or DB Read required) the other called CD id Number. So both
process 1 and process 2 can communicate with each other.

Sound ok?

Thanks

The topic of this newsgroup is the standard C++ language, which does
not define or support any sort of threads. You want to ask this in
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top