Using Drizzle OSCON 2010 Eric Day - http://oddments.org/ Senior - - PowerPoint PPT Presentation

using drizzle
SMART_READER_LITE
LIVE PREVIEW

Using Drizzle OSCON 2010 Eric Day - http://oddments.org/ Senior - - PowerPoint PPT Presentation

Using Drizzle OSCON 2010 Eric Day - http://oddments.org/ Senior Software Engineer @ Rackspace Drizzle Overview What is it? Plugins! Installing Starting drizzle.cc Boots Shell OSCON 2010 Using Drizzle 2 What is Drizzle? A


slide-1
SLIDE 1

Using Drizzle

OSCON 2010 Eric Day - http://oddments.org/ Senior Software Engineer @ Rackspace

slide-2
SLIDE 2

OSCON 2010 Using Drizzle 2

Drizzle Overview

  • What is it?
  • Plugins!
  • Installing
  • Starting
  • drizzle.cc Boots Shell
slide-3
SLIDE 3

OSCON 2010 Using Drizzle 3

What is Drizzle?

A lightweight SQL database for the “cloud” and web

slide-4
SLIDE 4

OSCON 2010 Using Drizzle 4

What is Drizzle?

A lightweight SQL database for the “cloud” and web

slide-5
SLIDE 5

OSCON 2010 Using Drizzle 5

What is Drizzle?

A lightweight SQL database for the “cloud” and web

slide-6
SLIDE 6

OSCON 2010 Using Drizzle 6

What is Drizzle?

A lightweight SQL database for the “cloud” and web

slide-7
SLIDE 7

OSCON 2010 Using Drizzle 7

What is Drizzle?

A lightweight SQL database for the “cloud” and web

slide-8
SLIDE 8

OSCON 2010 Using Drizzle 8

Plugins are the new black

slide-9
SLIDE 9

OSCON 2010 Using Drizzle 9

Pluggable Protocol

  • MySQL Protocol (3306)
  • Drizzle Protocol (4427)
  • Console Plugin
  • HTTP/REST?
  • Postgres Protocol?
slide-10
SLIDE 10

OSCON 2010 Using Drizzle 10

shell$ ./drizzled --datadir=/tmp/foo --console-enable InnoDB: The InnoDB memory heap is disabled InnoDB: Mutexes and rw_locks use GCC atomic builtins. 100410 14:08:01 InnoDB: highest supported file format is Barracuda. 100410 14:08:01 InnoDB Plugin 1.0.4 started; log sequence number 44274 Listening on 0.0.0.0:3306 Listening on :::3306 Listening on 0.0.0.0:4427 Listening on :::4427 ./drizzled: Forcing close of thread 0 user: '' ./drizzled: ready for connections. Version: '2010.03.1336' Source distribution (trunk) drizzled>

slide-11
SLIDE 11

OSCON 2010 Using Drizzle 11

drizzled> use data_dictionary; OK drizzled> select * from MODULES where MODULE_NAME='console'; MODULE_NAME MODULE_VERSION MODULE_AUTHOR IS_BUILTIN MODULE_LIBRARY MODULE_DESCRIPTION MODULE_LICENSE console 0.1 Eric Day FALSE console Console ClientBSD drizzled> ./drizzled: Forcing close of thread 1 user: '' ./drizzled: Normal shutdown 100410 14:08:08 InnoDB: Starting shutdown... 100410 14:08:09 InnoDB: Shutdown completed; log sequence number 44284 shell$

slide-12
SLIDE 12

OSCON 2010 Using Drizzle 12

Drizzle Protocol

  • We killed little bobby tables
  • Packet header sharding key
  • Support HTTP-like redirect
  • Concurrent queries
slide-13
SLIDE 13

OSCON 2010 Using Drizzle 13

libdrizzle

  • Multi-protocol support
  • MySQL, Drizzle
  • Both Client and Server parts of the protocol
  • Have PHP, Python, Perl and Ruby already
  • Oh, and it's BSD, so use it anywhere
slide-14
SLIDE 14

OSCON 2010 Using Drizzle 14

Pluggable Scheduler

  • Mutli Threaded
  • Pool of Threads
  • Single Threaded
  • Platform Specific?
