From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,2b4952f7ce02a8ec,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-09-12 06:27:01 PST Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!MathWorks.Com!news.duke.edu!news-feed-1.peachnet.edu!dekalb.dc.peachnet.edu!dekalb.dc.peachnet.edu!not-for-mail From: douglas@dekalb.DC.PeachNet.EDU (Douglas Jones) Newsgroups: comp.unix.osf.osf1 Subject: remote connections to on daemon running Date: 12 Sep 1994 09:20:58 -0400 Organization: DeKalb College, Clarkston GA Distribution: world Message-ID: <351kjq$ek1@dekalb.DC.PeachNet.EDU> NNTP-Posting-Host: dekalb.dc.peachnet.edu Hi net people, First, let me try to explain what I'm trying to do: I want to have a daemon running on the alpha (osf1.3a) that is responsible for updating a data base based off of connections from remote nodes. The remote nodes (which are pcs) would have a program that would connect to the alpha and transfer some information back and forth depending on user input from each of the pcs. Eventually, the alpha would update a data base it has based of the interaction with the pc nodes and users. The pc nodes will act on their end depending on results from the alpha side. Now, I'm not sure where to proceede; esp. with the alpha side. I could have it running from inetd and a program forked off for each connection from the pc side. This would mean that I have to have a way of updating the data base in a secure manner. What bothers me with this is that I plan on doing the following with the connections from the pc: 1) pc contacts alpha with a key the user inputed 2) if the key is not ok, the alpha tells the pc and the pc then ask the user for the key again (a loop here) 3) if the is ok, the alpha a) reserves a spot in a table for the pc (a temporary lock on the spot) and b) the alpha give the pc some more info that the pc uses to ask the user. 4) the pc then send the alpha a) the user is not interested and the alpha frees up the spot (unlocks it) or 2) the pc tells the alpha which option they picked from the information that the alpha sent the pc and the alpha updates the data base (table also) saying that that spot is in use. So, I've basically have a bi-directional connection between the alpha and each pc. With the inetd method, I would basically be forking a new copy of the alpha program each time. It could use shared memory or some method, but that would lock up some memory in the system. So would a program that just sat there all of the time and listen to a port. The inetd method is something I think I could do, but I'm not to secure (knowledgeable) on the bidirectionaly part. Having a program that just sits there and deals with multiple connections at one time I'm not very knowldgeable on either. It would also have to deal with the bidirectional part. So, does anyone have any suggestions about which method is better and any good sample programs for both of these methods. Also, are there other ways one think might be good (with code examples maybe)? Hope I adequatly expalined what I'm trying to do. Thanks for any help, Cheers, Douglas