Have you considering using POE for your TCP server solution? I don't know exactly what it is you are doing, but I am guessing it is some sort of worker thread model. In this case, it is trivial to write a POE-based TCP server to handle quite a few connections "concurrently" depending whether you have long running subs or not. Using a single interpreter will dramatically decrease your memory footprint.
I can't get you a link at the moment (since draconian filters at work block just about everything), but if you go to
the POE wiki and search for evolution of a TCP server, you will find a nice broken down example of going from a simple select based loop all the way to a just a few simple lines of perl using POE::Component::TCP::Server.
If you are concerned with performance you should know that I have written a webserver serving dynamic pages pulling information from a database all using pre-built POE components, and was managing about 45-50 requests a second with streaming connections as well on a silly little Duron 800Mhz with 256MB of RAM. POE is quite efficient.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.