Continuing my quest to get a nice object-oriented interface to search domains. Thanks very much to everyone who replied to my question about interesting error messages - I tried to thank you on the original thread but the server timed out. Anyway, I decided to go for "return 1 for success, 0 for failure plus set an object property {error} if there's an error message". But now something else is making me rethink.

Some people want to search for 100 domains at a time. Now doing this normally requires waiting, serially, for 100 responses from WHOIS servers around the world. Obviously this can take forever, and meanwhile the server times out or whatever. So the actual call to WHOIS is a good candidate for multiprocessing:

for (@domains) { if (fork()) {...}}

Now I am new to this, as to OO, and I don't know that the concepts mix that well. I would like to fork little processes to do the whois, and return the results as a fully-fledged object. But processes don't share memory, so I can't do that (right?) So I guess, again, I have some alternatives....:

Once again, none of the solutions seem perfect. And no, I can't use Thread; because this module is for distribution. So anyone who knows how to do good OO IPC could help a lot by enlightening me.

Cheers, Dave.


In reply to IPC + OO = ? by dash2

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.