[32744] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 4008 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 6 09:09:45 2013

Date: Tue, 6 Aug 2013 06:09:02 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 6 Aug 2013     Volume: 11 Number: 4008

Today's topics:
    Re: fast scan <rweikusat@mssgmbh.com>
    Re: fast scan <rweikusat@mssgmbh.com>
    Re: PAUSE vs. $VERSION <rweikusat@mssgmbh.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Tue, 06 Aug 2013 11:32:35 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: fast scan
Message-Id: <878v0fm7ng.fsf@sapphire.mobileactivedefense.com>

Charles DeRykus <derykus@gmail.com> writes:
> On 8/5/2013 12:28 PM, Rainer Weikusat wrote:
>> Charles DeRykus <derykus@gmail.com> writes:
>>> On 8/4/2013 6:59 AM, Rainer Weikusat wrote:
>>> ...
>>>
>>> POE though is using non-blocking I/O and an event loop behind the
>>> scenes which is certainly a reasonable approach IIUC.  Admittedly
>>> there's a a fair amount of overhead with POE's pseudo-kernel set-up,
>>> but, at least, there's a single process rather than cloning perl
>>> interpreters or forking a bazillion times.
>>
>> This will make the issue I referred to as 'DDos suicide' in another
>> posting worse because the probe packets are being sent out faster: The
>> original posting was about pinging all hosts on the local LAN. And
>> this local LAN may neither be 'small' (a /24 or less) nor sparsely
>> populated. Let's assume that a thousand hosts reply: Somewhat
>> simplified, these have 1000x the bandwidth and other resources
>> available for sending their messages than the host who sent the probes
>> can muster for processing them.
>>
>
> Actually, it appears that POE  has already dealt with than issue
> (although tuning might take guesswork) with its own modulation
> setting:
>
> http://search.cpan.org/~rcaputo/POE-Component-Client-Ping-1.173/lib/POE/Component/Client/Ping.pm
>
> From above doc:
>
> Parallelism => $limit

The solution is really simply to rate-limit requests being sent which
can be accomplished by something as hideously arcane as doing
a (subsecond) 'sleep' between two sends when using a dedicated sending thread/
process (presumably, that's not something whose name looks like the
German word for 'trainwreck' would ever consider) or using select with
a suitable timeout to wait for replies between two sends. This
'parallelism' idea is inherently broken because replies aren't
guaranteed to arrive.

NB: I completely understand how to 'work around that' by employing a
general-purpose timer implementation (which might even use a sensible
algorithm for priority queues although this would really surprise me)
combined with a general purpose 'coroutine' aka 'cooperative userspace
threading' (Mark 45054) implementation with a combined size of 1E9
LOC (25% were never executed so far, another 25% are executed but
don't do anything useful, a further 25% workarounds for bugs in the
remaining 25%).


------------------------------

Date: Tue, 06 Aug 2013 11:42:16 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: fast scan
Message-Id: <874nb3m77b.fsf@sapphire.mobileactivedefense.com>

Rainer Weikusat <rweikusat@mssgmbh.com> writes:
> Charles DeRykus <derykus@gmail.com> writes:

[...]

>> http://search.cpan.org/~rcaputo/POE-Component-Client-Ping-1.173/lib/POE/Component/Client/Ping.pm
>>
>> From above doc:
>>
>> Parallelism => $limit

[...]

> NB: I completely understand how to 'work around that' by employing a
> general-purpose timer implementation


[...]

Something which suggests itself in this context (and a nice read):

	A novice programmer was once assigned to code a simple financial package.

	The novice worked furiously for many days, but when his master
	reviewed his program, he discovered that it contained a screen
	editor, a set of generalized graphics routines, an artificial
	intelligence interface, but not the slightest mention of
	anything financial.

	When the master asked about this, the novice became
	indignant. ``Don't be so impatient,'' he said, ``I'll put in
	the financial stuff eventually.''
        
        http://www.canonical.org/~kragen/tao-of-programming.html
        


------------------------------

Date: Tue, 06 Aug 2013 11:52:33 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: PAUSE vs. $VERSION
Message-Id: <87zjsvks5q.fsf@sapphire.mobileactivedefense.com>

Ivan Shmakov <oneingray@gmail.com> writes:

[...]

> 	Do I understand it correctly that the "package PACKAGE VERSION"
> 	form is a (relatively) recent addition to Perl

[...]

According to www.perl.org, it was added with Perl 5.12.0 (released on
2010/04/12).


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests. 

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 4008
***************************************


home help back first fref pref prev next nref lref last post