sockets vs. TLI ?

sockets vs. TLI ?

Post by Mario Desideri » Thu, 29 Jan 1998 04:00:00



Hello,

Could you pleaseexplain me what are the major differences, advantages
and / or disadvantages of implementing a client/server application in C
using either sockets or TLI on the Solaris environment and TCP/IP
protocol ?

Please tell me what are the points to consider when choosing one or the
other way ?


Thanks,

Mario Desiderio

 
 
 

sockets vs. TLI ?

Post by Doug Hughe » Fri, 30 Jan 1998 04:00:00



> Hello,

> Could you pleaseexplain me what are the major differences, advantages
> and / or disadvantages of implementing a client/server application in C
> using either sockets or TLI on the Solaris environment and TCP/IP
> protocol ?

> Please tell me what are the points to consider when choosing one or the
> other way ?



In short, TLI was a nice idea. Platform/protocol neutral network
connections. However, in practice, it never caught on, and just about
everything uses TCP/IP now anyway, and the TLI implementations for
other protocols never caught on.  Everything has sockets (C, Perl,
Tcl, python, etc).  Try to find something that does TLI.

Don't give it a second's thought. Go with sockets.

____________________________________________________________________________
Doug Hughes                                     Engineering Network Services
System/Net Admin                                Auburn University


 
 
 

sockets vs. TLI ?

Post by Giles Dougla » Fri, 30 Jan 1998 04:00:00



> In short, TLI was a nice idea. Platform/protocol neutral network
> connections. However, in practice, it never caught on, and just about
> everything uses TCP/IP now anyway, and the TLI implementations for
> other protocols never caught on.  Everything has sockets (C, Perl,
> Tcl, python, etc).  Try to find something that does TLI.

C, of course, supports tli...

Quote:> Don't give it a second's thought. Go with sockets.

I've worked with a number of client server applications for Sys V unixes,
including solaris, and was always told that the tli got a little extra speed
out of the process for high volume networking, since its lower to the actual
implementation (on sun anyway, because sockets are implemented on top of tli)

My opinion of the tli is its a much better model to work with, and gives you
lots of extra features. And you should also note that a lot of databases (ie
sybase and informix at least) implement tli drivers for solaris (perhaps this
is the speed issue again?)

Thanks,

    Giles

--
Giles Douglas - Senior Software Engineer - Sailfish Systems Ltd - 212 607 3016

Mandatory Sailfish Disclaimer:

Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of
Sailfish System, Ltd.

 
 
 

sockets vs. TLI ?

Post by Joerg Schilli » Fri, 30 Jan 1998 04:00:00





>> In short, TLI was a nice idea. Platform/protocol neutral network
>> connections. However, in practice, it never caught on, and just about
>> everything uses TCP/IP now anyway, and the TLI implementations for
>> other protocols never caught on.  Everything has sockets (C, Perl,
>> Tcl, python, etc).  Try to find something that does TLI.

>C, of course, supports tli...

>> Don't give it a second's thought. Go with sockets.

>I've worked with a number of client server applications for Sys V unixes,
>including solaris, and was always told that the tli got a little extra speed
>out of the process for high volume networking, since its lower to the actual
>implementation (on sun anyway, because sockets are implemented on top of tli)

Some time ago, a guy from Sun pointed out that th esocket implementation
on Solaris is faster than tli.

Joerg

--



URL:  http://www.fokus.gmd.de/usr/schilling    ftp://ftp.fokus.gmd.de/pub/unix

 
 
 

sockets vs. TLI ?

Post by Giles Dougla » Fri, 30 Jan 1998 04:00:00



> Some time ago, a guy from Sun pointed out that th esocket implementation
> on Solaris is faster than tli.

> Joerg

Does anyone have any evidence of this (in terms of speed)? I can't find a
reference on dejanews. All I discovered is that I was in fact wrong that sockets
are on top of tli (oops) - both sockets and tli are on top of streams. Apologies
for my slight misconception.

    Giles

--
Giles Douglas - Senior Software Engineer - Sailfish Systems Ltd - 212 607 3016

Mandatory Sailfish Disclaimer:

Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of
Sailfish System, Ltd.

 
 
 

sockets vs. TLI ?

Post by Giles Dougla » Fri, 30 Jan 1998 04:00:00




> > Some time ago, a guy from Sun pointed out that th esocket implementation
> > on Solaris is faster than tli.

> > Joerg

> Does anyone have any evidence of this (in terms of speed)? I can't find a
> reference on dejanews.

Actually, I can, there's a post from Stephen Rago that says "There are faster
protocol implementations available for sockets", before thousands of people point
this out to me :)

