Thanks.

Ilya

> -----Original Message-----
> From: Michael Peppler [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 09, 2001 6:50 PM
> To: Sterin, Ilya
> Cc: Michael Peppler; [EMAIL PROTECTED]
> Subject: RE: background sql queries
>
>
> Sterin, Ilya writes:
>  >
>  >
>  > > -----Original Message-----
>  > > From: Michael Peppler [mailto:[EMAIL PROTECTED]]
>  > > Sent: Thursday, August 09, 2001 6:11 PM
>  > > To: [EMAIL PROTECTED]
>  > > Subject: RE: background sql queries
>  > >
>  > >
>  > > Sterin, Ilya writes:
>  > >  > Guess I'm more convinced now of the benefits.  The
>  > > notification model would
>  > >  > probably be more efficient (timing wise), in my opinion,
>  > > though both should
>  > >  > be OK without possibility of collisions.  Is there a way to
>  > > implement this
>  > >  > on the DBD level without touching DBI, since not all DBMS's
>  > > support this and
>  > >  > if they do, in the same way.
>  > >
>  > > The downside of the notication model (at least at the Sybase API
>  > > level) is that it is signal based, and I don't know how well
> this will
>  > > work with perl's signal handling.
>  > >
>  > > Right now I'm playing around with adding the polling model to
>  > > Sybase::CTlib. Once that works I'll look into what needs to be done
>  > > for DBD::Sybase to handle this (via $dbh->func() calls, to start
>  > > off).
>  > >
>  >
>  > That would do great benefits.  I can look into signal handling on both
>  > sides, but probably not till next Wednesday, since I am on
> vacation starting
>  > tomorrow, though I'll have my laptop with dial up access, not
> sure if I will
>  > be allowed to use it:)
>  >
>  > I am not familiar with Sybase libs, but I'll investigate the
> signal handling
>  > of its notification model and the problems they might cause
> when mangled
>  > with perl's SIGs.  This will hopefully be a pathway to other
> DBDs of DBMSs
>  > that support it.
>  >
>  > Michael can you point me in the right direction too look in
> the Sybase libs,
>  > so that I don't spend another week searching:)  Thanks.
>
> Manuals are at http://www.sybase.com/support/manuals/ and the
> OpenClient 10.0.x version is at
> http://sybooks.sybase.com/cng1000e.html.
>
> You can download the linux version of Sybase 11.0.3.3 and OpenClient
> 10.x from http://linux.sybase.com (you can also download more recent
> versions 11.9.2 and 12.5, but they are much bigger, and won't add any
> functionality in this case)
>
> There's also an NT version available, I believe.
>
> Have fun :-)
>
> Michael
>
>
>  > >  > -----Original Message-----
>  > >  > From: Michael Peppler
>  > >  > To: [EMAIL PROTECTED]
>  > >  > Sent: 8/9/01 11:12 AM
>  > >  > Subject: RE: background sql queries
>  > >  >
>  > >  > Sterin, Ilya writes:
>  > >  >  > True, I wonder if that would greatly benefit DBI, I
> can't see a case
>  > >  > where
>  > >  >  > it would prove better than threading/forking.  It
> would still fork
>  > >  >  > internally in the DBD though, right?
>  > >  >
>  > >  > No - it'd use non-blocking IO to communicate with the server. The
>  > >  > Sybase OC libs can do this either using a polling model (send the
>  > >  > request, and then poll at intervals to see if there is
> anything to be
>  > >  > processed (sort of like select())), or via a notification model
>  > >  > (register a notification callback, which gets called when an async
>  > >  > request completes).
>  > >  >
>  > >  > Meanwhile the main code line can do other things.
>  > >  >
>  > >  > I haven't felt the need to use this up to now, but I may
> add this to
>  > >  > the Sybase::CTlib module for the next release.
>  > >  >
>  > >  > Michael
>  > >  >
>  > >  >
>  > >  >  > -----Original Message-----
>  > >  >  > From: Michael Peppler
>  > >  >  > To: [EMAIL PROTECTED]
>  > >  >  > Sent: 8/9/01 10:47 AM
>  > >  >  > Subject: RE: background sql queries
>  > >  >  >
>  > >  >  > Sterin, Ilya writes:
>  > >  >  >  > Well that's called forking.  Weather you implement
> yourself, or
>  > >  > DBD's
>  > >  >  >  > implement for you, you still must fork or spawn a
> thread in order
>  > >  > to
>  > >  >  > do
>  > >  >  >  > anything while the processing in progress.
>  > >  >  >
>  > >  >  > Actually you could do that if DBI (and the driver) supported
>  > >  >  > asynchronous calls...
>  > >  >  >
>  > >  >  > Michael
>  > >  >  >
>  > >  >  >
>  > >  >  >  > -----Original Message-----
>  > >  >  >  > From: Giotto De Filippi
>  > >  >  >  > To: Sterin, Ilya; '[EMAIL PROTECTED] '
>  > >  >  >  > Sent: 8/9/01 8:22 AM
>  > >  >  >  > Subject: RE: background sql queries
>  > >  >  >  >
>  > >  >  >  > No, I do not mean forking.
>  > >  >  >  >
>  > >  >  >  > I want my program to be single threaded. What I
> want would be
>  > >  >  > somehting
>  > >  >  >  > like:
>  > >  >  >  >
>  > >  >  >  > $qh = $dbh->prepare("blabla");
>  > >  >  >  > $qh->execute;
>  > >  >  >  >
>  > >  >  >  > while (!$qh->is_ready)
>  > >  >  >  > {
>  > >  >  >  >          print "SQL is busy processing your query, please
>  > >  > wait...\n";
>  > >  >  >  > }
>  > >  >  >  >
>  > >  >  >  > @results = $qh->fetchrow_array;
>  > >  >  >  >
>  > >  >  >  > thanx for your help
>  > >  >  >  >
>  > >  >  >  > At 08:16 AM 8/9/2001 -0600, Sterin, Ilya wrote:
>  > >  >  >  > >You mean forking???  You can do anything in the
> background by
>  > >  >  > creating
>  > >  >  >  > >another process with fork().  You can also use
> Thread, though I
>  > >  >  > don't
>  > >  >  >  > know
>  > >  >  >  > >how stable it is as of now.
>  > >  >  >  > >
>  > >  >  >  > >Also note that you will not achieve parallel
> processing unless
>  > >  > you
>  > >  >  > are
>  > >  >  >  > on a
>  > >  >  >  > >multi-processor system, but that's irrelevant to
> the simple task
>  > >  > you
>  > >  >  >  > are
>  > >  >  >  > >trying to accomplish.
>  > >  >  >  > >
>  > >  >  >  > >Ilya
>  > >  >  >  > >
>  > >  >  >  > >-----Original Message-----
>  > >  >  >  > >From: Giotto De Filippi
>  > >  >  >  > >To: [EMAIL PROTECTED]
>  > >  >  >  > >Sent: 8/9/01 7:43 AM
>  > >  >  >  > >Subject: background sql queries
>  > >  >  >  > >
>  > >  >  >  > >(Sorry, may be a double post but I don't know if the other
>  > >  > message
>  > >  >  > went
>  > >  >  >  > >throught as I was still not registered)
>  > >  >  >  > >
>  > >  >  >  > >Hello,
>  > >  >  >  > >
>  > >  >  >  > >Can I do SQL background queries with DBI?
>  > >  >  >  > >
>  > >  >  >  > >like instead of doing ->prepare, ->execute and
>  > > ->fetchrow_hashref
>  > >  >  >  > >something
>  > >  >  >  > >like ->is_ready, to do before fetchrow, so for example
>  > > I could do
>  > >  >  > other
>  > >  >  >  > >things with my perl program while it's waiting for the sql
>  > >  > databsae
>  > >  >  > to
>  > >  >  >  > >return the result.
>  > >  >  >  > >
>  > >  >  >  > >Thanx much
>  > >  >  >  > >
>  > >  >  >  > >Giotto
>  > >  >  >  > >
>  > >  >  >  > >
>  > >  >  >  > >
>  > >  >  >  > >----------------------------------------------
>  > >  >  >  > >Giotto De Filippi
>  > >  >  >  > >Web Marketer / Programmer
>  > >  >  >  > >E - Mail: [EMAIL PROTECTED]
>  > >  >  >  > >ICQ: 17988776
>  > >  >  >  > >----------------------------------------------
>  > >  >  >  >
>  > >  >  >  > ----------------------------------------------
>  > >  >  >  > Giotto De Filippi
>  > >  >  >  > Web Marketer / Programmer
>  > >  >  >  > E - Mail: [EMAIL PROTECTED]
>  > >  >  >  > ICQ: 17988776
>  > >  >  >  > ----------------------------------------------
>  > >  >  >
>  > >  >  > --
>  > >  >  > Michael Peppler - Data Migrations Inc. -
>  > >  > http://www.mbay.net/~mpeppler
>  > >  >  > [EMAIL PROTECTED] - [EMAIL PROTECTED]
>  > >  >  > International Sybase User Group - http://www.isug.com
>  > >  >
>  > >  > --
>  > >  > Michael Peppler - Data Migrations Inc. -
http://www.mbay.net/~mpeppler
 > >  > [EMAIL PROTECTED] - [EMAIL PROTECTED]
 > >  > International Sybase User Group - http://www.isug.com
 > >
 > > --
 > > Michael Peppler - Data Migrations Inc. - http://www.mbay.net/~mpeppler
 > > [EMAIL PROTECTED] - [EMAIL PROTECTED]
 > > International Sybase User Group - http://www.isug.com

--
Michael Peppler - Data Migrations Inc. - http://www.mbay.net/~mpeppler
[EMAIL PROTECTED] - [EMAIL PROTECTED]
International Sybase User Group - http://www.isug.com

Reply via email to