Newest topic of spider 20131016 in Buenos Aires Argentina

700 views

Published on

Introducing newest topic of Spider at 20131016 in Buenos Aires Argentina

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
700
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
12
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Newest topic of spider 20131016 in Buenos Aires Argentina

  1. 1. Spider Storage Engine: The sharding plugin of MySQL/MariaDB Introducing and newest topics Team-Lab / Spiral-Arm Kentoku SHIBA
  2. 2. What is Spider Storage Engine Spider Storage Engine is a plugin of MySQL/MariaDB. Spider tables can be used on other MySQL/MariaDB/OracleDB tables as local tables. Spider is bundled in MariaDB from 10.0.4.
  3. 3. The use of Spider dividing huge data into multiple servers 1. High traffic processing(DB sharding) 2. Parallel processing You can use 3. multiple database for different application as one database through Spider.
  4. 4. Spider structure sample 3.Response 1.Request AP AP AP AP AP 2.Just connect to spider SPIDER SPIDER SPIDER (MySQL/MariaDB) (MySQL/MariaDB) (MySQL/MariaDB) tbl_a tbl_b tbl_c DB1 DB2 DB3 An application can use all databases by only connecting one database.
  5. 5. How to use Spider (1/5) 1. Install Spider bundled MySQL/MariaDB. 2. Login MySQL/MariaDB then install Spider as a plugin. (execute install_spider.sql) 3. Create Spider table.
  6. 6. How to use Spider (2/5) Create one to one Spider table. CREATE TABLE t1( c1 int, c2 varchar(100), PRIMARY KEY(c1) )ENGINE=spider DEFAULT CHARSET=utf8 COMMENT ' table "rt1", database "test", port "3306", host "host name of data node", user "user name for data node", password "password for data node" '; Set engine name to “Spider” and write connect information (and parameter) to comment.
  7. 7. How to use Spider (3/5) You can create Spider table without column definition on MariaDB. In this case Spider gets column definition from data node. CREATE TABLE t1 ENGINE=spider DEFAULT CHARSET=utf8 COMMENT ' table "rt1", database "test", port "3306", host "host name of data node", user "user name for data node", password "password for data node" ';
  8. 8. How to use Spider (4/5) Create one to many (sharding) Spider table CREATE TABLE t1( c1 int, c2 varchar(100), PRIMARY KEY(c1) )ENGINE=spider DEFAULT CHARSET=utf8 COMMENT 'table "rt1", database "test", port "3306", user "user name for data node", password "password for data node"' PARTITION BY RANGE(c1) ( PARTITION p0 VALUES LESS THAN (100000) COMMENT 'host "h1"', PARTITION p1 VALUES LESS THAN (200000) COMMENT 'host "h2"', PARTITION p2 VALUES LESS THAN (300000) COMMENT 'host "h3"', PARTITION p3 VALUES LESS THAN MAXVALUE COMMENT 'host "h4"' ); Write shared connect information to table comment, shard specific connect information to partition comment.
  9. 9. How to use Spider (5/5) You can use “CREATE SERVER” statement for defining connect information. CREATE SERVER srv1 FOREIGN DATA WRAPPER mysql HOST 'host name of data node', DATABASE 'test', USER 'user name for data node', PASSWORD 'password for data node', PORT 3306 ; You can use create server definition by writing server parameter into table/partition comment. CREATE TABLE t1( c1 int, c2 varchar(100), PRIMARY KEY(c1) )ENGINE=spider DEFAULT CHARSET=utf8 COMMENT 'table "rt1", server "srv1"';
  10. 10. Spider’s other features
  11. 11. Spider’s other features Redundant feature You can choose redundant level per table/partition. Fault tolerance feature You can use not only Spider’s fault tolerance feature but also other MySQL’s fault tolerance solutions. Fulltext/Geo search feature (with table partitioning, not available for MariaDB yet) You can use backend Fulltext/Geo search feature transparently.
  12. 12. Spider’s other features NoSQL feature (not available for MariaDB yet) You can use handlersocket for Spider. OracleDB connecting feature You can use OracleDB for data node. Note: You need to build from source code for using this feature Parallel searching feature (not available for MariaDB yet) You can search sharded table by parallel.
  13. 13. Introducing other plugin which is combined with Spider in many cases
  14. 14. Other plugins 1. Vertical Partitioning Storage Engine 2. Handlersocket Plugin 3. Mroonga Storage Engine
  15. 15. Vertical Partitioning Storage Engine Vertical Partitioning (VP) Storage Engine’s main features 1. Column level partitioning. 2. Works like a view of one to one relation tables. Possible to direct access to child tables. But, VP table can use as a table including insert statement. 3. For using different horizontal partitioning rules case by case. 4. Support online coping data between child tables.
  16. 16. Other plugins 1. Vertical Partitioning Storage Engine 2. Handlersocket Plugin 3. Mroonga Storage Engine
  17. 17. Handlersocket Plugin Handlersocket (HS) Plugin’s main features 1. Offering high-speed NoSQL access to MySQL. 2. Offering NoSQL access to sharded servers by combining with Spider. Handlersocket is developed by Akira Higuchi. https://github.com/ahiguti/HandlerSocket-Plugin-for-MySQL Patched version for Spider is bundled with Spider bundled MySQL. http://spiderformysql.com/download_spider.html
  18. 18. Other plugins 1. Vertical Partitioning Storage Engine 2. Handlersocket Plugin 3. Mroonga Storage Engine
  19. 19. Mroonga Storage Engine (1/2) Mroonga Storage Engine’s main features 1. Offering high-speed FULLTEXT search. 2. Offering high-speed GEO search. 3. High-speed updating with multiple thread searching. (lock-free model) 4. Support CJK languages.
  20. 20. Mroonga Storage Engine (2/2) Mroonga Storage Engine’s main features 5. You can use to add FULLTEXT/GEO search for other storage engines. 6. Offering FULLTEXT/GEO search to sharded servers by combining with Spider. Mroonga’s document is available. http://mroonga.github.com/
  21. 21. The newest topics
  22. 22. Bundled in MariaDB Spider bundled in MariaDB 10.0.4. Currently, we are trying to bundle Mroonga into MariaDB too. But there are some limitation as the following. - A feature of needing a patch to MariaDB. - A feature of combining with other storage engine. Currently, we work for solving these limitations.
  23. 23. The newest improvement 1. spider_bka_mode=2 This parameter is performance improvement parameter for “batched key access”. Sometimes “spider_bka_mode=1” causes replication delay. So this is added. 2. Optimizing aggregate functions Improvement aggregation functions (COUNT/MAX/MIN/SUM) performance, if executing SQL has no join and distinct.
  24. 24. The newest improvement 3. log_result_errors , spider_log_result_errors , spider_general_log (parameters), spider_xa_failed_log (table) It’s log enhancements. You can see SQLs that send from Spider node to data node, error from data node to Spider node, error from Spider node to application. And if xa transaction is failed, it is logged into mysql.spider_xa_failed_log table. This features are useful for troubleshooting. These parameters can be changed immediately.
  25. 25. For more useful Now, I plan to develop some tools for schema design and management. It helps schema design, deploying and managing. The other concepts are 1. It is possible to use with accustomed schema design tools. 2. It is possible to use for cloud services. 3. It is possible to use for already structured databases. 4. It is possible to use with accustomed management tools. I can’t say when it is available, but I develop it as soon as possible, and introducing about how to use.
  26. 26. Conclusion
  27. 27. Conclusion - You can use other database tables include OracleDB through Spider tables by only connecting one database. - You can divide huge data into multiple database transparently through Spider tables. Spider has great design flexibility.
  28. 28. Thank you for taking your time! Any Questions? You can see me later! Come to visit me!! Kentoku SHIBA (kentokushiba [at] gmail [dot] com) http://spiderformysql.com

×