I'm still looking for a solution to simulate connection pooling, any responses would be great - thanks!
On Jul 21, 4:53 pm, Karthik <[email protected]> wrote: > Hi Massimo, > > Thanks for this. Do you know if it will hold up in a high performance > situation though? > As in, if multiple connections originate at the same time, won't there > be a queue? > Is it possible to simulate the connection pooling mechanism in > web2py's DAL? > > Thanks,Karthik > > On Jul 31 2010, 4:13 am, mdipierro <[email protected]> wrote: > > > > > > > > > how about this? (None below means cache forever) > > > def make_connection(): > > from pymongo import Connection > > connection = Connection('localhost', 27017) > > return connection > > > connection = cache.ram('mongodb',make_connection,None) > > > On Jul 31, 3:11 am, David Marko <[email protected]> wrote: > > > > Hi Massimo, can you give ua a hint how to impelement persistent > > > connection in web2py for pyMongo? PyMongo requires database connection > > > and to use it efficiently the connection has to be persistent and > > > shared among requests like a connection pool for database connections > > > as DAL has. But how to do it in web2py? > > > > e.g. > > > from pymongo import Connection > > > connection = Connection('localhost', 27017) > > > > ### how to keep this connection object? > > > > David > > > > On 31 čnc, 09:57, mdipierro <[email protected]> wrote: > > > > > yes. Just set dbio=False in forms and do your own mymongo IO after > > > > accepts: > > > > > On Jul 30, 11:18 am, Amit Ambardekar <[email protected]> wrote: > > > > > > I want to use web2py with pymongo. > > > > > I don't need ORM or or anything. I just want to connect use pymongo > > > > > from Web2Py. > > > > > How can I use it inside web2py. I need it for high performance use. > > > > > > Amit

