🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2
Article #695

Re: Distributed Processing/Broadcasting

#695
From: Alistair BANKS
Date: Mon, 02 Jul 1990 21:44
77 lines
3423 bytes
Although you are using IBM Lan Server, the details below about Microsoft
Lan Manager, which is the basis of IBM Lan Server, should also apply.

|A few experiments left me with the conclusion that DosTransactNmPipe
|can run from client to server and not vica versa.  (If it could I'd 
|be set).


Your are right if you are using DOS clients. In the case of an OS/2
client running OS/2 1.2 or above with the LAN Manager workstation s/w,
then you can issue a TNP from either the client or the server.


The core idea behind TNP is that the client requests the server to do
something for him (like you would do in RPC), then the server sends the
answer back and the transaction is closed.

In the case of your application I would recommend you not to use TNP
to do broadcasts, but use the technique outlined below:-

I think you should:

    - Establish a permanent Named pipe connection between the clients and
      the server. To do this you must use

      Server                                            Client

      Create a pipe (DosMakeNmPipe)
      Wait for a connection (DosConnectNmPipe)          DosOpen
      DosRead/write                                     DosWrite/read

      ...                                               ...

      Close the pipe                                    Close the pipe


      Once this mechanism is in place you can have clients and servers
      talk back and forth using simple calls (DosWrite/Read) and don't
      have to worry about the connection.

      You probably want to create several instances of the same Named-pipe
      so that you can broadcast easely by writting to all the handles in a
      loop.

      Lastly, you may want to attach semaphores to the pipes to synchronize
      the all process but this is not necessary in your case, only if you
      want to use the pipe for something else than just broadcasting.

      Don't worry about having a connection established and remained up
      for a while: LAN Manager (or LAN Server) would drop automatically
      any connection that is not used for a while and reconnect
      transparantly when necessary.


We've just published a very good book that can help you 
understand Named-Pipes: it is published by MS-Press and is 
called "LAN Manager programer's guide" by Ralph Ryan.

|
|I've thought about mailslots, but initial investigation has left me
|with the impressions that 1) second-class delivery is not secure enough
|for my needs and 2) remote broadcasting, though supported for messaging,
|is not supported for mailslots. (I'm using IBM EE 1.2 and Lan Server 1.2)
|
|In short, I'm trying to mimic the logic of an airplane tracking system.
|All monitors are notified, in real time, of any 'flights' arriving or
|departing.
|
|C
|Any thoughts on this puzzlaar (for those caar talk fans!) ?
| 
|

Alistair Banks
OS/2 Group
Microsoft
Technical Details
Message-ID: <55600@microsoft.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!microsoft!alistair
References: <1990Jul1.023719.29550@murdoch.acc.Virginia.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!microsoft!alistair
From: alistair@microsoft.UUCP (Alistair BANKS)
Newsgroups: comp.os.os2
Subject: Re: Distributed Processing/Broadcasting
Message-ID: <55600@microsoft.UUCP>
Date: 2 Jul 90 21:44:27 GMT
References: <1990Jul1.023719.29550@murdoch.acc.Virginia.EDU>
Reply-To: alistair@microsoft.UUCP (Alistair BANKS)
Distribution: usa
Organization: Microsoft Corp., Redmond WA
Lines: 77