Giter Club home page Giter Club logo

mybatis-sharding's Introduction

背景

几年前,由于我们需要做影像存储系统重构,db层需要做到线性扩展,那么分库是必然要做的(分512个库),我调研了市面上很多分库插件,都没有找到我们需要的产品。 先看看我们的定位

  • 1、轻量级
  • 2、支持多数据库共用数据源(例如000-255一组, 256-511一组,每组共用一套数据源)
  • 3、连接池是到实例的,而不是到库的(例如000-255号库共用连接池)
  • 4、显示调用(有些分库插件喜欢所谓的无缝对接,但是对于分库,我们希望"心中有佛") 后来我也研究过mybatis插件来实现,调研了3天最终无果。由于项目紧急无奈最后只有放弃,后来采用了包装jdbcTemplate的方式来实现(未开源)。

时至今日,最近在写关于《浅谈千万级系统重构》 系列文章,又重新来调研关于mybatis分库分表,最终找到了解决之道!

设计思路

请关注“浅谈架构” 公众号查看

bytearch

or 技术博客

《浅谈mysql分库分表那些事儿》

mybatis-sharding's People

Contributors

iyw avatar

Stargazers

Lin Hai Cheng avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.