Re: Perl as bloatware
by lhoward (Vicar) on Oct 09, 2000 at 18:44 UTC
|
I agree with you. IO::Socket::INET is a base part of the
perl distribution, yet none of the core
Net:: modules or LWP use it. Why not? Does this point
to a problem with the IO::Socket modules? Or do the
big-name perl module writers not trust each other?
Also, I must disagee with merlyn (but just
a little). IMHO, HTTP is a
minimally session
oriented protocol. The sessions are just very short and
thrown
away quickly. To quote a Network Management Philosopher
I once knew : "HTTP is the most connectionless protocol
to use a connection-oriented transport that
I've ever seen"
| [reply] |
|
|
Well, that's usually because there's a certain vocal member of the Perl community who kept yelling about how "inefficient" the IO::Socket library was,
and so anyone that wants to talk to a socket tends to handwrite the first 10%
of object-oriented library and live with their own code.
Actually, that's amusing, since Graham Barr wrote both IO::Socket
and Net::FTP. The fact that he didn't use his own module should
tell you something.
Ease of use does not translate to performance, necessarily.
-- Randal L. Schwartz, Perl hacker
| [reply] |
(Guildenstern) RE: Perl as bloatware
by Guildenstern (Deacon) on Oct 09, 2000 at 18:29 UTC
|
I don't really know exactly what you're driving at here, except maybe that NET::FTP and LWP both allow you to make FTP requests, but not with the same underlying code. It seems pretty obvious to me. When you're using LWP, your FTP request is usually made through a HTTP::Request which fits the design for how to use the module consistently across several services.
As far as a "command TCP/IP" library, I must confess to not having any idea what you're talking about. Do you want a library where we can $tcpPacket->setSYNFlag();, or are you talking something a little more high level?
Guildenstern Negaterd character class uber alles! | [reply] [d/l] |
|
|
| [reply] |
Re: Perl as bloatware
by merlyn (Sage) on Oct 09, 2000 at 18:25 UTC
|
There's very little in common between FTP (which is a session-based protocol)
and HTTP (which is a sessionless protocol). I doubt you would have had
more than five or ten common lines of code.
-- Randal L. Schwartz, Perl hacker | [reply] |
Re: Perl as bloatware
by AgentM (Curate) on Oct 09, 2000 at 19:19 UTC
|
I always imagined IO::Socket as a wrapper object around the standard Socket API (maybe with some extra goodies not provided in C like handling those data length args which the perl socket Api does too) but this is just like wrapping your opens using a filehandle class which I can imagine is just as unoptimal (is that a word?). Its just a trick for ease of use and keeping your connections (or opens apart). So it's probably designed for cases where one is keeping track of lots' o conns (or opens). Thus it is not optimal for a new wrapper class where all you need is to send a quick message and retrieve a response. (A wrapper in a wrapper. In a way, all modules can be thought of wrappers.) So that means that the IO::Socket would be a bad choice in this lib.
Also, I'm glad that the perl libs (especially at CPAN) are not liberally linked to each other since when I download one, I'd like to run out-of-the-box (this is the Windows complex), so a bunch of libraries linked to each other would severely complicate the process.
| [reply] |
| A reply falls below the community's threshold of quality. You may see it by logging in. |