modperl vs fastcgi

2021-02-23 Thread Wesley Peng
Do you anybody have a comparison for modperl vs fastcgi? For both the performance and convenience of development/deployment. Thank you.

Re: Moving ExecCGI to mod_perl - performance and custom 'modules' [EXT]

2021-02-07 Thread Wesley Peng
what's DBI sharing? do you mean Apache::DBI? Does perl has Java similar DB connection pool? Thanks. On Mon, Feb 8, 2021, at 4:21 AM, James Smith wrote: > DBI sharing doesn't really gain you much - and can actually lead you into a > whole world of pain. It isn't actually worth turning it on at al

Re: Moving ExecCGI to mod_perl - performance and custom'modules'[EXT]

2021-02-07 Thread Wesley Peng
If you can take time to rewrite all codes with modPerl handlers, that will improve performance a lot. On Sun, Feb 7, 2021, at 9:14 PM, Steven Haigh wrote: > In fact, I just realised that 'ab' test is rather restrictive So here's a > bit more of an extended test: > > # ab -k -n 1000 -c 32 >

Re: Moving ExecCGI to mod_perl - performance and custom 'modules'

2021-02-06 Thread Wesley Peng
Is the url in your signature the website? It looks a beautiful UI design. And you can try this method: https://metacpan.org/pod/ModPerl::Registry Thanks. On Sun, Feb 7, 2021, at 8:59 AM, Steven Haigh wrote: > Hi all, > > So for many years I've been slack and writing perl scripts to do various >

Re: perl's pulsar client

2021-01-26 Thread Wesley Peng
e, Jan 26, 2021, 7:09 PM Wesley Peng wrote: >> __ >> I saw apache pulsar has many clients in other languages such as python's: >> http://pulsar.apache.org/docs/en/client-libraries-python/ >> >> But it lacks a perl client library. >> Would anyone have the plan to make one? >> >> Thanks.

perl's pulsar client

2021-01-26 Thread Wesley Peng
I saw apache pulsar has many clients in other languages such as python's: http://pulsar.apache.org/docs/en/client-libraries-python/ But it lacks a perl client library. Would anyone have the plan to make one? Thanks.

Re: cache a object in modperl

2020-09-13 Thread Wesley Peng
Mithun Bhattacharya wrote: Does IANA have an easy way of determining whether there is an update since a certain date ? I was thinking it might make sense to just run a scheduled job to monitor for update and then restart your service or refresh your local cache depending upon how you solve i

Re: cache a object in modperl

2020-09-13 Thread Wesley Peng
Hello Mithun Bhattacharya wrote: How frequently do you wish to refresh the cache ? if you do in startup then your cache refresh is tied to the service restart which might not be ideal or feasible. I saw recent days IANA has updated their database on date of: 2020.09.09 2020.09.13 So I assum

Re: cache a object in modperl

2020-09-13 Thread Wesley Peng
database loaded and be serving requests at the same time.  If you want to go this way you might want to also add a MaxRequestsPerChild directive to your apache config to make sure that you're children die and get refreshed on the regular, if you don't already have one. Adam On 9/13/202

cache a object in modperl

2020-09-13 Thread Wesley Peng
Hello I am not so familiar with modperl. For work requirement, I need to access IANA TLD database. So I wrote this perl module: https://metacpan.org/pod/Net::IANA::TLD But, for each new() in the module, the database file will be downloaded from IANA's website. I know this is pretty Ineffici

Re: Question about deployment of math computing [EXT]

2020-08-05 Thread Wesley Peng
James, James Smith wrote: The services which use apache/mod_perl work reliably and return data for these - the dancer/starman sometimes fail/hang as there are no backends to serve the requests or those backends timeout requests to the nginx/proxy (but still continue using resources). The team

Re: Question about deployment of math computing

2020-08-04 Thread Wesley Peng
Thank you David. That makes thing clear. I have made mistake to think starman was event driven, who is really preforked. I think any preforked server could serve our depolyment better. Regards. dc...@prosentient.com.au wrote: Hi Wesley, I don't know all the ins and outs of Starman.

Re: Question about deployment of math computing

2020-08-04 Thread Wesley Peng
Hi dc...@prosentient.com.au wrote: That's interesting. After re-reading your earlier email, I think that I misunderstood what you were saying. Since this is a mod_perl listserv, I imagine that the advice will always be to use mod_perl rather than starman? Personally, I'd say either option wo

Re: Question about deployment of math computing

2020-08-04 Thread Wesley Peng
Hi dc...@prosentient.com.au wrote: If your app isn't human-facing, then I don't see why a little delay would be a problem? Our app is not human facing. The application by other department will request the result from our app via HTTP. The company has huge big-data stack deployed, such as

Re: Question about deployment of math computing

2020-08-04 Thread Wesley Peng
Hi Mithun Bhattacharya wrote: Do you really need a webserver which is providing a blocking service ? yes, this is a prediction server, which would be deployed in PROD environment, the client application would request the prediction server for results as scores. You can think it as online rec

Question about deployment of math computing

