plone - Can a just one sqlalchemy Session be a bottleneck for app? -


i'm using z3c.saconfig configure sqlalchemy in plone/zope application. in application, created session sqlalchemy named_scoped_session("dbmyapp") z3c.saconfig method. session created , works well. created 1 session app.

can [one session sqlalchemy / app] bottleneck app?

by way, can create more 1 session per app? there advantages?

snippet of buildout.cfg:

<configure xmlns="http://namespaces.zope.org/zope"     xmlns:db="http://namespaces.zope.org/db">     <include package="z3c.saconfig" file="meta.zcml" />      <db:engine name="dbmyapp" url="oracle://user:pass@hostname:port/sid" />     <db:session name="dbmyapp" engine="dbmyapp" /> </configure> 

the session machinery takes care of providing 1 connection per thread; since can execute sequential code within 1 thread connection cannot become bottleneck.

different parts of code can request own session; session machinery reuse session connections required. not have worry about, that's handled z3c.saconfig , dependencies.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -