in reply to Help with string concat and sockets

I usually get scared when I see people inventing a new TCP protocol. There are far too many things to worry about to do this right. If you need a simple RPC structure, just use HTTP as your protocol. Create your server with HTTP::Daemon, and your client then uses LWP::Simple or other parts of the LWP to handle the requests. The neat thing about this is a huge amount of code already provided, and when you need to slide to higher performance or proxying, you can use standard tools.

Do not invent a protocol. Just say no.

-- Randal L. Schwartz, Perl hacker

  • Comment on RE: Help with string concat and sockets

Replies are listed 'Best First'.
RE: RE: Help with string concat and sockets
by neshura (Chaplain) on May 17, 2000 at 03:20 UTC
    Hmmm. "Don't reinvent the wheel!"
    Seems apropos, in the interests of saving time and anguish. But what if a person really wants to figure out how to make a wheel (or even a full-fledged oxcart) using nothing but a tree, a rock, a cow, and a knife?
    Maybe one can't truly "know" The Way of The Oxcart until one has built an oxcart from scratch.

    On the other hand, I can see where pestering a race car mechanic with questions about oxcart construction might draw ire.

    e-mail neshura

Reinventing
by The Alien (Sexton) on May 17, 2000 at 09:58 UTC

    Once upon a time, I had to write a suite of test programs for NNTP, HTTP, POP3, SMTP and FTP servers. I used perl because it was preferable to shell scripting, which was the way used prior to that (it only did simple SMTP and NNTP posting operations).

    The problem? The only system that could run these tests was a very unflexibly administered Solaris box with a very stripped install of Perl. Adding modules was strictly verboten, even in my home directory.

    I didn't even have IO::Socket to draw on. I reinvented four wheels, one axle, the concept of glass and I think power steering, but it got the job done and produced some very nice results. You never know when you're going to have to produce results without even 'standard' modules.

    And no, I never figured out why some modules were missing. They had been present once, the docs were still there, but even an extended probe with the find command didn't turn them up.

    5-21-2000 : Fixed the typo in 'steering'