TiDB
Developer(s) | PingCAP |
---|---|
Preview release |
Beta4
/ November 1, 2016 |
Development status | Active |
Written in | GO |
Operating system | Linux |
Type | RDBMS |
License | Apache 2.0[1] |
Website |
github |
TiDB[2][3] /ˈtai diː biː/ is a distributed open source NewSQL[4][5] database inspired by Google Spanner and Google F1.
TiDB is horizontally scalable and compatible with MySQL protocol, written by GO.[6] This means that applications can connect to TiDB through MySQL clients and drivers, as well as Open Database Connectivity (ODBC) and Java Database Connectivity (JDBC) connectors.
TiDB is under the Apache 2.0 license.
Features
As a NewSQL database, TiDB aims to provide the following features of both traditional RDBMS and NoSQL:
- SQL protocol and SQL grammar: TiDB has a SQL layer to translate the SQL requests to TiDB SQL plan. So applications can use the standard SQL statements to interact with TiDB. TiDB SQL syntax is compatible with MySQL.[7][8]
- ACID((Atomicity, Consistency Isolation, Durability)) transactions: This is a very important feature of the traditional RDBMS to ensure efficiency and accuracy. TiDB supports distributed transactions.[9] This feature inspired by Google Percolator. TiDB implements a Two-phase commit protocol, which relies on a timestamp allocator for monotonic increasing timestamp for each transaction.
- Horizontal Scalability:[10] TiDB allows users to add or remove nodes or machines from the cluster whenever needed to accommodate the data scaling requirements of the large amount of data as the business grows.
- Auto-failover: TiDB uses the Raft algorithm for replication and the implementation is ported from etcd. All the nodes within a TiDB cluster are symmetric. So even if a node is down, the on-going business will not be impacted because the data will be recovered automatically.
Architecture
- MySQL Clients: The top layer of TiDB is a set of MySQL clients. These clients send requests to the next layer.
- Load Balancer: This layer is optional. In TiDB, HAProxy or LVS can be used here to balance the load.
- TiDB servers: The next layer is a set of stateless TiDB servers. The MySQL client many connect to any one of them. Within the TiDB server, there are also several layers: the MySQL protocol layer, which provides MySQL protocol support; the SQL optimizer, which is used to translate MySQL requests to TiDB SQL plan. The bottom layer is Key-Value API and Distributed SQL API. If the lower level storage engine supports coprocessor, TiDB SQL Layer will use DistSQL API, which is much more efficient than Key-Value API;
- Pluggable storage engines: TiDB supports various pluggable storage engines (For example, goleveldb or BoltDB), but it is recommended to use TiKV as the default.
External links
References
- ↑ https://github.com/pingcap/tidb/blob/master/LICENSE
- ↑ https://news.ycombinator.com/item?id=10180503
- ↑ https://www.percona.com/live/plam16/sessions/how-we-build-tidb
- ↑ PRASANNA VENKATESH AND NIRMALA S(2012-01-30)."NewSQL — The New Way to Handle Big Data". Retrieved 2016-12-01.
- ↑ Matthew Aslett (2011). "How Will The Database Incumbents Respond To NoSQL And NewSQL?" (PDF). 451 Group (published 2011-04-04). Retrieved 2016-12-01.
- ↑ http://grokbase.com/t/gg/golang-nuts/159nnrf9n4/go-nuts-ann-tidb-a-distributed-sql-database-inspired-by-google-f1-and-written-by-go
- ↑ https://www.reddit.com/r/programming/comments/3lf64i/tidb_a_mysql_dropin_replacement_written_in_go/
- ↑ https://github.com/pingcap/docs/blob/master/op-guide/mysql-compatibility.md
- ↑ https://medium.com/@PingCAP/how-we-build-tidb-ec6c3b1a3f2#.p72u596g4>
- ↑ Neal Leavitt (2010-01-26). Will NoSQL Databases Live Up to Their Promise?Retrieved 2016-12-01.
This article is issued from Wikipedia - version of the 12/4/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.