Introducing TiDB For those coming from MySQL... Agenda History - - PowerPoint PPT Presentation
Introducing TiDB For those coming from MySQL... Agenda History - - PowerPoint PPT Presentation
Introducing TiDB For those coming from MySQL... Agenda History and Community Technical Walkthrough Use Case with Mobike MySQL Compatibility A little about me Senior Product / Community Manager ~15 years MySQL
Agenda
- History and Community
- Technical Walkthrough
- Use Case with Mobike
- MySQL Compatibility
A little about me
- Senior Product / Community Manager
- ~15 years MySQL Experience
○ MySQL AB, Sun, Percona, Oracle
- Previously Product Manager for MySQL Server
A little about PingCAP
- Founded in April 2015 by 3 infrastructure
engineers
- Offices in China and North America
- Remote Friendly!
○ I work from here ➡
PingCAP.com
Recent News
PingCAP.com
Our Product is the TiDB Platform
- TiDB Platform (Ti = Titanium)
○ TiDB (SQL Layer) ○ TiKV (Storage) ○ TiSpark (Apache Spark plugin to TiKV)
- Open source from Day 1
○ GA 1.0: October 2017 ○ GA 2.0: April 2018
PingCAP.com
TiDB is a NewSQL Database
RDBMS NoSQL NewSQL
1970s 2010 2015 MySQL PostgreSQL Oracle DB2... Redis HBase Cassandra MongoDB Present Google Spanner Google F1 TiDB
Common Use Cases
1. MySQL Scalability 2. Hybrid OLTP/OLAP Architecture 3. Unifying Data Storage/Management
PingCAP.com
Architecture (Simplified)
TiDB TiDB TiDB
Application via MySQL Protocol
TiKV TiKV TiKV TiKV TiKV TiKV
... ...
PD Cluster DistSQL API KV API PD PD PD Metadata TSO / Data Location
PingCAP.com
Community
Stars
- TiDB: 15,000+
- TiKV: 3700+
Contributors
- TiDB: 200+
- TiKV: 100+
PingCAP.com
Sneak Peek!
Early Sign-up: https://www.pingcap.com/tidb-academy/
TiDB Platform Architecture
PingCAP.com
Platform Architecture
TiDB TiDB TiDB
Application via MySQL Protocol
TiKV TiKV TiKV TiKV TiKV TiKV Worker Worker Worker Spark Driver
... ... ...
Spark SQL
Spark Cluster PD Cluster DistSQL API KV API DistSQL API PD PD PD Metadata TSO / Data Location Data Location
PingCAP.com
TiKV: The Storage Foundation
RocksDB Raft Transaction Txn KV API
Coprocessor
API RocksDB Raft Transaction Txn KV API
Coprocessor
API RocksDB Raft Transaction Txn KV API
Coprocessor
API
Raft Group Client gRPC TiKV Instance TiKV Instance TiKV Instance gRPC gRPC PD Cluster
PingCAP.com
TiDB: The SQL Layer
Node1 Node2 Node3 Node4 MySQL Network Protocol SQL Parser Cost-based Optimizer Distributed Executor (Coprocessor) ODBC/JDBC MySQL Client Any ORM which supports MySQL TiDB TiKV
Who’s Using TiDB?
PingCAP.com
Who’s using TiDB?
300+ Companies
Common Use Cases
1. MySQL Scalability 2. Hybrid OLTP/OLAP Architecture 3. Unifying Data Storage/Management
PingCAP.com
Mobike + TiDB
- 200 million users
- 200 cities
- 9 million smart bikes
- ~30 TB / day
MySQL Compatibility
PingCAP.com
Summary
- Compatibility with MySQL 5.7
○ Joins, subqueries, DML, DDL etc.
- On the roadmap:
○ Views, CTEs, Window Functions, GIS
- Missing:
○ Stored Procedures, Triggers, Events, Fulltext pingcap.com /docs/sql/mysql-compatibility/
PingCAP.com
Nuanced
- Some features work differently
○ Auto Increment ○ Optimistic Locking
- TiDB works better with smaller
transactions ○ Recommended to batch updates, deletes, inserts to 5000 rows pingcap.com /docs/sql/mysql-compatibility/
PingCAP.com
Thank You !
Sign-up: www.pingcap.com/tidb-academy/