Re: reasons for modperl declines? ... pagination

2024-08-09 Thread Mithun Bhattacharya
switch from a IN clause to a temporary table and do a join. On Sat, Aug 10, 2024, 12:54 AM Guido Brugnara wrote: > Il 09/08/24 20:28, Mithun Bhattacharya ha scritto: > > First one is expensive and s cond is inefficient. Instead get the max and > min and split the numbers into appropriate

Re: reasons for modperl declines? ... pagination

2024-08-09 Thread Mithun Bhattacharya
First one is expensive and s cond is inefficient. Instead get the max and min and split the numbers into appropriate batch. So if it is 345 to 25636 then 345 - 1345, 1346-2345 and so on and so forth. Why is the second querry inefficient because the IN clause is much slower than doing a between on t

Re: reasons for modperl declines?

2024-08-08 Thread Mithun Bhattacharya
Oh I am referring to twenty years ago when if you wanted to maintain your sanity you don't let Cpanel touch your regular Apache configuration, let alone one with mod_perl configured. On Thu, Aug 8, 2024, 4:49 PM Jeff Pang wrote: > In now days configuration is not a hard job if you like to learn.

Re: reasons for modperl declines?

2024-08-08 Thread Mithun Bhattacharya
So I am a mod_perl user for about 25 years now - pretty much I started with perl and mod_perl together :) Looking at the conversation I can see it is diverging into two parts - one what to do with mod_perl and in general concerns with Perl. Yes we have alternatives to mod_perl and you should defi

Re: HTTPd Devs Considered Harmful to Apache2::Request users

2024-02-18 Thread Mithun Bhattacharya
/orion/features> > Orion - The Enterprise Jamstack Wiki > <https://sunstarsys.com/orion/features> > > 954.253.3732 > > > > > On Sun, Feb 18, 2024 at 4:32 PM Mithun Bhattacharya > wrote: > >> Could you clarify this - 2.17 has a critical bug and 2.18 is abo

Re: HTTPd Devs Considered Harmful to Apache2::Request users

2024-02-18 Thread Mithun Bhattacharya
wrote: > Trunk is the safe bet. > > Joe Schaefer, Ph.D. > <https://sunstarsys.com/orion/features> > Orion - The Enterprise Jamstack Wiki > <https://sunstarsys.com/orion/features> > > 954.253.3732 > > > > > On Sun, Feb 18, 2024 at 2:11 PM Mithun

Re: HTTPd Devs Considered Harmful to Apache2::Request users

2024-02-18 Thread Mithun Bhattacharya
Also thank you for the library ! On Sun, Feb 18, 2024, 1:11 PM Mithun Bhattacharya wrote: > So is there a cleaner/saner version of libapreq2 or is the 2012 version > better ? > > On Sun, Feb 18, 2024, 12:58 PM Joe Schaefer wrote: > >> For the past 25 years, I have been

Re: HTTPd Devs Considered Harmful to Apache2::Request users

2024-02-18 Thread Mithun Bhattacharya
So is there a cleaner/saner version of libapreq2 or is the 2012 version better ? On Sun, Feb 18, 2024, 12:58 PM Joe Schaefer wrote: > For the past 25 years, I have been the lead developer of the libapreq2 > subproject within the Apache HTTPd Server Parent Project. The original idea > of libapreq

Re: Confusion about SQL results - row counts and contents differ

2023-01-26 Thread Mithun Bhattacharya
Instead of COUNT(*) what do you see when you do a SELECT * ? On Thu, Jan 26, 2023, 6:07 PM Perrin Harkins wrote: > Maybe you haven't committed some manual change on the server, so it isn't > visible to other connections. > > On Thu, Jan 26, 2023 at 8:56 PM Steven Haigh via modperl < > modperl@pe

Re: mod_perl and mod_python

2022-08-19 Thread Mithun Bhattacharya
That is because unlike mod_perl mod_python doesn't integrate deeply into Apache and you can't extend every HTTP request cycle phases. Only two programming languages integrate that deeply - C and Perl. On Fri, Aug 19, 2022, 7:19 PM pengyh wrote: > I know perl and python a bit well, most time use

Re: PerlAccessHandler for POST access

