I am positive that the books mentioned will be useful. Many people have recommended them to me over the years.

For myself, I found reading books or articles that describe the concepts to be useful, and a good head start, but I found the actual experience of determining the problems in my own implementations to be more valuable in the long run. If you have the time, try implementing both, and then optimizing each to the best of your ability. Subject your code to a peer review either here, or within another Perl community, or people who work with you. You won't lose from the experience.

If you don't have the time, I would still recommend either one of the process models, or the thread models, over switched connections. Since you are going to be using WIN32, the thread model is probably best.

It took three generations to get my current pure-perl event loop and socket management code to the level it is now. With standard Intel hardware of yesteryear (400-800Mhz, single CPU), it is able to handle 1000+ active connections in 2 seconds. These three generations represent several months of work (at least a few weeks of solid work mixed with odd complaints regarding production environment behaviour or misbehaviour). This is why I recommend against it. If you still want to pursue this path, you may cut some corners by using an existing event loop such as the one used by the Tk module.

I apologize, but I am not able to release the code I speak of at the current point in time. It is owned by my employer, and all that... I am more than happy to comment on code that you submit, though.


In reply to Re: Re: Re: Sockets: TMTOWTDI (BWWIB)? by MarkM
in thread Sockets: TMTOWTDI (BWWIB)? by Ionizor

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.