Is it a major difference under solaris? I guess the reason the network layer in the
product I'm working at the moment is tli is because the person who wrote it grew up
with Sys V too, but I really don't see any advantage into turning into sockets. The
only advantage I can see with it is I could call writev to write a vector instead
of calling t_snd with flags set to T_MORE.

TLI does, of course, have the ability to close a socket for writing, but still read
from it, which one can't do in sockets (can you? - well other than the linger
option on the socket that is)

    Giles
-
Giles Douglas - Senior Software Engineer - Sailfish Systems Ltd - 212 607 3016

Mandatory Sailfish Disclaimer:

Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of
Sailfish System, Ltd.

 
 
 

sockets vs. TLI ?

Post by Barry Margoli » Fri, 30 Jan 1998 04:00:00




Quote:>TLI does, of course, have the ability to close a socket for writing, but
>still read
>from it, which one can't do in sockets (can you? - well other than the linger
>option on the socket that is)

See shutdown(2).

--

GTE Internetworking, Powered by BBN, Cambridge, MA
Support the anti-spam movement; see <http://www.cauce.org/>
Please don't send technical questions directly to me, post them to newsgroups.

 
 
 

sockets vs. TLI ?

Post by Andrew Gabri » Fri, 30 Jan 1998 04:00:00




Quote:

>I've worked with a number of client server applications for Sys V unixes,
>including solaris, and was always told that the tli got a little extra speed
>out of the process for high volume networking, since its lower to the actual
>implementation (on sun anyway, because sockets are implemented on top of tli)

This is wrong for Solaris. Sockets and TLI were both implemented
on the same underlying streams; sockets on Solaris didn't
run over TLI. In my performance measurements, sockets
actually won too (but that's highly dependent on the code
doing the testing - I could do more performance tweeking
with sockets than I could with TLI).

In current Solaris releases, sockets are now back as system
calls (and I presume this improves performance even further,
but I've not actually measured again since this happened).

In the application I work on, we can build either TLI or
socket based comms. I don't think any of the 20 or so unixs
we support are actually built with the TLI varient any more.
For various reasons (performance and bugs mainly), they've
all reverted to sockets now.

--
Andrew Gabriel
Consultant Software Engineer

 
 
 

sockets vs. TLI ?

Post by Boris Goldber » Fri, 30 Jan 1998 04:00:00





> > > Some time ago, a guy from Sun pointed out that th esocket implementation
> > > on Solaris is faster than tli.

> > > Joerg

> > Does anyone have any evidence of this (in terms of speed)? I can't find a
> > reference on dejanews.

> Actually, I can, there's a post from Stephen Rago that says "There are faster
> protocol implementations available for sockets", before thousands of people point
> this out to me :)

> Is it a major difference under solaris? I guess the reason the network layer in the
> product I'm working at the moment is tli is because the person who wrote it grew up
> with Sys V too, but I really don't see any advantage into turning into sockets. The
> only advantage I can see with it is I could call writev to write a vector instead
> of calling t_snd with flags set to T_MORE.

> TLI does, of course, have the ability to close a socket for writing, but still read
> from it, which one can't do in sockets (can you? - well other than the linger
> option on the socket that is)

Yes you can do it in sockets: shutdown()
 
 
 

sockets vs. TLI ?

Post by W. Richard Steve » Sat, 31 Jan 1998 04:00:00


Quote:> I've worked with a number of client server applications for Sys V unixes,
> including solaris, and was always told that the tli got a little extra speed
> out of the process for high volume networking, since its lower to the actual
> implementation (on sun anyway, because sockets are implemented on top of tli)

No, no, no.  Vanilla SVR4 sockets are implemented on top of TPI (the
Transport Provider Interface) just as TLI is.  TPI and TLI are not the
same beasts.  Take a look at Section 33.6 of "Unix Network Programming,
Volume 1" for some examples of coding directly to TPI/streams.  "sockmod"
converts socket calls into TPI calls, just as "timod" converts TLI calls
into TPI calls.

I say "vanilla" because with Solaris 2.6 Sun actually put all the socket
calls into the kernel.

Quote:> My opinion of the tli is its a much better model to work with, and gives you
> lots of extra features.

"Features"?  I think you mean "unnecessary complexity" :-)  And in terms of
a "better model" just compare sockets and TLI with regard to (1) accepting
new connections, (2) getting and setting options, (3) handling the closing
of a connection.  Sorry, but if I can do something with, say 30 lines of
code using sockets, but it takes, say 100 lines of code with TLI, that does
not equate to a better model.

        Rich Stevens

 
 
 

sockets vs. TLI ?

Post by Joerg Schilli » Sat, 31 Jan 1998 04:00:00




Quote:

>> My opinion of the tli is its a much better model to work with, and gives you
>> lots of extra features.

