[23119] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5340 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Aug 10 06:06:05 2003

Date: Sun, 10 Aug 2003 03:05:06 -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           Sun, 10 Aug 2003     Volume: 10 Number: 5340

Today's topics:
    Re: DBI suddenly not working... <tassilo.parseval@rwth-aachen.de>
    Re: Enumerate all the remote drives (Jay Tilton)
        extract strings between alternating text (Lydia Shawn)
    Re: extract strings between alternating text <REMOVEsdnCAPS@comcast.net>
    Re: extract strings between alternating text (Tad McClellan)
    Re: extract strings between alternating text (Lydia Shawn)
    Re: extract strings between alternating text (Sam Holden)
    Re: FTP doesn't add Carriage Return from VMS to NT? (Mike O'Neal)
    Re: In loop wait for function return <REMOVEsdnCAPS@comcast.net>
    Re: In loop wait for function return <bart.lateur@pandora.be>
    Re: Location problem (Ron Spears)
    Re: Location problem <noreply@gunnar.cc>
        logging mechanism development to maintain Win2K servers <rajiv_gangadharan@sancharnet.in>
    Re: PERL, FTP and Browser Upload <bart.lateur@pandora.be>
    Re: Request For Information And Steering - IPC, Java, P <dngor@bellsouth.net>
    Re: Request For Information And Steering - IPC, Java, P <mooseshoes@gmx.net>
    Re: Win32-OLE excel cell reference. <bwalton@rochester.rr.com>
    Re:  <bwalton@rochester.rr.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 10 Aug 2003 06:01:34 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: DBI suddenly not working...
Message-Id: <bh4n3u$8qe$1@nets3.rz.RWTH-Aachen.DE>

Also sprach doofus:

> Tad McClellan wrote:

