TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Peter Fitzsimmons
from: Jonathan de Boyne Pollard
date: 1997-02-11 22:56:20
subject: Multiple threads acca

PF>
  > 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.
PF>

Although a well-designed server would have multiple service threads in
order to service multiple clients, and so would need some internal locking
and arbitration between threads.  Of course, since all contending threads
would be in the same process, much faster locking mechanisms than
DosSetFileLocks could be used.

I did try to design a messagebase server once.  The problem is that to do
it _right_ you still end up addressing many of the same coherency problems
for the multiple service threads that you would address if you had
multiple processes all accessing the messagebase directly with a DLL API.
On top of which you also have to design and implement the client-server
protocol.

PF>
  > This is _very_ efficient across a network, when file
  > locking is the other alternative.
PF>

And _that_ is the true advantage of a messagebase server.  All messagebase
file I/O is performed by the server process alone, so you don't encounter
the problems of distributed file access and locking over a LAN (OS/2 LAN
Server and Netware are pretty good at this, admittedly, but NFS is plain
awful); and you don't have the security and administrative headache of
making the messagebase directories visible to all client workstations, and
thereby risking an errant process (or user) deleting the entire database.

  > JdeBP <
___
 X MegaMail 2.10 #0:
--- Maximus/2 3.01
* Origin: DoNoR/2,Woking UK (44-1483-725167) (2:440/4)
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: 440/4 141/209 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™.