2022-08-04 Thread Mithun Bhattacharya
-d "param1=value1¶m2=value2" On Thu, Aug 4, 2022 at 12:29 AM pengyh wrote: > > > > > You need to share the complete GET & POST request with the data section. > > OK as you can test this GET works: > > > http://fb.cloudcache.net/?timestamp=12345&authkey=906434463477769dba188a4b670ef425 > > but

Re: PerlAccessHandler for POST access

2022-08-04 Thread Mithun Bhattacharya
It only means that Apache::Request did not parse your POST request correctly. It is not form encoded or there is a typo. You need to share the complete GET & POST request with the data section. On Wed, Aug 3, 2022 at 5:52 AM pengyh wrote: > > > > > Have you checked that the values of $key and $

Re: how to enable SSL for a handler

2022-07-02 Thread Mithun Bhattacharya
You don't enable SSL for a endpoint you do it for a host/port combination. All endpoints under that virtual host is SSL enabled. On Sat, Jul 2, 2022, 9:01 PM Yong Walt wrote: > Hello > > When I run certbot --apache for modperl handler service, it doesn't work. > So how can I setup letsencrypt SS

Re: path recognition question

2022-05-16 Thread Mithun Bhattacharya
You still have $r->path just pull the id from it ? On Thu, May 5, 2022, 4:20 PM Michael A. Capone wrote: > (Sorry for the late reply, been out of town) > > Recognizing that I've never gone as indepth with mod_perl as other users, > but it seems to me that accessing "id" here would just be a matt

Re: Fixing Apache::ReadConfig limitations

2021-04-16 Thread Mithun Bhattacharya
Doesnt it accept array of array refs for this purpose ? On Fri, Apr 16, 2021 at 1:10 PM John A. wrote: > Presently, Apache::ReadConfig doesn't seem to provide a way to represent > the order of directives, which limits its usefulness when used with > modules like mod_rewrite that rely on the orde

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

2021-02-09 Thread Mithun Bhattacharya
hich you open/close on a per request > basis gives you the benefits of caching without the risks involved [other > than the “lock table” issue]. > > > > > > *From:* Mithun Bhattacharya > *Sent:* 09 February 2021 18:34 > *To:* mod_perl list > *Subject:* Re: Moving E

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

2021-02-09 Thread Mithun Bhattacharya
Connection caching does work for most use cases - we have to accept James works in scenarios most developers can't fathom :) If you are just firing off simple SQL's without any triggers or named temporary tables involved you should be good. The only times we recall tripping on cached connection is

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

2021-02-07 Thread Mithun Bhattacharya
DBI sharing has it's own issues but in most use cases it does a pretty good job and keeps the DBA's happy - that is very important ;) On Sun, Feb 7, 2021 at 2:23 PM 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 ac

Re: perl's pulsar client

2021-01-26 Thread Mithun Bhattacharya
This seems to demonstrate Pulsar with mojo. https://www.perlmonks.org/?node_id=11123636 On Tue, 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 per

Re: Confused about two development utils [EXT]

2021-01-01 Thread Mithun Bhattacharya
Preload of what doesnt work ? On Fri, Jan 1, 2021 at 10:08 AM Ruben Safir wrote: > > > > This isn’t quite true - if you load modules before the process forks > then they can cleverly share the same parts of memory. It is useful to be > able to "pre-load" core functionality which is used across a

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

2020-12-30 Thread Mithun Bhattacharya
Choice of Programming language is totally up to you :) As for security SSL shouldnt be your only protection and all authorization/authentication will have to be implemented in the internal service. On Wed, Dec 30, 2020 at 7:19 AM Tom Browder wrote: > On Sun, Dec 20, 2020 at 2:03 PM Mit

Re: Confused about two development utils [EXT]