>> 5.8.0 is not binary compatible with earlier versions.
>>
>> Modules with a C component (XS) need to be recompiled for 5.8.0.
> 
> Thanks! That was very informative. Now I know what XS means.
> 
> I don't know whether it's good news or bad, though. I guess it means
> that there will have to be two binaries on the ppm thingy, one for 5.8
> and one for 5.6, at least for C component modules. {:-(

Yup, exactly. For module authors who also provide PPM distributions this
is annoying and doubles the work required.

> But this certainly could explain a lot of problems I've been having.
> Thanks again.
> 
> I wonder if there is really any point trying to run perl on Windows? It
> must be *way* easier installing all those powerfull modules on Linux.

Mostly it is, yes. The problem with Windows is that it is missing
essential things like a C compiler and a make tool. They can be
installed, though. In case of C compilers, all my experiences have shown
that you can compile XS modules with gcc and they will work with
ActivePerl (which itself was compiled with VisualC).

Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval


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

Date: Sun, 10 Aug 2003 04:22:41 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: Enumerate all the remote drives
Message-Id: <3f35c86c.37413140@news.erols.com>

Gary Chan <garry.chan@alumni.ust.hk> wrote:

: I want to write a perl script that enumerates all the local drive names 
: that are connecting to remote drives in Windows. I think 
: Win32::NetResource is one of the possible module but I can't figure out 
: how to do this.

    #!perl
    use warnings;
    use strict;
    use Win32::OLE 'in';

    my $fso = Win32::OLE->new('Scripting.FileSystemObject');
    for ( in $fso->Drives ) {
        print "Drive $_->{DriveLetter} is a remote volume\n"
          if $_->{DriveType} == 3;
    }



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

Date: 9 Aug 2003 18:08:24 -0700
From: apfeloma@hotmail.com (Lydia Shawn)
Subject: extract strings between alternating text
Message-Id: <1240b4dc.0308091708.2e89ab87@posting.google.com>

hi there,

i want to extract the numbers from this example

input:

bla trigger3 trigger4 trigger1 blabla trigger1 5000.00 trigger3
trigger1 trigger2 trigger2 600.00 trigger4
trigger1 50.00 trigger4

i want to extract the numbers everytime they occur between trigger1 or
2 and trigger3 or 4.

so output:
5000,00
600,00
50,00


i thought i could use something like this

$return =~ /($trigger1|trigger2)(.*)(trigger3|trigger4)/si ;
but obviously i can't.. cause it doesn't work..
your ideas are very welcome!
thanks!!

lydia


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

Date: Sat, 09 Aug 2003 20:26:25 -0500
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: extract strings between alternating text
Message-Id: <Xns93D2DA0AAA22Bsdn.comcast@206.127.4.25>

-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1

apfeloma@hotmail.com (Lydia Shawn) wrote in 
news:1240b4dc.0308091708.2e89ab87@posting.google.com:

> hi there,
> 
> i want to extract the numbers from this example
> 
> input:
> 
> bla trigger3 trigger4 trigger1 blabla trigger1 5000.00 trigger3
> trigger1 trigger2 trigger2 600.00 trigger4
> trigger1 50.00 trigger4
> 
> i want to extract the numbers everytime they occur between trigger1 or
> 2 and trigger3 or 4.
> 
> so output:
> 5000,00
> 600,00
> 50,00
> 
> 
> i thought i could use something like this
> 
> $return =~ /($trigger1|trigger2)(.*)(trigger3|trigger4)/si ;
> but obviously i can't.. cause it doesn't work..

Well, think about it.  In words, that pattern matches:

    The variable $trigger1 *or* the string "trigger2"
    followed by as much text as possible
    followed by the string "trigger3" or "trigger4".

So it would match pretty much the whole string, eh?

You want to match

    The string "trigger1" or "trigger2"
    followed by possible whitespace
    followed by digits (and maybe a decimal point?)
    followed by more possible whitespace
    followed by the string "trigger3" or "trigger4"

right?


    /(trigger1|trigger2)
     \s*
     ([\d.]+)
     \s*
     (trigger3|trigger4)/six;

The most important thing when writing regular expressions is to state 
*precisely* what you're looking for, and then translate it into small 
chunks that correspond to what Perl's RE engine can do, and then write 
the expression.

- -- 
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print

-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPzWfKWPeouIeTNHoEQJXXwCg9yY/GXb8OXYXVVjlTtOL7QOA5/kAoJZU
LA2duAEVvyDkVmEZcIX0tcHq
=nJA/
-----END PGP SIGNATURE-----


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

Date: Sat, 9 Aug 2003 21:34:30 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: extract strings between alternating text
Message-Id: <slrnbjbbpm.7n8.tadmc@magna.augustmail.com>


[ comp.lang.perl is not a Newsgroup. Removed. ]


Lydia Shawn <apfeloma@hotmail.com> wrote:

> i want to extract the numbers from this example

> bla trigger3 trigger4 trigger1 blabla trigger1 5000.00 trigger3
> trigger1 trigger2 trigger2 600.00 trigger4
> trigger1 50.00 trigger4
> 
> i want to extract the numbers everytime they occur between trigger1 or
> 2 and trigger3 or 4.


    while ( /(trigger1|trigger2)(.*?)(trigger3|trigger4)/sg ) {
        my $str = $2;
        print "$1\n" if $str =~ /(\d+\.\d+)/
    }


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 10 Aug 2003 02:56:10 -0700
From: apfeloma@hotmail.com (Lydia Shawn)
Subject: Re: extract strings between alternating text
Message-Id: <1240b4dc.0308100156.2728ebcc@posting.google.com>

hi eric,

>  You want to match
>  The string "trigger1" or "trigger2"
>  followed by possible whitespace
>  followed by digits (and maybe a decimal point?)
>  followed by more possible whitespace
>  followed by the string "trigger3" or "trigger4"

exactly right! the variable was a mistake in my earlier posting but
you got it anyway!

for some reason though the | doesn't seem to do it's job..

=~    /(trigger1|trigger2)\s*([\d.]+)\s*(trigger3|trigger4)/six;

returns "trigger1"

but when i leave out the | like here:

=~    /trigger2\s*([\d.]+)\s*trigger4/six; 
it matches the number between trigger1 and trigger4 properly..
i'd want to match all three  though!

thanks for your help,
lydia


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

Date: 10 Aug 2003 10:01:14 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: extract strings between alternating text
Message-Id: <slrnbjc5va.cps.sholden@flexal.cs.usyd.edu.au>

On 10 Aug 2003 02:56:10 -0700, Lydia Shawn <apfeloma@hotmail.com> wrote:
> hi eric,
> 
>>  You want to match
>>  The string "trigger1" or "trigger2"
>>  followed by possible whitespace
>>  followed by digits (and maybe a decimal point?)
>>  followed by more possible whitespace
>>  followed by the string "trigger3" or "trigger4"
> 
> exactly right! the variable was a mistake in my earlier posting but
> you got it anyway!
> 
> for some reason though the | doesn't seem to do it's job..
> 
>=~    /(trigger1|trigger2)\s*([\d.]+)\s*(trigger3|trigger4)/six;
> 
> returns "trigger1"

Did you bother checking what was in $2?

It isn't magic you know, the documentation tells you what each
character in a regular expression does. You could try reading some 
of it.

-- 
Sam Holden


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

Date: 9 Aug 2003 22:20:50 -0700
From: mjoneal@bpa.gov (Mike O'Neal)
Subject: Re: FTP doesn't add Carriage Return from VMS to NT?
Message-Id: <594ddf47.0308092120.63a45dd4@posting.google.com>

James Willmore <jwillmore@cyberia.com> wrote in message news:<20030809010631.315ab36d.jwillmore@cyberia.com>...
> <snip>
> > Anyone have suggestions why I'm not getting my CR/LF as expected?
> 
> I posted a suggestion on this issue within the last 3 weeks.  Plus,
> someone else responded that the issue appears to lie with W2K.  
> 
> The thread has the subject:
> FTP in ASCII mode from UNIX to NT
> 
> Same type of issue - line endings fouled.
> 
> HTH
> 
> Jim

Jim, I read your issue, and if it's notepad you need to read it in,
just use Wordpad!  Voila, problem solved, since it is content to use
LF as a terminator.  My problem is proprietary software that NEEDS the
expected CR/LF.  I know I can post-process the files, but there's a
bunch and I'd like a better solution if possible.

Does anyone know if the "A" module I mention above is the right place,
or perhaps elsewhere?


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

Date: Sat, 09 Aug 2003 20:18:20 -0500
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: In loop wait for function return
Message-Id: <Xns93D2D8ABBFCDCsdn.comcast@206.127.4.25>

-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1

mUs <cmustard_!SPAM@nyc.rr.com> wrote in
news:X2dZa.111703$852.20426@twister.nyc.rr.com: 

> I would like to loop through a few URL's utilizing the LWP::Simple get
> function. Using the existing 'logic' ( or lack thereof ) is there a
> way to have the script wait before executing the next iteration of the
> for loop. At the moment the 'get' function does not have enough time
> to complete its' request. I looked into fork, wait, exec, etc but
> those don't seem to be what i'm looking for. I though 'eval' would do
> it but it doesn't. thanks 

The script *is* waiting for the 'get' to return before going on to the next 
iteration of the loop.  What are you seeing (versus what you're expecting) 
that is causing you to think otherwise?

- -- 
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print

-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPzWdRGPeouIeTNHoEQJ+kACeK1PREMpNGus4MkEAcJc0rR7pi6sAoONf
MUsJJ+LnlbeQNSOZSZDbqpuQ
=Ila7
-----END PGP SIGNATURE-----


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

Date: Sun, 10 Aug 2003 09:24:51 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: In loop wait for function return
Message-Id: <9k3cjv8h6fg3du0qi87519j4ihm2shroe8@4ax.com>

Eric J. Roode wrote:

>mUs <cmustard_!SPAM@nyc.rr.com> wrote in
>news:X2dZa.111703$852.20426@twister.nyc.rr.com: 
>
>> I would like to loop through a few URL's utilizing the LWP::Simple get
>> function. Using the existing 'logic' ( or lack thereof ) is there a
>> way to have the script wait before executing the next iteration of the
>> for loop. At the moment the 'get' function does not have enough time
>> to complete its' request.

>The script *is* waiting for the 'get' to return before going on to the next 
>iteration of the loop.  What are you seeing (versus what you're expecting) 
>that is causing you to think otherwise?

To the OP: check the return status of the request. You won't be able to
do that using get(), but getstore(), which will save the retrieved data
as a file, will at least return the status code. If it's not 200,
something went wrong. More elaborate scripts using LWP::UserAgent can
return you the complete headers.

-- 
	Bart.


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

Date: 10 Aug 2003 00:59:29 -0700
From: ronspear_tx@yahoo.com (Ron Spears)
Subject: Re: Location problem
Message-Id: <304a0e4e.0308092359.cf9cac8@posting.google.com>

> Yeah - that's why it doesn't work.
> 
> Try:
> 
> my $loc = "Location: http://www.website.com/confirm.htm?passed_variable";
> print "$loc\n\n";

Actually, in my code case this method won't work.  For the previous
poster, the reason why I am printing it twice is because in code
reality there is a bunch of stuff between each of these statements and
the intent was to store the redirected URL for execution at the end of
the code.  For some reason in this sendmail routine, if I position
this line after a particular line in the sendmail rountine, print
"Content-type: text/html\n\n";  it causes the redirect to print out as
html on the screen only...

So I am still trying to pass a variable off to confirm.htm -- any clue
on how to make this work??


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

Date: Sun, 10 Aug 2003 11:43:49 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Location problem
Message-Id: <bh545s$ug23a$1@ID-184292.news.uni-berlin.de>

[Since this thread has nothing to do with Perl, I replied to both
clpmisc and ciwac, with a request that possible followups are posted
to ciwac.]

Ron Spears wrote:
> Erich Musick wrote:
>> 
>> my $loc = "Location: http://www.website.com/confirm.htm?passed_variable";
>> print "$loc\n\n";
> 
> Actually, in my code case this method won't work.  For the previous
> poster, the reason why I am printing it twice is because in code
> reality there is a bunch of stuff between each of these statements
> and the intent was to store the redirected URL for execution at the
> end of the code.

And that is exactly what Erich's suggestion does. It _stores_ the
redirect URL in $loc for later _printing_. There is no reason to
_print_ the same header twice.

> if I position this line after a particular line in the sendmail
> rountine, print "Content-type: text/html\n\n";  it causes the
--------------------------------------------^^
> redirect to print out as html on the screen only...

Yes, it does. "Location: [someURL]\n" is a header. Printing of a blank
line (\n\n) tells the server that printing of headers ends.
Accordingly, if the printing of the "Location: ..." string is preceded
by a blank line, it will not be treated as a redirect header.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


-- 
PLEASE NOTE: comp.infosystems.www.authoring.cgi is a
SELF-MODERATED newsgroup. aa.net and boutell.com are
NOT the originators of the articles and are NOT responsible
for their content.

HOW TO POST to comp.infosystems.www.authoring.cgi:
http://www.thinkspot.net/ciwac/howtopost.html


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

Date: Sun, 10 Aug 2003 11:27:33 -0700
From: "Rajiv Gangadharan" <rajiv_gangadharan@sancharnet.in>
Subject: logging mechanism development to maintain Win2K servers.
Message-Id: <bh4p9h$tsg9h$1@ID-176666.news.uni-berlin.de>

Hello,
I am trying to develop a patching utility for patching, virus scanning a lot
of Win2K servers. I want to maintain a single work station as the central
point of control or console for doing this activity. I am using "psexec"
downloaded from http://www.sysinternals.com , to execute patches and do
virus scans on the remote servers. I am yet to develop a logging mechanism
so that the scripts running on the remote servers but which is executed by
"psexec" from my central console can use this logging framework.
I would like to know the cleanest way to accomplish this. All inputs are
welcome.
Regards,
Rajiv




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

Date: Sun, 10 Aug 2003 09:17:01 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: PERL, FTP and Browser Upload
Message-Id: <fo2cjv493o4n67a9qfukj13qkvc74kgu2p@4ax.com>

prsjm3qf wrote:

>I'd love to get them all to use an ftp client but realistically its not
>going to happen so I want  to have users select files in their browser
>from their local system, press a button and Binary FTP the files into a
>pre created directory on an ftp server.

There are various FTP programs that pretend that the site's directory is
a directory on your own system. Get them to use one of those. All you
have to do is install and set it up to use your site -- perhaps you can
script it, accessing the registry directly. 

Perhaps Windows XP even has this functionality built-in, but I'm not
sure; I'm not very familiar with XP, as I've used it only a few times.

>There seem to be various scripts
>around that say they do this but on closer inspection they start getting
>a bit vague and I'm not convinced that they are actually using FTP as
>opposed to HTTP.

Net::FTP is a good way to script FTP. See the chapter in Lincoln Stein's
book "Network Programming with Perl". At least the code, but I believe
also the text for this one chapter, is available on the 'net:

	<http://modperl.com:9000/perl_networking/>
	<http://modperl.com:9000/perl_networking/sample/ch6.html>

-- 
	Bart.


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

Date: Sun, 10 Aug 2003 02:58:29 GMT
From: Rocco Caputo <dngor@bellsouth.net>
Subject: Re: Request For Information And Steering - IPC, Java, Perl, etc.
Message-Id: <slrnbjbdva.gl.dngor@eyrie.homenet>

On 10 Aug 2003 00:50:00 GMT, mooseshoes wrote:
> All:
> 
> I am writing a Perl program, the purpose of which is to asynchronously feed
> short messages to multiple clients running on remote computers (PC's,
> mostly).  The messsages will be machine (IP address) specific and the
> number of clients is expected to scale up to 1 million in number as a
> design requirement.  The clients will be Java applets which will allow the
> client to run on any machine facilitating a compatible JRE or equivalent.

Just a bunch of guesses since things are still too vague to determine
anything.

A million simultaneous clients might be rough to serve from one machine,
especially using TCP.

The naive approach might be to use a thread per connection.  That's out
unless you've got some really sexy hardware, and it's definitely out if
you're using Perl.  Each perl thread requires a copy of the interpreter,
so you'd be looking at maybe a quarter million megabytes of working-set
memory.  Not good there.

Multiplexing TCP is probably out, at least on a single machine.  A
million TCP connections would require a million file descriptors.  What
handles that?

> The communication between server and client is expected to have two primary
> types engagement, the first of which is more bi-directional (login,
> database updates, etc.) and the second of which is a mode where the client
> is mostly listening for new messages from the server.

If the first mode connections are short-lived, you might get away with
TCP here.  Create a socket, perform the login/update, and shut down the
connection.  Depending on connections' duty cycle, you may only see a
few hundred simultaneous clients at a time.

UDP might work for the second mode.  It's connectionless, so a single
server socket can handle all million clients.  It's stateless, but your
application doesn't seem to require state anyway.

Note, however, that your protocol might require reliablility.  That
means reinventing at least a subset of TCP over UDP.

If you must send a lot of events all the time, your operating system
might be overwhelmed.  You may be able to tune it for best results.

If tuning doesn't work, you may need several broadcast servers.  The
short-lived authentication connection can point clients to different
servers, balancing your load.  A master server, the one with the
database, perhaps, would broadcast updates to a relatively small number
of servers, which would then forward events to a much larger set of
clients.

  1 master server -event-> 100 servers -event-> 1,000,000 clients

The numbers can be tuned according to your budget.

Sending a million events simultaneously will swamp your network.  UDP is
not reliable, so many of the events will be lost in collisions.  A
reliability layer over UDP (reinventing TCP here) will ensure that lost
events are retried.

Consider multicasting if you must send a single event to a million
clients at once.  I don't know enough about it to say whether it will
help, though.

At any rate, the network becomes your bottleneck instead of the OS or
your hardware.

> I am new to inter-process communications and would be interested to learn
> what the likely technologies are for an application such as the one
> described above.  And given that, what are some good resources for learning
> more about them?  I am prepared to get my hands dirty and learn a thing or
> two in the process.
> 
> The reason I am asking is that I have heard things about Sockets, RMI, RPC,
> SOAP and CORBA, each of which could be a possible approach given the
> various tradeoffs.  having some initial input from the community should aid
> my choices and help me identify information resources more readily.

You've provided some measure of scale, but you haven't really said
enough about the application or the types of traffic you need.

You will be using sockets of some sort.  RMI and friends are
higher-level wrappers for sockets.  They may consume more resources than
you have avaliable, however.

At this scale, and at your unspecified performance requirements, you may
not be able to use them.  Who knows?

Various Perl technologies may help you.  I've written one of them.  You
can read about it at http://poe.perl.org/

> Thank you in advance for your thoughts.
>
> Best,

Good luck.

-- 
Rocco Caputo - rcaputo@pobox.com - http://poe.perl.org/



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

Date: 10 Aug 2003 03:51:33 GMT
From: mooseshoes <mooseshoes@gmx.net>
Subject: Re: Request For Information And Steering - IPC, Java, Perl, etc.
Message-Id: <bh4fg5$bnm@dispatch.concentric.net>

Rocco:

You are very kind to share your educated response with me and the rest of
the group.  I will anxiously look at your technology solution.

Best,

Moose



Rocco Caputo wrote:

> On 10 Aug 2003 00:50:00 GMT, mooseshoes wrote:
>> All:
>> 
>> I am writing a Perl program, the purpose of which is to asynchronously
>> feed short messages to multiple clients running on remote computers
>> (PC's,
>> mostly).  The messsages will be machine (IP address) specific and the
>> number of clients is expected to scale up to 1 million in number as a
>> design requirement.  The clients will be Java applets which will allow
>> the client to run on any machine facilitating a compatible JRE or
>> equivalent.
> 
> Just a bunch of guesses since things are still too vague to determine
> anything.
> 
> A million simultaneous clients might be rough to serve from one machine,
> especially using TCP.
> 
> The naive approach might be to use a thread per connection.  That's out
> unless you've got some really sexy hardware, and it's definitely out if
> you're using Perl.  Each perl thread requires a copy of the interpreter,
> so you'd be looking at maybe a quarter million megabytes of working-set
> memory.  Not good there.
> 
> Multiplexing TCP is probably out, at least on a single machine.  A
> million TCP connections would require a million file descriptors.  What
> handles that?
> 
>> The communication between server and client is expected to have two
>> primary types engagement, the first of which is more bi-directional
>> (login, database updates, etc.) and the second of which is a mode where
>> the client is mostly listening for new messages from the server.
> 
> If the first mode connections are short-lived, you might get away with
> TCP here.  Create a socket, perform the login/update, and shut down the
> connection.  Depending on connections' duty cycle, you may only see a
> few hundred simultaneous clients at a time.
> 
> UDP might work for the second mode.  It's connectionless, so a single
> server socket can handle all million clients.  It's stateless, but your
> application doesn't seem to require state anyway.
> 
> Note, however, that your protocol might require reliablility.  That
> means reinventing at least a subset of TCP over UDP.
> 
> If you must send a lot of events all the time, your operating system
> might be overwhelmed.  You may be able to tune it for best results.
> 
> If tuning doesn't work, you may need several broadcast servers.  The
> short-lived authentication connection can point clients to different
> servers, balancing your load.  A master server, the one with the
> database, perhaps, would broadcast updates to a relatively small number
> of servers, which would then forward events to a much larger set of
> clients.
> 
>   1 master server -event-> 100 servers -event-> 1,000,000 clients
> 
> The numbers can be tuned according to your budget.
> 
> Sending a million events simultaneously will swamp your network.  UDP is
> not reliable, so many of the events will be lost in collisions.  A
> reliability layer over UDP (reinventing TCP here) will ensure that lost
> events are retried.
> 
> Consider multicasting if you must send a single event to a million
> clients at once.  I don't know enough about it to say whether it will
> help, though.
> 
> At any rate, the network becomes your bottleneck instead of the OS or
> your hardware.
> 
>> I am new to inter-process communications and would be interested to learn
>> what the likely technologies are for an application such as the one
>> described above.  And given that, what are some good resources for
>> learning
>> more about them?  I am prepared to get my hands dirty and learn a thing
>> or two in the process.
>> 
>> The reason I am asking is that I have heard things about Sockets, RMI,
>> RPC, SOAP and CORBA, each of which could be a possible approach given the
>> various tradeoffs.  having some initial input from the community should
>> aid my choices and help me identify information resources more readily.
> 
> You've provided some measure of scale, but you haven't really said
> enough about the application or the types of traffic you need.
> 
> You will be using sockets of some sort.  RMI and friends are
> higher-level wrappers for sockets.  They may consume more resources than
> you have avaliable, however.
> 
> At this scale, and at your unspecified performance requirements, you may
> not be able to use them.  Who knows?
> 
> Various Perl technologies may help you.  I've written one of them.  You
> can read about it at http://poe.perl.org/
> 
>> Thank you in advance for your thoughts.
>>
>> Best,
> 
> Good luck.
> 



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

Date: Sun, 10 Aug 2003 01:41:45 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Win32-OLE excel cell reference.
Message-Id: <3F35A2D0.5020409@rochester.rr.com>

Richard S Beckett wrote:

 ...> It seems that the Range command likes data like (A14), or (A14:B26), and I
> am happy with this.
 ...


> I have had success with Cells(1,14), but I cannot for the life of me work
> out how to reference an area of cells like this...
> 
> Cells(1,14:5,28)
 ...


> R.


Well, despite its plural name, the Cells property only returns a Range 
which is a single cell.  You can do:

   ...Range(Cells(1,14),Cells(5,28))...

The main reason for the Cells property is to permit the manipulation of 
a Range given row and column index numbers, rather than strings like 
"B3:E7", which are a bit harder to manipulate (especially in VB).

Use Excel's object browser to help look up stuff like that.  Your 
question really isn't a Perl question, but, close enough I guess.

-- 
Bob Walton



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

Date: Sat, 19 Jul 2003 01:59:56 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: 
Message-Id: <3F18A600.3040306@rochester.rr.com>

Ron wrote:

> Tried this code get a server 500 error.
> 
> Anyone know what's wrong with it?
> 
> if $DayName eq "Select a Day" or $RouteName eq "Select A Route") {

(---^


>     dienice("Please use the back button on your browser to fill out the Day
> & Route fields.");
> }
 ...
> Ron

 ...
-- 
Bob Walton



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

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:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

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 V10 Issue 5340
***************************************


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