karupanerura / Aniki

The ORM as our great brother.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

multi db support

karupanerura opened this issue · comments

  • Clustering
  • Sharding

needs contributors

Could you provide some hints, or some sample code on how you would like to make it work?

@GeJ
Thank you for having interest this feature. And sorry for late reply.

I haven't yet had an idea for specific design of this feature. Because, I have too little knowledge to design the spec for the feature. (my company's use-case only)
So I just need to know more use-cases about multiple (clustered/sharded) databases in an application.

if you're using multiple database, could you tell me your use-case a little specific?
Or if you have an idea for this feature, could you tell me that?

My company's multi databases use-case is written in this book: https://www.amazon.co.jp/dp/4774151114
But, it's written in Japanese only.

Summary points for sharding/clustering following:

  • Databases are sharded horizontally and vertically.
    • Horizontally shard by context. (e.g. user specific data, users shared data, specific feature's data, etc...)
    • Vertically shard by hash value for context. (e.g. user id, etc...)