增加自动读写分离 #17
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#17
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
同时连接两个数据库,建议支持不同类型数据库间主从\双主等方式,如果我读选了sqlite,写选了pgsql,希望这样也可以.
主的允许读写,从的只允许读等等..
可以提高性能,ORM内部自动切换..
这个我本人认为,可以不支持,你可以同时连接两个数据库,在应用层面自己解决这个问题。
的确应用层什么都能解决,就像缓存一样,xorm本来可以没有缓存,也可以在应用层解决.
但为什么建议在orm内部就支持呢?因为从底层支持和应用层支持有本质上的区别,应用层支持很多时候粒度非常大,成本很高,在底层就处理这个的话就比较容易做到,而且事成之后在基于xorm的架构里就可以轻松通过开关设置开启这样的功能,这对于用户节约开发时间和提升程序性能都极有好处!
this is a good and actually common use case, but I would solved the problem by writing proxy driver, which allow multiple hosts, and declaring roles inputted as part of dataSourceName param
referenced #78