Sockets vs. Transport Layer Interface

Sockets vs. Transport Layer Interface

Post by Wade Guthr » Wed, 08 Jul 1992 02:17:19



Okay, so I've been given this job to write something using sockets.  I start
into the documentation (Sun) and the first thing it says is (paraphrased):
"Don`t do that, you idiot -- use TLI".  Well, now I went back to my management
with the information that Sun says we shouldn't use Sockets.  The reply (a really
good one, I must admit): "Why?".

Well, I checked all the documentation I could round up and didn't find any
comparative info.  Why would one use Sockets (or TLI) versus the other?  Which
one provides more bandwidth?  Which is more reliable?  Which is easier to
program?

Thanks.

Wade Guthrie

 
 
 

Sockets vs. Transport Layer Interface

Post by Barry Margol » Wed, 08 Jul 1992 06:48:41



>Okay, so I've been given this job to write something using sockets.  I start
>into the documentation (Sun) and the first thing it says is (paraphrased):
>"Don`t do that, you idiot -- use TLI".  Well, now I went back to my management
>with the information that Sun says we shouldn't use Sockets.  The reply (a really
>good one, I must admit): "Why?".
>Well, I checked all the documentation I could round up and didn't find any
>comparative info.  Why would one use Sockets (or TLI) versus the other?  Which
>one provides more bandwidth?  Which is more reliable?  Which is easier to
>program?

According to other people at Sun, the recommendation to use TLI rather than
sockets was put in the manuals by mistake.  There is no such official
recommendation.

However, if there were, the reason would probably have been that sockets
was considered to be an obsolete interface, which Sun wasn't planning on
making major improvements to in the future, while TLI is the newer, more
standard interface.  I don't think the choice between them would have
anything to do with the technical merits of the particular interface,
merely which one would get more attention by the development organization
in the future.

I'm not saying that Sun has or hasn't got such plans regarding where their
development resources will go; only that *if* they had such an official
recommendation, this would be why.

The actual performance and reliability should be pretty similar, since
sockets and TLI are both just programming interfaces to the same underlying
networking code.  In SunOS 4.x sockets should be slightly more efficient
than TLI, since the kernel implements those operations directly, while TLI
is a library layered on top of these system calls.  In SunOS 5.0, though, I
believe they will both be libraries layered on top of a completely new
network interface in the kernel.

--
Barry Margolin
System Manager, Thinking Machines Corp.



 
 
 

Sockets vs. Transport Layer Interface

Post by Wade Guthr » Wed, 08 Jul 1992 08:27:02


Oh, by the way, (for intra-system communication) are named pipes slower or
faster than TLI/Sockets?

Thanks (sorry for the dual post).

Wade

 
 
 

Sockets vs. Transport Layer Interface

Post by Barry Margol » Wed, 08 Jul 1992 17:22:36



>Oh, by the way, (for intra-system communication) are named pipes slower or
>faster than TLI/Sockets?

On BSD systems, named pipes and Unix domain sockets use the same internal
implementation.
--
Barry Margolin
System Manager, Thinking Machines Corp.


 
 
 

Sockets vs. Transport Layer Interface

Post by ha/home/harry/N.. » Wed, 08 Jul 1992 23:43:20



>Well, I checked all the documentation I could round up and didn't find any
>comparative info.  Why would one use Sockets (or TLI) versus the other?  Which
>one provides more bandwidth?  Which is more reliable?  Which is easier to
>program?

The TLI is today considered the "standard" interface for networking.

The major advantage it holds over sockets is protocol independence.
Sockets are very much bound up with TCP/IP.

I have used TLI to interface to TCP/IP, Lan Manager/X and AT&T StarGroup,
the only code changes I had to make were to deal with orderly disconnection
on TCP/IP (about three lines of code).

As regards reliability, I don't think there is much difference.
Most recent commercial implementations of both are based on the Streams
concept introduced in SVR3 and standardised in SVR4.

I would say that the TLI is a little easier to use, but I am sure long
term sockets users would disagree.

--harry


Workhorse Systems Ltd.
142 Terenure Road North
Dublin 6W
IRELAND

 
 
 

Sockets vs. Transport Layer Interface

Post by Barry Margol » Thu, 09 Jul 1992 01:57:23



>The major advantage it holds over sockets is protocol independence.
>Sockets are very much bound up with TCP/IP.

