All Projects → hellojavaer → ddal

hellojavaer / ddal

Licence: Apache-2.0 license
DDAL(Distributed Data Access Layer) is a simple solution to access database shard.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to ddal

dtm
A distributed transaction framework that supports multiple languages, supports saga, tcc, xa, 2-phase message, outbox patterns.
Stars: ✭ 6,110 (+18415.15%)
Mutual labels:  transaction, distributed
Tns
tns provides distributed solutions for thrift, support service discovery, high availability, load balancing, the gray release, horizontal scaling, and so on.
Stars: ✭ 53 (+60.61%)
Mutual labels:  load-balancer, distributed
dtmcli-php
a php client for distributed transaction framework dtm.
Stars: ✭ 26 (-21.21%)
Mutual labels:  transaction, distributed
Spring Boot Mybatis Rw
基于mybatis,springboot开箱即用的读写分离插件
Stars: ✭ 347 (+951.52%)
Mutual labels:  transaction, datasource
Perseus
⚡️database read and write separation of java
Stars: ✭ 123 (+272.73%)
Mutual labels:  transaction, datasource
schema2ldif
Schema 2 ldif : tool to convert .schema to .ldif files and mange them live into an openldap server
Stars: ✭ 14 (-57.58%)
Mutual labels:  converter, schema
godmt
Tool that can parse Go files into an abstract syntax tree and translate it to several programming languages.
Stars: ✭ 42 (+27.27%)
Mutual labels:  converter, schema
to-json-schema
Converts JS objects to JSON Schema
Stars: ✭ 83 (+151.52%)
Mutual labels:  converter, schema
xToBatConverter
Generate a ms batch file and inject a files inside of it. When the batch is executed, the files are extracted and executed.
Stars: ✭ 17 (-48.48%)
Mutual labels:  converter
zipreport
Python PDF reporting library
Stars: ✭ 15 (-54.55%)
Mutual labels:  converter
trans-dsl
a transaction model framework, seems simple but powerful
Stars: ✭ 64 (+93.94%)
Mutual labels:  transaction
dklb
Expose Kubernetes services and ingresses through EdgeLB.
Stars: ✭ 13 (-60.61%)
Mutual labels:  load-balancer
qTsConverter
A simple tool to convert qt translation file (ts) to other format (xlsx / csv) and vice versa
Stars: ✭ 26 (-21.21%)
Mutual labels:  converter
dalvikgate
Lightweight dex / odex / apk to jar converter
Stars: ✭ 32 (-3.03%)
Mutual labels:  converter
Savior
(WIP)The deployment framework aims to provide a simple, lightweight, fast integrated, pipelined deployment framework for algorithm service that ensures reliability, high concurrency and scalability of services.
Stars: ✭ 124 (+275.76%)
Mutual labels:  distributed
Apriori-and-Eclat-Frequent-Itemset-Mining
Implementation of the Apriori and Eclat algorithms, two of the best-known basic algorithms for mining frequent item sets in a set of transactions, implementation in Python.
Stars: ✭ 36 (+9.09%)
Mutual labels:  transaction
csv-schema
Parse a CSV file into PHP objects based on a schema.
Stars: ✭ 23 (-30.3%)
Mutual labels:  schema
typescript-to-json-schema
Generate JSON schema from your Typescript sources
Stars: ✭ 54 (+63.64%)
Mutual labels:  schema
ion-schema-kotlin
A Kotlin reference implementation of the Ion Schema Specification.
Stars: ✭ 23 (-30.3%)
Mutual labels:  schema
COVID19-FeedbackApplication
A simple application is developed to get feedback from a user and analyzing the text to predict the sentiment.
Stars: ✭ 13 (-60.61%)
Mutual labels:  load-balancer

DDAL

Build Status GitHub release Maven Central

DDAL(Distributed Data Access Layer) is a simple solution to access database shard.

design

License

DDAL is dual licensed under LGPL V2.1 and Apache Software License, Version 2.0.

Quick start

  • add the following dependency in your pom.xml
