tg2r@dale.acc.Virginia.EDU (Todd Greenwald) (07/01/90)
Here's a puzzler I could sure use help on. I thought, at first glance that this would be easy.... I'm developing a multiuser distributed processing application based on a client-server model. When one client alters data, the server is notified and then 'broadcasts' the change to all other registered clients. Initially, I thought that the Database Manager could handle this easily;O and indeed it can handle most of the problems. It's the broadcasting that it can't deal with. (Or that I can't make it deal with!) So I moved over to namedpipes. The server opens a new thread to maintain a namedpiped with each client that registers with the system. Using DosTransactNmPipe, it is easy for the client to notify the server of any changes, but still the nagging problem of the broadcast. 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). 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!) ?
tok@stiatl.UUCP (Terry Kane) (07/03/90)
tg2r@dale.acc.Virginia.EDU (Todd Greenwald) writes: >I'm developing a multiuser distributed processing application based >on a client-server model. When one client alters data, the server >is notified and then 'broadcasts' the change to all other registered >clients. IMHO, your problem is more basic than the mechanics of broadcasting - your problem lies in choosing to broadcast IFF you are using a high speed net e.g. >5mbps, or even 1mbps for that matter. I have worked on a product for air traffic controllers which used multipoint serial communications, but by george (btw, where was he?) I would have gone with secure point- to-point circuits if I'd had more bandwidth! I would want to know who the user is - the tower? ground control? or terminal personnel/passengers? That makes all the difference. If this were for ATC usage, I'd certainly want to see this on a dedicated hi-speed net with redundancy. But then you should also bear in mind that the FAA requires Unix as the platform for software put out to bid. If the user community was not mission critical, I certainly wouldn't worry about the single-cast comms overhead, even at low speed, and I would go with single-cast because that cuts the complexity of your work by at least an order of magnitude, and hey, like my daddy always said - if you can get 90 percent done for 10 percent work, go for it! I suppose that this is slightly out of the realm of this newsgroup, but, I felt that I'd share my experience with you. standard disclaimer -- Terry Kane gatech!stiatl!tok Sales Technologies, Inc 3399 Peachtree Rd, NE Atlanta, GA (404) 841-4000
alistair@microsoft.UUCP (Alistair BANKS) (07/03/90)
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