Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Network Programming with Perl, by Stein - still relevant?

Network Programming with Perl by Lincoln Stein is, IMO, a fantastic book, but the most recent edition (the only edition, in fact) is copyright 2001 and is contemporary with Perl 5.6.

I'm particularly interested in using IO::Socket and creating robust fork'ing (and sometimes exec'ing) servers. I'm using Perl 5.14.

Does anyone with knowledge of the book, or with knowledge of Perl history, know what advances in Perl or CPAN have occurred since then that might make certain topics in this book obsolete or less optimal?

like image 611
Chap Avatar asked Dec 26 '12 17:12

Chap


1 Answers

I haven't read the entire book, just took a peek at it some years ago (2 or 3). Yes, it is excellent in regards of non-abstracted network access. Then, we have the C10K problem. It spawned a bit different paradigm, that of asynchronous multiplexed I/O resources managed by single (or few) CPU cores. So you can create very robust network servers using AnyEvent and/or Coro (see this quick intro). Many servers are hybrid, actually: they multiplex external listeners and route calls to preforked servers (see, Plack::Loader::Shotgun and Mojolicious' hypnotoad).

P.S. - note that I am oversimplifying on purpose; unfortunately, I know no comprehensive guide to asynchronous Perl.

like image 172
creaktive Avatar answered Oct 22 '22 03:10

creaktive