<dependency>
    <groupId>org.hellojavaer.ddal</groupId>
    <artifactId>ddal-datasource</artifactId>
    <version>1.1.1-RELEASE</version>
</dependency>
  • use DefaultDDALDataSource to proxy the orginal dataSource
<bean name="dataSource" class="org.hellojavaer.ddal.datasource.DefaultDDALDataSource">
    <constructor-arg index="0" value="jdbc:ddal:thick:classpath:/datasource.xml"/>
    <!-- <constructor-arg index="0" value="jdbc:ddal:thick:http://{host}:{port}/{appName}"/> -->
</bean>

Features

  • Only need to proxy the original datasources for business
  • Fully support ACID
  • Support insert, select, update and delete expression
  • Support join(inner join,left join,right join,full jion), sub-select, union all and exists expression
  • Support table alias
  • Support no shard-key schema/table routing
  • Support '=', in' and 'between' operation to route schema/table and support mixed sql parameter and jdbc parameter in routing values
    • eg: 'select * from tb where id in(1,?,3)'
    • eg: 'select * from tb where id between 1 and ?'
  • Support Date, Timestamp, Byte, Short, Integer, Long, String, Character, Hex value type for shard-value
  • Support annotation routing
  • Support custom route rule (eg: '{scName}_{format('%02d', sdValue % 4)}')
  • Support route rule binding on a schema (instead of a table)
  • Support scan all schemas and tables
  • Support limit check
  • Support read-write splitting
  • Support load balance of read
  • Support config at server-side
  • Support db cluster route
  • Provide multiple sequence implements

Download

http://repo1.maven.org/maven2/org/hellojavaer/ddal/

Documentation

Release Notes

Extensions in the latest version 1.1.0-RELEASE

  • support DB cluster route
  • enhance ShardRouteUtils

Extensions in version 1.0.1-RELEASE

  • Support route rule binding on a schema (instead of a table)
<bean class="org.hellojavaer.ddal.ddr.shard.simple.SimpleShardRouteRuleBinding">
    <property name="scName" value="base"/>
    <property name="rule">
        <bean class="org.hellojavaer.ddal.ddr.shard.rule.SpelShardRouteRule">
            <property name="scRouteRule" value="{scName}_{format('%02d', sdValue % 2)}"/>
            <property name="tbRouteRule" value="{tbName}_{format('%04d', sdValue % 8)}"/>
        </bean>
    </property>
    <property name="sdKey" value="id"/>
    <property name="sdValues" value="[0..7]"/>
</bean>

Extensions in version 1.0.0-RELEASE

  • upgrade jsqlparser's version to 1.2 to support more sql features
  • optimize JSQLParserAdapter

Extensions in version 1.0.0.M7

  • support custom protocol jdbc:ddal:

Extensions in version 1.0.0.M6

  • implement DefaultDDALDataSource in ddal-datasource module
<bean name="dataSource" class="org.hellojavaer.ddal.datasource.DefaultDDALDataSource">
    <constructor-arg index="0" value="jdbc:ddal:thick:classpath:/datasource.xml"/>
</bean>
  • implement DivideShardRouteRule for range route

Extensions in version 1.0.0.M5

  • optimize route rule expression parser
// older
SpelShardRouteRule rule = new SpelShardRouteRule();
rule.setScRouteRule("{#scName}_{#format('%02d', #sdValue % 4)}");
rule.setTbRouteRule("{#tbName}_{#format('%04d', #sdValue % 8)}");

// newer
SpelShardRouteRule rule = new SpelShardRouteRule();
rule.setScRouteRule("{scName}_{format('%02d', sdValue % 4)}");
rule.setTbRouteRule("{tbName}_{format('%04d', sdValue % 8)}");
  • optimize range expression parser
"1,2,3"  => 1,2,3
"[1..3]" => 1,2,3
"['A'..'C','X']" => A,B,C,X
"[0..1][0..1]" => 00,01,10,11
"Hi![' Allen',' Bob']" => Hi! Allen,Hi! Bob
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].