slide-15
SLIDE 15

OSCON 2010 Using Drizzle 15

Badges? We don't need no stinking badges!

slide-16
SLIDE 16

OSCON 2010 Using Drizzle 16

Pluggable Authentication

  • None
  • PAM
  • LDAP
  • HTTP
  • libdrizzle?
  • authenticate(user, pass)
slide-17
SLIDE 17

OSCON 2010 Using Drizzle 17

Pluggable Authorization

  • None
  • LDAP
  • Hard-coded policy
  • restrictSchema()
  • restrictTable()
  • restrictProcess()
slide-18
SLIDE 18

OSCON 2010 Using Drizzle 18

Pluggable Query Cache

  • None
  • Local memory
  • memcached
  • NDB?
slide-19
SLIDE 19

OSCON 2010 Using Drizzle 19

Pluggable Query Filter

  • Rewrite/block queries
  • Rewrite queries for

tuning

  • (Anybody seen

MySQL Proxy)

  • rewrite(schema,

query)

slide-20
SLIDE 20

OSCON 2010 Using Drizzle 20

Pluggable Logging

  • None
  • query_log
  • gearman
  • Syslog
  • user_statistics
  • pre(session)
  • post(session)
slide-21
SLIDE 21

OSCON 2010 Using Drizzle 21

Pluggable Errors

  • stderr
  • notify
  • syslog?
  • errmsg(session,

priority, format, *args)

slide-22
SLIDE 22

OSCON 2010 Using Drizzle 22

Pluggable Function

  • md5()
  • memcached_*
  • gearman_*
  • rot13()
slide-23
SLIDE 23

OSCON 2010 Using Drizzle 23

Pluggable Replication

  • Google Protocol Buffers

– Java – Python – C++

  • Replicator
  • Applier
  • Reader
slide-24
SLIDE 24

OSCON 2010 Using Drizzle 24

Pluggable Data Dictionary

  • INFORMATION_SCHEMA
  • Other table functions
slide-25
SLIDE 25

OSCON 2010 Using Drizzle 25

  • Um. So how do I run it?
slide-26
SLIDE 26

OSCON 2010 Using Drizzle 26

Install

  • From apt:

– In Debian unstable

  • Launchpad PPA

– sudo apt-get install python-software-properties – sudo add-apt-repository ppa:drizzle-developers/ppa – sudo apt-get update – sudo apt-get install drizzle

slide-27
SLIDE 27

OSCON 2010 Using Drizzle 27

Install

  • From RPM:

– http://drizzle.org/wiki/RPMInstallation

slide-28
SLIDE 28

OSCON 2010 Using Drizzle 28

Install

  • From source:

– ./configure ; make ; make install – No bootstrap step – No system tables

slide-29
SLIDE 29

OSCON 2010 Using Drizzle 29

Startup

drizzled --datadir=/my/data/path

slide-30
SLIDE 30

OSCON 2010 Using Drizzle 30

Plugins

  • apt-get install drizzle-plugin-pbxt
  • Enabled at startup
  • -plugin-add=md5,pbxt
  • No need for a sysadmin to run SQL to install a

plugin!

slide-31
SLIDE 31

OSCON 2010 Using Drizzle 31

slide-32
SLIDE 32

OSCON 2010 Using Drizzle 32

Boots Shell

  • launchpad.net/boots or lp:boots
  • New command line client from Portland State

– (one of the devs, chromakode, also wrote the cool xkcd

April Fool's Day hack)

  • Pluggable
  • Scriptable
  • Lingos – Custom command language
slide-33
SLIDE 33

OSCON 2010 Using Drizzle 33

Piped SQL

shell$ boots -u root -h 127.0.0.1 -l pipedsql Boots (v0.2.0) 127.0.0.1:3306 (server v5.1.40) > SELECT * FROM mysql.user; | csv_out("users.csv") 5 rows in set (0.06s server | +0.00s working) > Boots quit. shell$ cat users.csv localhost,root,,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y, Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,,,,,0,0,0,0

slide-34
SLIDE 34

OSCON 2010 Using Drizzle 34

Get involved!

  • http://drizzle.org/
  • https://launchpad.net/drizzle
  • Contact me at http://oddments.org/
  • Stickers!