TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Peter Fitzsimmons
from: Peter Schuller
date: 1997-02-10 07:03:12
subject: Re: Multiple threads accessing the same files

>  PS> Hmmm, what's this client/servet thing? Could you 
 >  PS> explain? File locking I know

 > In this context -- the client code (which does no file i/o) would send a 
 > message to the server, like "read next message",  or
"write message". The 
 > server,  being a separate process (perhaps on a different PC) would process 
 > these messages from all clients.  Since the server is the only process that 
 > has any message files open,  it need not use any locking at all.  This is 
 > _very_ efficient across a network, when file locking is the other 
 > alternative.

This seems to be the best way to do this. But there is only ONE problem, how 
do the server send the info to the client? One way would be a pipe, but then 
I'd need a separate queue for error-mesages etc. With this C/S thing I only 
have two problems:

1) As above, how do the server send the extracted data (if any) to the client 
efficiently?

2) When a lot of data is to be processed, what do I do? Let's say a user scans 
the file-base for new files, then the entire file-base would have to be sent 
to the client. Or should I let the server take care of the searching? The only 
problem then is that other clients will have to w8, and I can't launch another 
thread, be cause then I'd have the access problem again upon other clients 
wanting to write data. One way would be to queue the search so that the server 
only "search" for 0.5 seconds at a time, and then work on other
clients, then 
resume the searching for 0.5 secs, and so on... You've got any ideas? I'm 
getting close now :-)

Thank you VERY much!

/ Peter Schuller   [TeamOS/2]   petersch{at}kuai.se


--- AdeptXBBS v1.08a26 (VC) (Registered)
* Origin: Gamma Epsilon 24h/day +46-(0)18-367781 (2:206/139)
SEEN-BY: 50/99 54/99 270/101 620/243 625/160 711/401 413 430 934 712/311 407
SEEN-BY: 712/505 506 517 623 624 704 713/317 800/1
@PATH: 206/100 205/625 270/101 712/624 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.