2020-12-23 Thread Mithun Bhattacharya
James would you be able to share more info about your setup ? 1. What exactly is your application doing which requires so much memory and CPU - is it something like gene splicing (no i don't know much about it beyond Jurassic Park :D ) 2. Do you feel Perl was the best choice for whatever you are do

Re: Confused about two development utils

2020-12-22 Thread Mithun Bhattacharya
lient's real IP. > 2. Since I am querying PTR via a stub resolver (such as 8.8.8.8), I guess > this public dns server has already cached the result. right? > > Regards. > > > On Wed, Dec 23, 2020 at 9:08 AM Mithun Bhattacharya > wrote: > >> Replying to the DL.

Re: Confused about two development utils

2020-12-22 Thread Mithun Bhattacharya
Replying to the DL. On Tue, Dec 22, 2020 at 7:07 PM Mithun Bhattacharya wrote: > $r->connection->client_ip would report your proxy server if you have a > reverse proxy setup - this is not a common use case though. > > DNS lookup would usually be an expensive process and you ar

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

2020-12-22 Thread Mithun Bhattacharya
Can you just shut up and unsubscribe from a Perl mailing list? On Tue, Dec 22, 2020, 4:24 PM derrick wrote: > Why PERL at all anyway? Dump PERL. >

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

2020-12-22 Thread Mithun Bhattacharya
Sounds like a classic use case for Kafka - your service should publish when done and your clients should subscribe to their relevant topics. This is not going to be scalable even with websockets. On Tue, Dec 22, 2020 at 9:06 AM John Dunlap wrote: > We have hundreds of users polling our servers e

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

2020-12-22 Thread Mithun Bhattacharya
Forking is not inefficient unless you work on Windows. Threads are more complicated to code for - thread safe coding is a thing. Agreed web sockets are lacking but they are not essential in all modern application. I think we have discussed this topic enough and nothing new is being shared on the

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

2020-12-21 Thread Mithun Bhattacharya
Making a wild guess here - most RDBMS won't like it if you make thousands of queries per second across 500 tables every second. Can this be done - yes but most setup's aren't tuned to be able to handle such a scenario. If I was doing something like this I can imagine quite a few places which would

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

2020-12-20 Thread Mithun Bhattacharya
ontrast, will only have a > single thread per request. > > On Sun, Dec 20, 2020, 3:33 PM Mithun Bhattacharya > wrote: > >> You would have to define poor system performance - are you doing anything >> cpu intensive at all ? Maybe your RAM is being the bottleneck ? >

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

2020-12-20 Thread Mithun Bhattacharya
2 cores and 64G of ram and I commonly see poor system > performance with less than 25% cpu utilization. > > On Sun, Dec 20, 2020, 2:22 PM Mithun Bhattacharya > wrote: > >> Agreed prefork is recommended but what is the problem with that ? >> >> On Sun, Dec 20, 2020 at

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

2020-12-20 Thread Mithun Bhattacharya
-certbot-apache On Sun, Dec 20, 2020 at 1:45 PM Tom Browder wrote: > On Sun, Dec 20, 2020 at 11:29 Mithun Bhattacharya > wrote: > >> Just curious where exactly is the challenge in this setup ? It can't be >> in apache supporting real certificates - neither can it be in s

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

2020-12-20 Thread Mithun Bhattacharya
Agreed prefork is recommended but what is the problem with that ? On Sun, Dec 20, 2020 at 12:47 PM John Dunlap wrote: > Our app segfaults at random of we use anything other than prefork. > > On Sun, Dec 20, 2020, 1:32 PM Mithun Bhattacharya > wrote: > >> I am confused

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

2020-12-20 Thread Mithun Bhattacharya
I am confused - you like threads so Perl is bad ? I am very happy forking away and yes I work a lot with non thread safe DBI connections without any issues. On Sun, Dec 20, 2020 at 11:53 AM John Dunlap wrote: > In my opinion, no one should build new projects in Perl. The world is > increasingly

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

2020-12-20 Thread Mithun Bhattacharya
Just curious where exactly is the challenge in this setup ? It can't be in apache supporting real certificates - neither can it be in setting up reverse proxy internally... On Sun, Dec 20, 2020 at 11:19 AM Tom Browder wrote: > > > On Sun, Dec 20, 2020 at 09:33 Steven Lembark wrote: > >> On Tue,

Re: cache a object in modperl

2020-09-13 Thread Mithun Bhattacharya
eeded - IANA I could hit every 30 min to check for update :) On Mon, Sep 14, 2020 at 12:44 AM Wesley Peng wrote: > > > 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 t

Re: cache a object in modperl

2020-09-13 Thread Mithun Bhattacharya
your service or refresh your local cache depending upon how you solve it. On Mon, Sep 14, 2020 at 12:34 AM Wesley Peng wrote: > Hello > > Mithun Bhattacharya wrote: > > How frequently do you wish to refresh the cache ? if you do in startup > > then your cache refresh i

Re: cache a object in modperl