>"Features"?  I think you mean "unnecessary complexity" :-)  And in terms of
>a "better model" just compare sockets and TLI with regard to (1) accepting
>new connections, (2) getting and setting options, (3) handling the closing
>of a connection.  Sorry, but if I can do something with, say 30 lines of
>code using sockets, but it takes, say 100 lines of code with TLI, that does
>not equate to a better model.

I prefer the socket programming model too, but there is a feature you cannot
have with sockets:

        TLI allows you to receive "call user data" without accepting
        a connection. You need this to handle ISDN calls in some cases.

Joerg

--



URL:  http://www.fokus.gmd.de/usr/schilling    ftp://ftp.fokus.gmd.de/pub/unix

 
 
 

sockets vs. TLI ?

Post by Rick Jon » Sat, 31 Jan 1998 04:00:00


: > Some time ago, a guy from Sun pointed out that th esocket
: > implementation on Solaris is faster than tli.

My understanding is that perhaps the best way to describe the relative
speeds of sockets and TLI on Solaris is "fluid" or "changes depending
on release."

: Does anyone have any evidence of this (in terms of speed)? I can't
: find a reference on dejanews. All I discovered is that I was in fact
: wrong that sockets are on top of tli (oops) - both sockets and tli
: are on top of streams. Apologies for my slight misconception.

Netperf has tests available using both sockets and XTI interfaces, so
if someone wanted, they could measure a TCP_STREAM test and an
XTI_TCP_STREAM test and also compare a TCP_RR test to an XTI_TCP_RR
test.

rick jones
--
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to email, or post, but please do not do both...

 
 
 

sockets vs. TLI ?

Post by W. Richard Steve » Sat, 31 Jan 1998 04:00:00


Quote:> I prefer the socket programming model too, but there is a feature you cannot
> have with sockets:

>    TLI allows you to receive "call user data" without accepting
>    a connection. You need this to handle ISDN calls in some cases.

Sockets provides this too, iff the transport layer supports this.  4.4BSD,
for example, supports this with the OSI protocols, but not with TCP.  This
went into sockets in 1990 (4.3BSD Reno) when the OSI code went in.

        Rich Stevens

 
 
 

sockets vs. TLI ?

Post by Doug Hugh » Sat, 31 Jan 1998 04:00:00




> TLI does, of course, have the ability to close a socket for writing, but still read
> from it, which one can't do in sockets (can you? - well other than the linger
> option on the socket that is)

Sure, see the shutdown(3n) system call.

--
____________________________________________________________________________
Doug Hughes                                     Engineering Network Services
System/Net Admin                                Auburn University

 
 
 

sockets vs. TLI ?

Post by Casper H.S. Dik - Network Security Engine » Sun, 01 Feb 1998 04:00:00


[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]



>> Some time ago, a guy from Sun pointed out that th esocket implementation
>> on Solaris is faster than tli.

>> Joerg
>Does anyone have any evidence of this (in terms of speed)? I can't find a
>reference on dejanews. All I discovered is that I was in fact wrong that sockets
>are on top of tli (oops) - both sockets and tli are on top of streams. Apologies
>for my slight misconception.

Well, the msiconception is taht "sockets are on top of TLI".  That is
not true.

In 2.5.1 and before, sockets are implemented in sockmod and TLI in timod.
You have one or the other.

But I believe the socket side of things was actually better optimized,
using synchronous STREAMs.

In 2.6, this changed even more with sockets being system calls directly
(though on top of STREAMs).  This makes the system calls faster but
doesn't necessary adds read/write perf.

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

1. RPC vs Sockets vs TLI

I am starting some major development work that will entail several
client/server relationships.

I have been told that sockets are falling out of favor in this area.
Given that we will be initially working on Sun SPARCStations, and hopefully
moving to System Vr4 before too long, the question becomes: what should
we use in place of sockets?  I have one group of people telling me that
TLI is the only way to go, but RPC seems a cleaner interface to me.  Is
RPC a sun-ism that will soon pass away?  Is TLI more "blessed" by
standards organisations (ISO, X/Open, etc)?

Any input is appreciated.  Thanks!

        tim

--

(908) 699-2487

2. madhatter, cheap linux PCs from Sun

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

4. Reverse DNS lookup in Webalizer

5. sockets vs TLI in solaris 2.5

6. Xvfb and GLX extension.

7. QUESTION: BSD sockets vs. TLI

8. dbx question

9. Sockets vs TLI

10. Sockets vs. TLI: peer addresses and datagrams

11. sockets vs. TLI

12. Sockets vs. TLI (Summary)

13. DLPI Vs BSD Sockets Vs Sys V TLI