Re: mod_perl vs. C for high performance Apache modules

2001-12-14 Thread Toni Andjelkovic

Dave Hodgkinson wrote on Fri, Dec 14 2001 (20:54:22 +):
 Perrin Harkins [EMAIL PROTECTED] writes:
  According to something I once read by David Filo, Yahoo also had to tweak
  the FreeBSD code because they had trouble scaling *TCP/IP*!  I would say
  their experience is not typical.
 
 Increasing the number of file handles, I'd wager. That was an issue on

you really don't have to tweak any FreeBSD code
for that, just do

sysctl -w kern.maxfiles=10

and the file table will grow up to the new limit.

 2.x linux kernels too.

that was an issue with 2.0.x, since 2.2.x
you can do it with

echo 10  /proc/sys/fs/file-max

cheers,
-- 
Toni Andjelkovic
[EMAIL PROTECTED]




mod_perl-1.26, threads and LWP.pm

2001-11-05 Thread Toni Andjelkovic

i will need to request an external URL multiple
(several hundred) times, where each request contains
a different arg. then i need to process each response:

http://foo/bar?arg=84375
http://foo/bar?arg=43896
http://foo/bar?arg=98945
...

the problem is that i need to do this from within a
single Apache/mod_perl process.

so i'd like to spin off about 10-20 threads and let
them handle the task concurrently by using LWP, join
on them, collect the response data and finally send a
summary to the client.

is this possible on mod_perl-1.26 (with 5.6.1, on either
Linux, FreeBSD or Solaris)?

what are the caveats?

if possible, one thread blocking for socket IO should
not block the entire Apache/mod_perl process. will perl
take advantage of kernel threads if the host OS supports
them?

is there anything special regarding perl/mod_perl/Apache
compilation (besides of -Dusethreads)?

should i use 5005threads (Thread.pm) or ithreads for
this task?

is LWP considered thread-safe?

thanks,
-- 
Toni Andjelkovic
[EMAIL PROTECTED]




Re: Exporting C++ class to Perl?

2001-10-30 Thread Toni Andjelkovic

Vlad Safronov wrote on Tue, Oct 30 2001 (19:26:40 +0300):
 How can I export C++ class and its interface to Perl?

http://www.johnkeiser.com/perl-xs-c++.html

cu,
-- 
Toni Andjelkovic
[EMAIL PROTECTED]




Re: Porting

2001-09-24 Thread Toni Andjelkovic

Mark Maunder wrote on Mon, Sep 24 2001 (15:44:25 +0100):
 Any clues as to your motivation for porting to mod_perl? I've been trying to
 sell a mod_perl solution to some Java nuts for some time and any help would be
 much appreciated. What really makes mod_perl better than Java? Are there any
 performance benchmarks out there that anyone knows about? Scaleability? JDBC vs.
 DBI? Child/Servlet memory footprint size?

performance is not the crucial point here, IMHO.
it's like young boys arguing about car brands,
my daddy's car is faster than your daddy's car!

it depends on the people who will write/maintain the code
and their skills with the particular technology, be
it mod_perl, servlets, ruby, python, whatever.

basically, someone with comparable proficiency
in each of the mentioned technologies will be
able to produce a working solution with comparable
performance. all of the above technologies have been
deployed in large-scale projects, and they can
be tuned, so that performance questions should
not be emphasized more than necessary.

if your data model is clean and your algorithms
are smart, then the implementation language is just
a question of convenience, IMHO. you should concentrate
on this fact rather than bragging about product features.

 If someone says to you, why didn't you do it in Java?
 What do you say? (Besides
 mentioning Sun's lame license.)

because i think that mod_perl gives me all the
flexibility i need, and it's supported by legions
of competent developers. i saw lots of companies
offering premium commercial support for their
products, but almost none of them can maintain the
level of support offered by the perl community.

in my opinion, there are lots of (mediocre) Java programmers
out there, far more than competent mod_perl programmers.
it's easier for companies to recruit Java people,
and Java has better marketing, impressing suits who pay
for your projects.

cu,
-- 
Toni Andjelkovic
[EMAIL PROTECTED]




Re: AuthCookie access denied messages

2001-08-20 Thread Toni Andjelkovic

David Young wrote on Mon, Aug 20 2001 (12:36:19 -0400):
 Before I tackle this myself, has anyone added functionality to AuthCookie so
 that it will report *why* a user is being asked to login? Currently, if a

perldoc Apache::AuthCookie
/AuthCookieReason

cu,
-- 
Toni Andjelkovic
[EMAIL PROTECTED]