Sockets were designed to be protocol independent, just as TLI was.  In
addition to TCP/IP (AF_INET) the 4.3BSD implementation supports Unix
(AF_UNIX) and XNS (AF_NS) domains, and also raw sockets.  4.4BSD adds OSI
support.  Some operations only make sense with particular domains, but
that's a consequence of the differences between the protocols, not the API.

The easiest way to compare sockets and TLI is to get "Unix Network
Programming" by Stevens, and compare chapters 6 and 7.  In particular,
compare figure 6.2 with 7.1, and figure 6.3 with 7.2, and you'll see that
the general structure of sockets and TLI are similar.  Also, in the TLI
function descriptions in section 7.4, there are notes showing how the TLI
features compare to the corresponding sockets features.

Now, it *is* true that the sockets interface was prompted by the design and
implementation of TCP/IP (in NCP, the predecessor protocol to TCP/IP,
"socket" was the term for what TCP and UDP call "ports").  However, TLI was
just as much influenced by OSI.
--
Barry Margolin
System Manager, Thinking Machines Corp.


 
 
 

Sockets vs. Transport Layer Interface

Post by John Templ » Thu, 09 Jul 1992 07:47:51



>In SunOS 4.x sockets should be slightly more efficient
>than TLI, since the kernel implements those operations directly, while TLI
>is a library layered on top of these system calls.

While in System V, sockets are a library layered on top of TLI.
--

 
 
 

Sockets vs. Transport Layer Interface

Post by W. Richard Steve » Fri, 10 Jul 1992 02:06:24


Quote:>While in System V, sockets are a library layered on top of TLI.

I think you mean sockets are implemented on top of streams, just as TLI is,
and both require a custom streams module (sockmod and timod) to work.  There
was an excellent paper in a Usenix proceedings at least 2 years ago that
detailed the implementation of sockets under SVR4.

It's funny, in the POSIX 1003.12 draft they claim that a survey they took
showed equal usage of sockets and TLI, hence they're supporting both.
Yet in survey after survey (informal) that I take when I teach network
programming classes, I continually find 95% of the people use sockets,
5% use TLI, and half of the 5% are AT&T employees who don't have a choice.


 
 
 

Sockets vs. Transport Layer Interface

Post by Orville R. Weyri » Sat, 11 Jul 1992 22:20:39



>Okay, so I've been given this job to write something using sockets.  I start
>into the documentation (Sun) and the first thing it says is (paraphrased):
>"Don`t do that, you idiot -- use TLI".  Well, now I went back to my management
>with the information that Sun says we shouldn't use Sockets.  The reply (a really
>good one, I must admit): "Why?".

>Well, I checked all the documentation I could round up and didn't find any
>comparative info.  Why would one use Sockets (or TLI) versus the other?  Which
>one provides more bandwidth?  Which is more reliable?  Which is easier to
>program?

All good questions. Add a few more:

        Which is more portable?
        Which is going to be supported in future releases?
        Which faces towards Sys V and which faces towards BSD when it prays?
                :-)

orville

--------------------------------------       **********************************
Orville R. Weyrich, Jr.                          Weyrich Computer Consulting
Certified Data Processor                       POB 5782, Scottsdale, AZ 85261
Certified Systems Professional                      Voice: (602) 391-0821

--------------------------------------       **********************************

 
 
 

1. Sockets vs TLI - use a common transport-layer interface?

        I need to develop a kernel module that intercepts
networking-functions independently of the API used.
        I know that Linux has no TLI, just the socket API. However I still
want to built a module that is not dependent of the "user API" but
only of the "kernel API"...

        What is the common transport-layer interface? Both connect
(sockets) and t_connect (TLI) have to use some common kernel TCP
interface (something like tcp_connect). What are the include files
(and source code files) of that common transport-layer interface (to
TCP and UDP)? Where can I find some specific documentation about that
interface?

        What is most likely to be changed in future kernels - the socket
API or the transport-layer API? (for example, connec() or
tcp_connect() - which one has the higher probability of being changed
or removed or renamed?)

        Thanks in advance,
                                                Rui Antunes


2. forked

3. Transport Layer Interface and Streams Interface

4. using lp as a vehicle for file transfer

5. Transport Layer Interface (TLI)

6. Does XFree 3.2 support Mach64 V264VT?

7. TLI (Transport Layer Interface) for Linux

8. US-WA-Seattle-Network Security Specialist

9. Transport Layer Interface library

10. Transport Layer Interface (TLI) Library source

11. Transport Layer Interface (TLI) programming in UNIX System V

12. TLI (Transport Layer Interface) for Linux

13. Transport Layer Interface / STREAMS broadcast