2020-08-04 Thread Wesley Peng
Hi We do math programming (so called machine learning today) in webserver. The response would be slow, generally it will take 100ms~500ms to finish a request. For this use case, shall we deploy the code within preforked modperl ,or event-driven server like dancer/starman? (we don't use DB like

Re: suggestions for perl as web development language [EXT]

2020-08-04 Thread Wesley Peng
jbiskofski wrote: Excelent, stable, FAST, production ready HTTP server: Starman yes starman is good. we use it for rest-api service, the app code is dancer, whose backend server is starman. if we need more concurrent handlers, a simple front-proxy like nginx would be deployed. regards.

Re: suggestions for perl as web development language [EXT]

2020-08-04 Thread Wesley Peng
Hi Mark Blackman wrote: mod_perl’s relative efficiency can be achieved by other well-known means. for example? thank you.

Re: suggestions for perl as web development language [EXT]

2020-08-04 Thread Wesley Peng
Joseph He wrote: My company uses Perl for web development. It handles real time payment transactions without any problem. Good software is made by the people not by the language. Maybe I am weak on this point, but how perl handle types more strictly? for example, 123 + '456' this is permi

suggestions for perl as web development language

2020-08-03 Thread Wesley Peng
greetings, My team use all of perl, ruby, python for scripting stuff. perl is stronger for system admin tasks, and data analysis etc. But for web development, it seems to be not as popular as others. It has less selective frameworks, and even we can't get the right people to do the webdev job wi

Re: POST large amount of data causes segmentation fault

2020-02-14 Thread wesley
If posted size has exceeded, what will happen by SizeLimit? Thanks Gesendet mit der Telekom Mail App -Original-Nachricht- Von: Russell Lu

Re: how to run regex calculation

2020-01-09 Thread Wesley Peng
what does (??{$1*$2}) means? Thanks. on 2020/1/9 12:49, Joseph He wrote: I think $str =~ /(\d+)\s(\d+)\s(??{$1*$2})/   should do it My Perl version is  v5.26.1

Re: how to run regex calculation

2020-01-09 Thread Wesley Peng
Hallo on 2020/1/9 16:35, demerphq wrote: $str=~/(\d+)\s(\d+)\s(\1*\2)/ $1 refers to the capture buffers from the last completed match, \1 inside of the pattern part of a regex refers to the capture buffer of the currently matching regex. This doesn't work too. perl -Mstrict -le 'my $str = "2

Re: how to improve throughput for long time running sessions

2020-01-08 Thread Wesley Peng
Any more details? regards on 2020/1/9 14:11, Mithun Bhattacharya wrote: You need to split the request handler and the request processor. Receive the request in mod_perl and then queue it into a separate application which does the actual heavy lifting.

Re: what's difference between HTTP_HOST and SERVER_NAME

2020-01-08 Thread Wesley Peng
Hi on 2020/1/9 14:14, Mithun Bhattacharya wrote: This is for PHP but it still applies. https://www.geeksforgeeks.org/what-is-the-difference-between-http_host-and-server_name-in-php/ This is good reference. Thanks.

Re: AW: Question on a rewrite rule

2020-01-08 Thread Wesley Peng
Hi on 2020/1/9 14:27, Andreas Mock wrote: You have to see in which virtualhost section this rule was put into. I'm pretty sure it's only in the http section. You are so right. they are put in plain HTTP section. So requets were coming with HTTP, they will be rewriten to HTTPS, which is in ano

gRPC implement question

2020-01-08 Thread Wesley Peng
Hello is there a full gRPC implementation in perl rather than this protocal buffer library? https://metacpan.org/pod/Google::ProtocolBuffers::Dynamic Thanks.

DB connection pool management

2020-01-08 Thread Wesley Peng
Hallo Is there DB connection pool management library like JDBC for mod_perl? I know there is Apache::DBI, but that seems not the one who have pool capability. Thanks & happy new year. Regards.

how to improve throughput for long time running sessions

2020-01-08 Thread Wesley Peng
Hallo We are running LR[1] and GBDT[2] and similar algorithm in MP2 handles. For each request, there were about 1000 features as arguments passed into the handles, via HTTP POST. The request will wait for about 100ms to get responses, coz the calculation is not cheap. My question is, how can w

Question on a rewrite rule

2020-01-08 Thread Wesley Peng
Hello After installation of Letsencrypt free SSL, it adds a rule into apache's config file: RewriteCond %{SERVER_NAME} =sample.com RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] I know it means when SERVER_NAME is sample.com, it rewrites the plain HTTP request to HT

what's difference between HTTP_HOST and SERVER_NAME

2020-01-08 Thread Wesley Peng
Hello For HTTP headers, what's difference between HTTP_HOST and SERVER_NAME? I was long time confused about them. Thanks.

how to run regex calculation

2020-01-08 Thread Wesley Peng
Hello Give the case I have a string, $str = "2 3 6"; I want to match with: true if $str =~ /(\d+)\s(\d+)\s($1*$2)/; that's to say, the thrid column would be (firstCol * SecondCol). How to write regex for this? Thank you.

Re: [ANNOUNCE] mod_perl-2.0.11

2019-10-12 Thread Wesley Peng
Edward J. Sabol wrote: Except we're actually upgrading from Apache 2.2.34 to 2.4.41, and all the tests pass with 2.2.34 (I just ran them again and verified this), so this is kind of a new issue for us, but I'm happy to trust in the experiences of other folks who have running using mod_perl with A

Re: [OT] [RELEASE CANDIDATE] mod_perl-2.0.11 RC2

2019-09-26 Thread Wesley Peng
on 2019/9/26 18:32, André Warnier (tomcat) wrote: Not being able myself to contribute really to this process, I did not comment on the previous emails here. But as a grateful user of mod_perl for many years, I just want to express my immense gratitude to Steve and all other people who contri