Supercharging MySQL
and MariaDB with Plug-ins

Antony T Curtis <atcutis@gmail.com>
Plug-ins types for MySQL / MariaDB

Audit
Authentication
Daemon
Full-text Parser
Information Schema
Replication
Storage Engines.
Plug-ins allow the server to be extended
in a controlled manner.
(third-party plugin types do exist too)
Plug-ins for Storage
InnoDB Storage Engine
Everyone should be using it by default.
Default in recent releases of MariaDB and MySQL
TokuDB Storage Engine
Supports sustained inserts better.
Available in MariaDB.
Plug-ins for Storage
OQGraph Engine
Search shortest path on modest graphs.
More than 100k nodes/second search possible.
Sphinx Engine
Connects to distributed full-text search engine.
Connect Engine (MariaDB)
FederatedX Engine (MySQL)
Replication Plugins:

Semi-Sync Replication
(multiple implementations: Google/Facebook/Oracle)
Alternative replication sync options...
Heartbeat/observer
Information Schema Plugins:

Easier to write than Storage Engine plugins.
Can be used to bring in static data.
Can be used to bring in simple dynamic data.
Daemon Plugins:
“Black Box” to plug in extra functionality into
the database server.
Audit Plugins:

Designed to be installed/uninstalled at run time.
Simple to write.
Syslog, log to table.
How to supercharge MySQL/MariaDB?
How to supercharge MySQL/MariaDB?

When everything else has been optimized,
how to get the last extra bit of performance...
Plug-ins for Storage
Implementing a storage engine for bulk loading
data.
OQGraph Engine
Extend OQGraph for some custom traversal.
Audit Plugins:
May be used to send logs to another machine.
May be used to monitor specific users.
Poor man’s replication.
Triggers.
How to supercharge MySQL/MariaDB?

Reducing the number of round-trips.
How to supercharge MySQL/MariaDB?

Reducing the number of round-trips.
Stored Procedures are tricky to debug.
How to supercharge MySQL/MariaDB?
Reducing the number of round-trips.
Stored Procedures are tricky to debug.
No external stored procedures in MySQL
but ...
Daemon Plugins:

Suggested ideas:
Server health watch-dog.
Run a Python program.
Run a node.js instance.

client

daemon
mysqld
Daemon Plugins:

Daemon Plugin for Python Idea:
gevented with pure-Python MySQL client.
XML-RPC Server.
Can perform multi-statement transactions.
Daemon Plugins:
Do:
Lightweight processing.
Data validation.
Serve other protocols.
Do Not:
Create many threads.
“number crunching”.
Daemon Plugins:
Do:
Lightweight processing.
Data validation.
Serve other protocols.
Do Not:
Create many threads.
“number crunching”.

Database
storage engines, such
as InnoDB *assume* that
they are the only service
on a machine!
Daemon Plugins:

Limited by imagination!
Questions?

G+ page: http://goo.gl/7kev1C

Supercharging MySQL and MariaDB with Plug-ins (SCaLE 12x)