2020-09-13 Thread Mithun Bhattacharya
Startup is not a great idea if your webserver is up forever - I have some which are running for months. 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. On Mon, Sep 14, 2020 at 12:26

Re: cache a object in modperl

2020-09-13 Thread Mithun Bhattacharya
Your cache would have to be independent of mod_perl - I would suggest saving to a REDIS instance ? On Sun, Sep 13, 2020 at 9:51 PM Wesley Peng wrote: > Hello > > I am not so familiar with modperl. > > For work requirement, I need to access IANA TLD database. > > So I wrote this perl module: > ht

Re: Question about deployment of math computing

2020-08-06 Thread Mithun Bhattacharya
500, Mithun Bhattacharya wrote: > > Assuming that is genuine curiosity can we please not deviate from the > topic > > ? > > > > On Wed, Aug 5, 2020 at 6:19 AM Ruben Safir wrote: > > > > > On Wed, Aug 05, 2020 at 09:46:18AM +0800, Wesley Peng wrote: > &g

Re: Question about deployment of math computing

2020-08-05 Thread Mithun Bhattacharya
Assuming that is genuine curiosity can we please not deviate from the topic ? On Wed, Aug 5, 2020 at 6:19 AM Ruben Safir wrote: > On Wed, Aug 05, 2020 at 09:46:18AM +0800, Wesley Peng wrote: > > Hi > > > > Mithun Bhattacharya wrote: > > >Do you really need a

Re: Question about deployment of math computing

2020-08-04 Thread Mithun Bhattacharya
Do you really need a webserver which is providing a blocking service ? Assuming you are doing some sort of map reduce you would be better of creating a job queue and placing requests into it. You would have a separate consumer of the queue which could scale up or down depending upon how long the j

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

2020-08-04 Thread Mithun Bhattacharya
w create something just as fast in Perl. > > > > On Tue, Aug 4, 2020 at 5:59 PM Mithun Bhattacharya > wrote: > >> The question is move off to what ? I don't see alternatives being shared >> which blows an apache+mod_perl setup out of the water. >> >> O

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

2020-08-04 Thread Mithun Bhattacharya
Haha my service is meant to be a blackbox - of course it talks to three different REST services :) On Tue, Aug 4, 2020 at 8:05 PM Ruben Safir wrote: > On Tue, Aug 04, 2020 at 07:59:01PM -0500, Mithun Bhattacharya wrote: > > The question is move off to what ? I don't see alte

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

2020-08-04 Thread Mithun Bhattacharya
4 Aug 2020, at 21:41, Mithun Bhattacharya wrote: > > > > > > I am genuinely curious what are these other "well known" means ? > > > > > > On Tue, Aug 4, 2020 at 3:37 PM Mark Blackman <mailto:m...@blackmans.org>> wrote: > > >

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

2020-08-04 Thread Mithun Bhattacharya
Just because the language lets you to relax doesn't mean you shouldn't apply strict validation of all data being worked on :) I don't care about it in a two line cron job but more critical components spend a lot of time on data validation - I am pretty much working in paranoid mode. If you use Moo

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

2020-08-04 Thread Mithun Bhattacharya
vices cropping up like mushrooms. On Tue, Aug 4, 2020 at 4:05 PM Mark Blackman wrote: > > > On 4 Aug 2020, at 21:55, Mithun Bhattacharya wrote: > > Ours is a REST based service so every request has business logic and an > apache+mod_perl instance actually has a better segregation of t

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

2020-08-04 Thread Mithun Bhattacharya
lity ? On Tue, Aug 4, 2020 at 3:48 PM Mark Blackman wrote: > > > On 4 Aug 2020, at 21:41, Mithun Bhattacharya wrote: > > I am genuinely curious what are these other "well known" means ? > > On Tue, Aug 4, 2020 at 3:37 PM Mark Blackman wrote: > >> >>

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

2020-08-04 Thread Mithun Bhattacharya
I am genuinely curious what are these other "well known" means ? On Tue, Aug 4, 2020 at 3:37 PM Mark Blackman wrote: > > > > On 4 Aug 2020, at 17:58, Mithun Bhattacharya wrote: > > > > mod_perl does have value because it does a more efficient utilization of &g

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

2020-08-04 Thread Mithun Bhattacharya
mod_perl does have value because it does a more efficient utilization of resources - this is important when fast response time and scalability is important. The complexity is a known problem but it is not a mystery box either - there is enough documentation which explains what has to happen and wha

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

