>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.