Sponsored Content
Full Discussion: Connection pooling in perl
Top Forums Shell Programming and Scripting Connection pooling in perl Post 302116451 by cbkihong on Friday 4th of May 2007 02:14:02 AM
Old 05-04-2007
For CGI-based Web application, most likely you can't because CGI scripts are executed fresh as a process with each access. All connections must be closed when the script is complete. So pooling has little use here.

You probably can implement it with mod_perl though. By designing your own mod_perl handler, you may likely implement this functionality as mod_perl handlers are persistent across requests. I have little experience with mod_perl, so I cannot give you much information.

But before you start implementing it yourself, take a look at these modules first. They should satisfy your requirements.

http://search.cpan.org/~pgollucci/Ap.../Apache/DBI.pm
http://search.cpan.org/~mws/Resource...sourcePool.pod
http://search.cpan.org/~mws/Resource...ce-DBI-1.0101/

Last edited by cbkihong; 05-04-2007 at 03:23 AM..
 

10 More Discussions You Might Find Interesting

1. Programming

Connection Pooling

Hi , Could anyone suggest how do you implement a Connection pool in C? Connection pool to store/reuse connections to any resource manager .. database, MQSeries. How is this done? Regards, VJ (0 Replies)
Discussion started by: vjsony
0 Replies

2. Programming

Thread pooling in cpp on gnu linux

I m newb to thread pooling. I have to create a cpp application using thread pooling for gnu/linux machine. I didn't get too much on the net. Can any one give me the references to source code or conceptual document of thread pooling in cpp for gnu/linux. Any help will be appreciated. (4 Replies)
Discussion started by: ps_sach
4 Replies

3. UNIX for Dummies Questions & Answers

ssh_exchange_identification: Connection closed by remote host Connection closed

Hi Everyone, Good day. Scenario: 2 unix servers -- A (SunOS) and B (AIX) I have an ftp script to sftp 30 files from A to B which happen almost instantaneously i.e 30 sftp's happen at the same time. Some of these sftp's fail with the following error: ssh_exchange_identification: Connection... (1 Reply)
Discussion started by: jeevan_fimare
1 Replies

4. UNIX for Advanced & Expert Users

Connection reset by peer..closing connection

Hello I'm facing the above problem while doing a performance run. I've a script which I'm launching from my windows desktop using mozilla. The script will invoke backend action on a Solaris host which in turn feeds the records to a driver located on a linux box(Cent OS). What's happening is... (1 Reply)
Discussion started by: subramanyab
1 Replies

5. Solaris

Solaris 10 ftp connection problem (connection refused, connection timed out)

Hi everyone, I am hoping anyone of you could help me in this weird problem we have in 1 of our Solaris 10 servers. Lately, we have been having some ftp problems in this server. Though it can ping any server within the network, it seems that it can only ftp to a select few. For most servers, the... (4 Replies)
Discussion started by: labdakos
4 Replies

6. UNIX for Dummies Questions & Answers

SSH Connection under Perl

Hi guys, I have an Active Perl version 5.12.2.1203 installed on my PC, I have a script that will perform some commands to the remote server by using SSH connection from local PC to remote server. I've found out that the Active Perl installed on my PC does not support such module, it only allows... (1 Reply)
Discussion started by: rymnd_12345
1 Replies

7. UNIX for Dummies Questions & Answers

Error Handling using ISQL for oracle connection in Perl

Hi Am making connection to oracle using ISQL as shown in the code. This code is just a minor part of a big code. I want to capture the error if the password/login is wrong or if connection is not made. I need to capture the error code also. Also, If such an error occurs, i need to exit out... (4 Replies)
Discussion started by: irudayaraj
4 Replies

8. Shell Programming and Scripting

Perl Oracle connection error

I've a Centralized Server which can connect to all Oracle Databases. When I was trying the below code it doesn't work, But tnsping was working fine. #!D:/perl5/bin/perl.exe use DBI; my $dbh = DBI->connect('dbi:Oracle:QBDIWCE', 'IDUSER', 'SECRET123#' ) || die( $DBI::errstr . "\n" ) ; ... (1 Reply)
Discussion started by: ilugopal
1 Replies

9. UNIX for Advanced & Expert Users

How keep running a program n an another computer via a connection ssh when the connection is closed?