2020-08-04 Thread Mithun Bhattacharya
And the point is it is getting very hard to find good perl programmers. It is much easier to find python programmers who can get the job done. On Tue, Aug 4, 2020 at 11:43 AM Joseph He wrote: > My company uses Perl for web development. It handles real time payment > transactions without any prob

Re: suggestions for perl as web development language

2020-08-03 Thread Mithun Bhattacharya
I think all languages have lost the battle to nodejs. Most popular frameworks are angular and react - it is hard to beat them when everyone seems to be able to throw out a single page application without much effort. On Tue, Aug 4, 2020, 12:43 AM Wesley Peng wrote: > greetings, > > My team use a

Re: what's difference between HTTP_HOST and SERVER_NAME

2020-01-08 Thread Mithun Bhattacharya
This is for PHP but it still applies. https://www.geeksforgeeks.org/what-is-the-difference-between-http_host-and-server_name-in-php/ On Wed, Jan 8, 2020 at 8:39 PM Wesley Peng wrote: > Hello > > For HTTP headers, what's difference between HTTP_HOST and SERVER_NAME? > > I was long time confused

Re: how to improve throughput for long time running sessions

2020-01-08 Thread Mithun Bhattacharya
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. On Wed, Jan 8, 2020 at 8:59 PM Wesley Peng wrote: > Hallo > > We are running LR[1] and GBDT[2] and similar algorithm

Re: DB connection pool management

2020-01-08 Thread Mithun Bhattacharya
Connection pooling is implemented in DBI and enabled on need basis and in Apache::DBI it is enabled by default. On Wed, Jan 8, 2020 at 9:04 PM Wesley Peng wrote: > Hallo > > Is there DB connection pool management library like JDBC for mod_perl? > I know there is Apache::DBI, but that seems not t

Re: Streaming files

2019-08-16 Thread Mithun Bhattacharya
1. Streaming in chunks has nothing to do with security - you should have proper authentication and authorization layer wrapping these requests. 2. Handling chunks and large files are things which apache has perfected and we usually let apache do the nitty gritty. After all the validations are

Re: ServerAlias has maximum length ?

2017-10-02 Thread Mithun Bhattacharya
Related but not completely we have a apache config written in Perl which refuses to honor our PerlPassEnv beyond a certain string length - it is bad enough for us to actively consider not writing our Apache config in Perl even though it provides a lot of flexibility. On Mon, Oct 2, 2017 at 9:06 AM

Re: about request route

2017-08-07 Thread Mithun Bhattacharya
Another way to look at this is Apache has hooks for the location - that is the URI you are requesting. Apache doesn't care whether you do a GET or a POST/PUT to it and it is left to the underlying subsytems to manage it - which is your case would be mod_perl. You can easily have the handler do a if

Re: How to pre-open files in apache's processes

2010-12-01 Thread Mithun Bhattacharya
Can you confirm the error you are encountering using your current method ? I would like to understand what you are trying to achieve by having a global file handle - do you want to have modular code or does the content of the file somehow determine which handler to be used ? You can have modula

Re: Fw: Apache2::ReadConfig and RewriteRule

2010-11-30 Thread Mithun Bhattacharya
perl2 using Apache2::ReadConfig . - Mithun From: Torsten Förtsch To: modperl@perl.apache.org; Mithun Bhattacharya Cc: Sent: Tuesday, November 30, 2010 7:19:27 AM Subject: Re: Fw: Apache::ReadConfig and RewriteRule The only thing I can answer here is ${r|s}->add_config excepts a

Fw: Apache::ReadConfig and RewriteRule

2010-11-30 Thread Mithun Bhattacharya
Maybe I asked too silly a question or I asked it incorrectly but I am hoping someone can point me in the right direction for this ? - Mithun - Forwarded Message - From: Mithun Bhattacharya To: "modperl@perl.apache.org" Cc: Sent: Wednesday, November 24, 2010 3:15:56

Apache::ReadConfig and RewriteRule

2010-11-24 Thread Mithun Bhattacharya
Hi, I am trying to setup some rules using Apache::ReadConfig (to setup Apache config using mod_perl) and was wondering how am I supposed to define the RewriteCond and RewriteRule entries. I would like to implement something similar to the following inside a VirtualHost. RewriteEngine on Rewr