home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!munnari.oz.au!bruce.cs.monash.edu.au!merlin!iwsd01.itwol.bhp.com.au!wewila
- From: wewila@iwsd01.itwol.bhp.com.au (Alan Wilkie)
- Newsgroups: vmsnet.networks.tcp-ip.ucx
- Subject: Multithreading and subprocesses in UCX
- Message-ID: <1993Jan5.081451.30@iwsd01.itwol.bhp.com.au>
- Date: 5 Jan 93 08:14:51 +1000
- References: <1992Dec24.100456.1@hfrd.dsto.gov.au>
- Organization: BHP Information Technology
- Lines: 45
-
- In article <1992Dec24.100456.1@hfrd.dsto.gov.au>, daniel@hfrd.dsto.gov.au writes:
- > Using UCX2.0 under VMS5.5-2.
- >
- > When writing TCP/IP servers, is there an elegant method of having VMS sub/det
- > processes handle multiple server connections, a'la U**x fork/exec.
- >
- > Is multi-threading the server (QIOs and ASTs) the only method? In which case
- > how are Telnet (etc.) connections, that create network processes under a
- > different UIC, handled?
- >
- > Questions, questions, and so little documentation. The usual apolgies (FAQ,
- > etc.) With thanks in advance. Mark Daniel.
-
- I may be overlooking something in your question here, but it should be fairly
- easy to create a sub/det process to handle a connection. UCX creates a device
- socket to listen on the designated port, and when you actually want to accept
- a connection, it creates another device socket for each connection (hence
- allowing multithreaded servers because you can have a QIO outstanding on
- each device with an AST to handle completion).
-
- There are a couple of options then for handling a connection. If you have
- a standalone process listening for the incoming connection, you just accept
- the connection and spawn/create another process passing the device UCX gives
- you as the input/output channel for the process. I think this is how the
- REXEC/TELNET/etc type servers do it.
-
- Alternatively, you can let UCX handle the connection initiation for you.
- If you create a service (UCX command "CREATE SERVCE xxxxx") you can specify
- a (.COM) file to execute to accept the connection. When the service is
- enabled, UCX starts listening to the specified port and starts a new process
- for each incoming connection. The process executes the .COM file to run the
- appropriate server software. There is also a logical called SYS$NET defined
- which is set to the name of the device UCX has created for the connection,
- so you then access/read/write/deaccess that device. This is all fairly
- similar to transparent DECnet.
-
- Hope this has helped,
- --
- -------------------------------------------------------------------/\/\---
- Alan Wilkie, Analyst/Programmer, Process & Engineering Section / / /\
- BHP Information Technology, Wollongong Australia / / / \
- Mail : P.O. Box 261, Warrawong 2502 / / / /\ \
- Telephone : +61 42 755667 Fax: +61 42 755215 \ \/ / / /
- Internet : wewila@iwsd01.itwol.bhp.com.au \ / / /
- ------------------------------------------------------------------\/\/\/--
-