On Sun, 26 Jan 2003, Tom Sawyer wrote:

> by the way, this queasy solution works fairly well as long as you have a
> backup for when you loose the proccess (for a new one), thus i was able to
> persist a database connection and a few other things with difficulty and my
> sped up multiple times.

have you had any issues sharing one connection between many processes?  i mean
what if :

1)
  process a :
    $db.exec 'connect foobar_database'

2)
  process b :
    $db.exec 'connect barfoo_database'

3) process a :
    $db.exec # something which has something to do with foobar_database, but
	     # it's connected to barfoo_database!!

> it runs as a seperate service (using DRb)?

yes.  it's a totall hack right now, but the _idea_ is a good one i think.
making it totally generic would be tough, but the general idea would be to
place a naming service in a rinda space or simply a drb object which you could
look up other objects by.  the rinda space would allow you to leave object
behind between cgi invocations (with all the problems that entails).  what i'm
really looking into now is how to efficiently multiplex and bunch of database
connections, eg how to design a connection pool.  anyone out there done this?

> i wonder then. if i use DRb would i then also be able to make my app easily
> run on a distributed enviornment? i.e. a cluster?

yeah.  that's a definitely possibility and one which i've considered.

-a

-- 

 ====================================
 | Ara Howard
 | NOAA Forecast Systems Laboratory
 | Information and Technology Services
 | Data Systems Group
 | R/FST 325 Broadway
 | Boulder, CO 80305-3328
 | Email: ahoward / fsl.noaa.gov
 | Phone:  303-497-7238
 | Fax:    303-497-7259
 ====================================