this is usually called a "read slave" and you do it by either switching the 
"bind" used in your Session, or by using two different sessions.    In a web 
application I'll typically build a decorator for controllers that performs this 
switch transparently:

@uses_master
def my_controller_method(self):
    Session.add(SomeObject())
    Session.commit()
    return "success!"




On Nov 8, 2010, at 9:52 PM, Li-Wen Hsu wrote:

> Hello,
> 
> Does SQLAlchemy support read-write splitting?  It seems not mentioned in
> the document.  Or does it is not intended to support in ORM layer?  This
> is somehow important for scaling , and could be convenient if we can
> achieve this in SQLAlchemy.
> 
> Thanks,
> Li-Wen
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/sqlalchemy?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to