Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 (Tek) 9/28/84 based on 9/17/84; site hammer.UUCP Path: utzoo!linus!decvax!tektronix!orca!hammer!steveg From: steveg@hammer.UUCP (Steve Glaser) Newsgroups: net.unix-wizards,net.lan Subject: Re: STREAMS query Message-ID: <1542@hammer.UUCP> Date: Mon, 7-Oct-85 06:06:22 EDT Article-I.D.: hammer.1542 Posted: Mon Oct 7 06:06:22 1985 Date-Received: Wed, 9-Oct-85 05:24:28 EDT References: <471@enmasse.UUCP> <1699@brl-tgr.ARPA> <449@cheviot.uucp> Reply-To: steveg@hammer.UUCP (Steve Glaser) Distribution: net Organization: Tektronix, Wilsonville OR Lines: 58 Keywords: connection oriented, connectionless messages Xref: linus net.unix-wizards:12300 net.lan:915 Summary: In article <449@cheviot.uucp> santosh@cheviot.UUCP (Santosh Shrivastava) writes: > >Streams imply connections! There are many applications that can be >adeqately handeled by connectionless datagrams. I reckon there will always >be a need for interfaces supporting both streams and datagrams, and >in this respect Berkeley sockets are superior. Streams are good mainly >for terminal handling (as in V8) but to base your entire networking >on them is surely a bad idea. Wrong... Streams do imply a connection, but the key is "What is the connection to?" In the case of datagram services, the connection is to a "datagram transport layer". As long as you send the address to send along with the data, things work just like sockets do. Sockets are very much like streams. The main advantages of streams over sockets are: 1. the same interface *everywhere* between stream processing modules (4.2 sockets have 3 different internal interfaces, (a) between a driver and a "ip" layer (b) between a protocol and the socket layer and (c) between protocol layers). 2. better internal buffering primitives 3. defined rules on how processing modules interact, in particular the rules describe what you can do in a processing module and seem to allow easier migration of functionality into front end processors. 4. integration with the terminal subsystem (at least in V8). 5. less wired in knowledge of TCP/IP - potential to support other protocols easier (yeah I know that 4.2 tried to solve this problem, but they got a few things wrong here) Advantages the other way include: 1. sockets that are embedded in the file system name space (but you can't just open(2) them though). 2. the ability to pass file descriptors through unix domain sockets (this *may* make it into AT&T). 3. they exist, they work, people are using them. Summary: streams are better architecturally, but they don't exist (at least in a form that mortals can get hold of) sockets are available, and do much of what is needed, but lack elegance. Steve Glaser Tektronix Inc (at least for another week)