Hi everybody, I am running a program on a supercomputer via my personal computer through a ssh connection. My program take more than a day to run, so when I left work with my PC I stop the connection with the supercomputer and the program stop. I am wondering if someone know how I can manage... (2 Replies)
Discussion started by: TomTomGre
2 Replies

10. Shell Programming and Scripting

Restrict remote DB connection from PERL

I have PERL code to connect to Oracle database using DBI. e.g. $PERL -e "use DBI; DBI->connect(qw(DBI:Oracle:db111 testu testpass));" by using DBI , if remote DB added to tnsnames.ora , I can connect using DBI . is there a way to restrict not to connect to remote DB using DBI ? ... (1 Reply)
Discussion started by: talashil
1 Replies
MPSCNNPoolingMaxGradient(3)				 MetalPerformanceShaders.framework			       MPSCNNPoolingMaxGradient(3)

NAME
MPSCNNPoolingMaxGradient SYNOPSIS
#import <MPSCNNPooling.h> Inherits MPSCNNPoolingGradient. Instance Methods (nonnull instancetype) - initWithDevice:kernelWidth:kernelHeight:strideInPixelsX:strideInPixelsY: (nullable instancetype) - initWithCoder:device: Additional Inherited Members Detailed Description This depends on Metal.framework Specifies the filter for computing the gradient of the max pooling filter. The operation backpropagates a gradient vector using chain rule. Dilated Max pooling forward pass is defined as: out(x) = max_{dx in Window(x)} in(s*x+D*dx), where the pooling window definition 'Window(x)' follows MPSCNNPooling specification, 's' is the pixel stride and in() is the source input image and D is the dilation factor. For MPSCNNPoolingMaxGradient the dilationRate 'D' is one. NOTE: For even-sized pooling windows with dilation rate greater than one the effective pooling window is centered around s*x with non-even windows leaning towards top-left corner. For example if kernel width = 2, dilation rate = 3, then the pooling considers positions '-2' and '+1' relative to the pooling window center 's*x'. Hence the partial derivative of the output value wrt. to the input value needed in the gradient backpropagation in MPSCNNPoolingGradient is: d out(x)/d in(y) = delta_{x_m, y}, where delta_{x,y} is the Kronecker delta symbol (see MPSCNNPoolingAverageGradient) and x_m is the index of the maximum value in the corresponding pooling window. In practice this means that the gradient value for the destination image at pixel 'x' is the sum over these contributions coming from all pooling windows that contribute to the max pooling computation in the forward pass, multiplied by the input gradient value in the source area of the corresponding pooling window. If there are multiple maximal values within a single pooling window one of them is picked for the gradient and this decision is implementation specific, which means that it can vary between different architectures and even between different filter parameters. Note: The gradient max pooling needs the secondary input image in order to compute the indices of maximal values for each pooling window, but this means redundant computations. Later we may add encode calls to MPSCNNPoolingMax that produce a state that contains the coordinates of the maximal values to be consumed by the gradient filters. Method Documentation - (nullable instancetype) initWithCoder: (NSCoder *__nonnull) aDecoder(nonnull id< MTLDevice >) device NSSecureCoding compatability See MPSKernel::initWithCoder. Parameters: aDecoder The NSCoder subclass with your serialized MPSCNNPoolingMaxGradient device The MTLDevice on which to make the MPSCNNPoolingMaxGradient Returns: A new MPSCNNPoolingMaxGradient object, or nil if failure. Reimplemented from MPSCNNPoolingGradient. - (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device(NSUInteger) kernelWidth(NSUInteger) kernelHeight(NSUInteger) strideInPixelsX(NSUInteger) strideInPixelsY Initialize a gradient max pooling filter Parameters: device The device the filter will run on kernelWidth The width of the kernel. Can be an odd or even value. kernelHeight The height of the kernel. Can be an odd or even value. strideInPixelsX The input stride (upsampling factor) in the x dimension. strideInPixelsY The input stride (upsampling factor) in the y dimension. Returns: A valid MPSCNNPoolingGradient object or nil, if failure. Reimplemented from MPSCNNPoolingGradient. Author Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code. Version MetalPerformanceShaders-100 Thu Feb 8 2018 MPSCNNPoolingMaxGradient(3)
All times are GMT -4. The time now is 04:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy