Upload
tokala
View
21
Download
0
Tags:
Embed Size (px)
DESCRIPTION
An open source middleware to build Redundant Array of Inexpensive Databases. Emmanuel Cecchet. INRIA key figures. A public scientific and technological research institute in computer science and control under the dual authority of the Ministry of Research and the Ministry of Industry. - PowerPoint PPT Presentation
Citation preview
An open source middleware to build Redundant Array of Inexpensive
Databases
Emmanuel Cecchet
http://c-jdbc.objectweb.org/ - [email protected] 2 - 07/11/2003
Budget: 120 M€ (tax not incl.)
900 permanent staff400 researchers500 engineers, technical and administrative
450 researchers from other organizations700 Ph.D students200 external collaborators750 trainees, post-doctoral students, visiting researchers from abroad
(universities or industry))6 Research Units
A scientific force of 3,000
INRIA key figures
Jan. 2003A public scientific and technological research institutein computer science and control
under the dual authority of the Ministry of Research and the Ministry of Industry
INRIA Rhône-Alpes
http://c-jdbc.objectweb.org/ - [email protected] 3 - 07/11/2003
• Itanium-2 processors• 104 nodes (Dual 64 bits 900 MHz processors, 3 GB memory, 72 GB
local disk) connected through a Myrinet network• 208 processors, 312 GB memory, 7.5 TB disk• Connected to the GRID• Linux OS (RedHat Advanced Server)• First Linpack experiments at INRIA
(Aug. 03) have reached 560 GFlop/s
• Applications : Grid computing,classical scientific computing, high performance Internet servers, …
iCluster 2
http://c-jdbc.objectweb.org/ - [email protected] 4 - 07/11/2003
ObjecWeb key figures
Open source middleware development Based on open standard
J2EE, CORBA, OSGi…
International consortiumFounded by INRIA, Bull and FT R&D in 2001
Academic partnersEuropean universities and research centers
Industrial partnersRedHat, Suse, …NEC, Bull, France Telecom, …
http://c-jdbc.objectweb.org/ - [email protected] 5 - 07/11/2003
Common Software & Architecture for Component Based Development
OS
Gi
Hardware & OS
Applications
J2E
E
CC
M
...
Dedicated Middleware Platform
Networked Resources
JVM
Tra
nsa
ctio
ns
Per
sist
ence
Dep
loym
ent
...
Co
mp
osi
tio
n
...
Application Servers
Database
Connectivity
Inte
roper
abili
ty
To
ols
Fra
mew
ork
s
Co
mp
on
ents
...
JOn
AS
Op
enC
CM
JEF
RE
E
Pro
Act
iive
JOR
M/M
ED
OR
JOT
M
OS
CA
R
Fra
cta
lThink
JORAM
DotNetJ
C-JDBC
RmiJdbc
Octopus
Enhydra
Zeus
Kil
im
CAROL
Jon
ath
an
Sp
eed
o
RUBiS
Bonita
JAWE
XMLC
JMOB
http://c-jdbc.objectweb.org/ - [email protected] 6 - 07/11/2003
Outline
MotivationsRAIDbC-JDBCPerformanceLessons learnedConclusion
http://c-jdbc.objectweb.org/ - [email protected] 7 - 07/11/2003
Why did we design ?
Scalability evaluation of J2EE servers performance bounded by database even with a single server how to compare middleware performance ? how to evaluate clustering features in J2EE servers ?
Solutions Large SMP machine: too expensive Open source solution: do it yourself!
Features we wanted ordered by priority scalability on commodity hardware using open source databases fault tolerance (high availability + failover) without modifying the client application
http://c-jdbc.objectweb.org/ - [email protected] 8 - 07/11/2003
Internet
How do we want to use ?
From small dynamic content web sites using a centralized open source database
To an end-to-end open source solution for large scale J2EE clustered application servers
Apache
MySQL
http://c-jdbc.objectweb.org/ - [email protected] 9 - 07/11/2003
Sardes project objectives:Autonomic J2EE clusters
Self administration and reconfiguration
Apache MySQL
JSPHTML
Tomcat admin module
Monitoring
JMX
JVM
EJB
JMX
JVMJVM
JOnAS admin module C-JDBC admin
module
Fault tolerance policy Load balancing policy
JMX
Apache admin module
Eventchannels
SNMP
Network QoS
http://c-jdbc.objectweb.org/ - [email protected] 10 - 07/11/2003
Outline
MotivationsRAIDbC-JDBCPerformanceLessons learnedConclusion
http://c-jdbc.objectweb.org/ - [email protected] 11 - 07/11/2003
RAIDb - Definition
Redundant Array of Inexpensive Databasesbetter performance and fault tolerance than a
single database, at a low cost, by combining multiple database instances into an array of databases
RAIDb levels offers various tradeoff of performance and fault tolerance
http://c-jdbc.objectweb.org/ - [email protected] 12 - 07/11/2003
Key ideas
RAIDb controllergives the view of a single database to the clientbalance the load on the database backends
RAIDb levelsRAIDb-0: full partitioningRAIDb-1: full mirroringRAIDb-2: partial replicationcomposition possible
http://c-jdbc.objectweb.org/ - [email protected] 13 - 07/11/2003
RAIDb levels
RAIDb-0partitioningno duplication and no fault toleranceat least 2 nodes
table 2 & 3 table ...
RAIDb controller
table n-1table 1 table n
SQL requests
http://c-jdbc.objectweb.org/ - [email protected] 14 - 07/11/2003
RAIDb levels
RAIDb-1mirroringperformance bounded by write broadcastat least 2 nodes
Full DB Full DB
RAIDb controller
Full DBFull DB Full DB
SQL requests
http://c-jdbc.objectweb.org/ - [email protected] 15 - 07/11/2003
RAIDb levels
RAIDb-1ecmirroring + error checkingsupport Byzantine failureserror checking
read request sent to multiple databasesreplies comparedresult returned only if a quorum is reached
at least 3 nodes
http://c-jdbc.objectweb.org/ - [email protected] 16 - 07/11/2003
RAIDb levels
RAIDb-2partial replicationat least 2 copies of each tableat least 3 nodes
table x table y
RAIDb controller
table x & yFull DB table z
SQL requests
http://c-jdbc.objectweb.org/ - [email protected] 17 - 07/11/2003
RAIDb levels composition
RAIDb-0-1RAIDb-0 at the top levelRAIDb-1 underneath
table x & ytable x & y
RAIDb-1 controller
table x & y
RAIDb-0 controller
SQL requests
table w table w
RAIDb-1 controller
table z
RAIDb-1 controller
table z
http://c-jdbc.objectweb.org/ - [email protected] 18 - 07/11/2003
RAIDb levels composition
RAIDb-1-0no limit to the
compositiondeepness
table x & ytable w
RAIDb-0 controller
table z
RAIDb-1 controller
SQL requests
table x table y
RAIDb-0 controller
table z
table w table y
RAIDb-0 controller
table x & z
table w
http://c-jdbc.objectweb.org/ - [email protected] 19 - 07/11/2003
Outline
MotivationsRAIDbC-JDBC
OverviewInternalsScalabilityCheckpointing and Recovery
PerformanceLessons learnedConclusion
http://c-jdbc.objectweb.org/ - [email protected] 20 - 07/11/2003
C-JDBC – Key ideas
Middleware implementing RAIDbTwo components
generic JDBC 2.0 driver (C-JDBC driver)C-JDBC Controller
C-JDBC Controller providesperformance scalabilityhigh availabilityfailovercaching, logging, monitoring, …
Supports heterogeneous databases
http://c-jdbc.objectweb.org/ - [email protected] 21 - 07/11/2003
C-JDBC – Overview
Database Database
C-JDBC Controller Scalability - Fault tolerance - Failover -
Monitoring - Caching - Logging - ...
Database JDBC driver
DatabaseDatabase Database
Database
JVM
Java client program
Database JDBC driver
JVM
EJB Container JOnAS, WebLogic,
JBoss, WebSphere, ...
Servlet container Tomcat, Jetty, ...
Database JDBC driver
MySQL, PostgreSQL, Oracle, DB2, InstantDB, ...
Database JDBC driver
JVM
Java client program
C-JDBC driver
JVM
EJB Container
JOnAS,
WebLogic, JBoss, WebSphere, ...
Servlet container
Tomcat,
Jetty, ...
C-JDBC driver
C-JDBC driver
JVM
MySQL, PostgreSQL, Oracle, DB2, InstantDB, ...
JVM
C-JDBC
No scalability No fault tolerance
No failover
EJB Container
JOnAS,
WebLogic, JBoss, WebSphere, ...
Servlet container
Tomcat,
Jetty, ...
http://c-jdbc.objectweb.org/ - [email protected] 22 - 07/11/2003
C-JDBC RAIDb-1 example
no client codemodification
original PostgreSQLdriver and RDBMSengine
PostgreSQL PostgreSQL
C-JDBC Controller RAIDb-1
PostgreSQL JDBC driver
PostgreSQL
Java client program
C-JDBC driver
JVM
C-JDBC driver
C-JDBC driver
JVM
JVM
EJB Container JOnAS, WebLogic,
JBoss, WebSphere, ...
Servlet container Tomcat, Jetty, ...
http://c-jdbc.objectweb.org/ - [email protected] 23 - 07/11/2003
C-JDBC RAIDb-2 example
supports clusterof heterogeneousRDBMS
unload a singleOracle DB withseveral MySQL
MySQL MySQL
C-JDBC Controller RAIDb-2
MySQL JDBC driver
MySQLOracle
Java client program
C-JDBC driver
JVM
C-JDBC driver
C-JDBC driver
JVM
JVM
Oracle JDBC driver
EJB Container JOnAS, WebLogic,
JBoss, WebSphere, ...
Servlet container Tomcat, Jetty, ...
http://c-jdbc.objectweb.org/ - [email protected] 24 - 07/11/2003
Outline
MotivationsRAIDbC-JDBC
OverviewInternalsScalabilityCheckpointing and Recovery
PerformanceLessons learnedConclusion
http://c-jdbc.objectweb.org/ - [email protected] 25 - 07/11/2003
Inside the C-JDBC Controller
XML configuration file
C-JDBC Controller
MySQL
C-JDBC driver
Java client program
(Servlet, EJB, ...)
XML engine
MySQL
Virtual database
Database Backend
Connection Manager
Database Backend
Connection Manager
Request Manager
Request Cache
Scheduler
Load balancer
MySQL JDBC driver
MySQL JDBC driver
Configuration &
administrationAdministration console
RMIRMI
Recovery Log
Authentication Manager
MySQL
Database Backend
Connection Manager
MySQL JDBC driver
Virtual database
Database Backend
Connection Manager
Database Backend
Connection Manager
Request Manager
Request Cache
Scheduler
Load balancer
Recovery Log
Authentication Manager
Oracle
Oracle JDBC driver
Oracle JDBC driver
Oracle
SocketsSockets
JMX
http://c-jdbc.objectweb.org/ - [email protected] 26 - 07/11/2003
Virtual Database
MySQL
C-JDBC driver
Java client program
(Servlet, EJB, ...)
MySQL
Virtual database
Database Backend
Connection Manager
Database Backend
Connection Manager
Request Manager
Request Cache
Scheduler
Load balancer
MySQL JDBC driver
MySQL JDBC driver
Recovery Log
Authentication Manager
MySQL
Database Backend
Connection Manager
MySQL JDBC driver
gives the view of a single database
establishes the mapping between the database name used by the application and the backend specific settings
backends can be added and removed dynamically
configured using an XML configuration file
http://c-jdbc.objectweb.org/ - [email protected] 27 - 07/11/2003
Authentication Manager
MySQL
C-JDBC driver
Java client program
(Servlet, EJB, ...)
MySQL
Virtual database
Database Backend
Connection Manager
Database Backend
Connection Manager
Request Manager
Request Cache
Scheduler
Load balancer
MySQL JDBC driver
MySQL JDBC driver
Recovery Log
Authentication Manager
MySQL
Database Backend
Connection Manager
MySQL JDBC driver
Matches real login/password used by the application with backend specific login/ password
Administrator login to manage the virtual database
http://c-jdbc.objectweb.org/ - [email protected] 28 - 07/11/2003
Scheduler
MySQL
C-JDBC driver
Java client program
(Servlet, EJB, ...)
MySQL
Virtual database
Database Backend
Connection Manager
Database Backend
Connection Manager
Request Manager
Request Cache
Scheduler
Load balancer
MySQL JDBC driver
MySQL JDBC driver
Recovery Log
Authentication Manager
MySQL
Database Backend
Connection Manager
MySQL JDBC driver
Manages concurrency controlSpecific implementations for
Single DB, RAIDb 0, 1 and 2Query-levelOptimistic and pessimistic
transaction leveluses the database schema that is
automatically fetched from backends
http://c-jdbc.objectweb.org/ - [email protected] 29 - 07/11/2003
Request cache
MySQL
C-JDBC driver
Java client program
(Servlet, EJB, ...)
MySQL
Virtual database
Database Backend
Connection Manager
Database Backend
Connection Manager
Request Manager
Request Cache
Scheduler
Load balancer
MySQL JDBC driver
MySQL JDBC driver
Recovery Log
Authentication Manager
MySQL
Database Backend
Connection Manager
MySQL JDBC driver
caches results from SQL requestsimproved SQL statement analysis to
limit cache invalidationstable based invalidationscolumn based invalidationssingle-row SELECT optimization
request parsing possible in theC-JDBC driver
offload the controllerparsing caching in the driver
http://c-jdbc.objectweb.org/ - [email protected] 30 - 07/11/2003
Load balancer 1/2
MySQL
C-JDBC driver
Java client program
(Servlet, EJB, ...)
MySQL
Virtual database
Database Backend
Connection Manager
Database Backend
Connection Manager
Request Manager
Request Cache
Scheduler
Load balancer
MySQL JDBC driver
MySQL JDBC driver
Recovery Log
Authentication Manager
MySQL
Database Backend
Connection Manager
MySQL JDBC driver
RAIDb-0query directed to the backend having the
needed tables
RAIDb-1read executed by current threadwrite executed in parallel by a dedicated
thread per backendresult returned if one, majority or all commitif one node fails but others succeed, failing
node is disabled
RAIDb-2same as RAIDb-1 except that writes are
sent only to nodes owning the written table
http://c-jdbc.objectweb.org/ - [email protected] 31 - 07/11/2003
Load balancer 2/2
MySQL
C-JDBC driver
Java client program
(Servlet, EJB, ...)
MySQL
Virtual database
Database Backend
Connection Manager
Database Backend
Connection Manager
Request Manager
Request Cache
Scheduler
Load balancer
MySQL JDBC driver
MySQL JDBC driver
Recovery Log
Authentication Manager
MySQL
Database Backend
Connection Manager
MySQL JDBC driver
Static load balancing policiesRound-Robin (RR)Weighted Round-Robin (WRR)
Least Pending Requests First (LPRF)
request sent to the node that has the shortest pending request queue
efficient if backends are homogeneous in terms of performance
http://c-jdbc.objectweb.org/ - [email protected] 32 - 07/11/2003
Connection Manager
MySQL
C-JDBC driver
Java client program
(Servlet, EJB, ...)
MySQL
Virtual database
Database Backend
Connection Manager
Database Backend
Connection Manager
Request Manager
Request Cache
Scheduler
Load balancer
MySQL JDBC driver
MySQL JDBC driver
Recovery Log
Authentication Manager
MySQL
Database Backend
Connection Manager
MySQL JDBC driver
Connection pooling for a backend
Simple : no poolingRandomWait : blocking poolFailFast : non-blocking poolVariablePool : dynamic pool
Connection pools defined on a per login basis
resource management per logindedicated connections for admin
http://c-jdbc.objectweb.org/ - [email protected] 33 - 07/11/2003
Recovery Log
MySQL
C-JDBC driver
Java client program
(Servlet, EJB, ...)
MySQL
Virtual database
Database Backend
Connection Manager
Database Backend
Connection Manager
Request Manager
Request Cache
Scheduler
Load balancer
MySQL JDBC driver
MySQL JDBC driver
Recovery Log
Authentication Manager
MySQL
Database Backend
Connection Manager
MySQL JDBC driver
Checkpoints are associated with database dumps
Record all updates and transaction markers since a checkpoint
Used to resynchronize a database from a checkpoint
JDBCRecoveryLogstore information in a databasecan be re-injected in a C-JDBC
cluster for fault tolerance
http://c-jdbc.objectweb.org/ - [email protected] 34 - 07/11/2003
Outline
MotivationsRAIDbC-JDBC
OverviewInternalsScalabilityCheckpointing and Recovery
PerformanceLessons learnedConclusion
http://c-jdbc.objectweb.org/ - [email protected] 35 - 07/11/2003
C-JDBC scalability
Horizontal scalabilityprevents the controller to be a Single Point Of Failure
(SPOF)distributes the load among several controllersuses group communications for synchronization
C-JDBC Drivermultiple controllers automatic failover
jdbc:c-jdbc://node1:25322,node2:12345/myDB
connection cachingURL parsing/controller lookup caching
http://c-jdbc.objectweb.org/ - [email protected] 36 - 07/11/2003
C-JDBC – Horizontal scalability
Writes broadcasted by JGroups
Each backend is accessed in write by only one controller but possibly shared by all for reads
global transaction id computed locally
Group commit only for write transactions
MySQL
PostgreSQL
C-JDBC Controller
MySQL JDBC driver
PostgreSQL JDBC driver
C-JDBC driver
JVM
Java client program
C-JDBC driver
JVM
Java client program
C-JDBC driver
JVM
Java client program
C-JDBC driver
JVM
Java client program
C-JDBC Controller
JavaGroups
MySQL
PostgreSQL
MySQL JDBC driver
PostgreSQL JDBC driver
MySQL
http://c-jdbc.objectweb.org/ - [email protected] 37 - 07/11/2003
C-JDBC scalability
Vertical scalabilityallows nested RAIDb levelsallows tree architecture for scalable write broadcastnecessary with large number of backendsC-JDBC driver re-injected in C-JDBC controller
http://c-jdbc.objectweb.org/ - [email protected] 38 - 07/11/2003
C-JDBC vertical scalability
RAIDb-1-1with C-JDBC
no limit tocompositiondeepness
MySQL JDBC driver
C-JDBC driver
MySQL JDBC driver MySQL JDBC driver
C-JDBC controller RAIDb-1
C-JDBC controller RAIDb-1
C-JDBC controller RAIDb-1
C-JDBC controller RAIDb-1
C-JDBC driverJVM
Client program C-JDBC
driver
JVM
Client program
C-JDBC driver
JVM
Client program
MySQL MySQL MySQL MySQL MySQL MySQLMySQLMySQL
http://c-jdbc.objectweb.org/ - [email protected] 39 - 07/11/2003
C-JDBC vertical scalability
table x & ytable x & y
DB native JDBC driver
table x & y
C-JDBC driver
table w table w
DB native JDBC driver
table z
DB native JDBC driver
table z
C-JDBC controller RAIDb-0
C-JDBC controller RAIDb-1
C-JDBC controller RAIDb-1
C-JDBC controller RAIDb-1
C-JDBC driverJVM
Client program C-JDBC
driver
JVM
Client program
C-JDBC driver
JVM
Client programRAIDb-0-1
with C-JDBC
http://c-jdbc.objectweb.org/ - [email protected] 40 - 07/11/2003
Outline
MotivationsRAIDbC-JDBC
OverviewInternalsScalabilityCheckpointing and Recovery
PerformanceLessons learnedConclusion
http://c-jdbc.objectweb.org/ - [email protected] 41 - 07/11/2003
Checkpointing
Octopus is an ETL tool Use Octopus to store a dump of
the initial database state Currently done by the user using
the database specific dump tool
PostgreSQL
C-JDBC Controller
PostgreSQL JDBC driver
C-JDBC driver
JVM
EJB Container JOnAS, WebLogic,
JBoss, WebSphere, ...
disabled
dump for initial
checkpoint
Recovery LogOctopus
disabled
http://c-jdbc.objectweb.org/ - [email protected] 42 - 07/11/2003
Checkpointing
Backend is enabled All database updates are logged
(SQL statement, user, transaction, …)
PostgreSQL
C-JDBC Controller
PostgreSQL JDBC driver
C-JDBC driver
JVM
EJB Container JOnAS, WebLogic,
JBoss, WebSphere, ...
enabled
dump for initial
checkpoint
Recovery LogOctopus
JDBC Recovery Log
enabled
http://c-jdbc.objectweb.org/ - [email protected] 43 - 07/11/2003
Checkpointing
Add new backends while system online
Restore dump corresponding to initial checkpoint with Octopus
PostgreSQL
C-JDBC Controller
PostgreSQL JDBC driver
C-JDBC driver
JVM
EJB Container JOnAS, WebLogic,
JBoss, WebSphere, ...
dump for initial
checkpoint
Recovery Log
Octopus
PostgreSQL PostgreSQLdisabled disabledenabled
enabled
JDBC Recovery Log
http://c-jdbc.objectweb.org/ - [email protected] 44 - 07/11/2003
Checkpointing
Replay updates from the log
PostgreSQL
C-JDBC Controller
PostgreSQL JDBC driver
C-JDBC driver
JVM
EJB Container JOnAS, WebLogic,
JBoss, WebSphere, ...
dump for initial
checkpoint
Recovery Log
Octopus
PostgreSQL PostgreSQLenabled
enabled
JDBC Recovery Log
disableddisabled
http://c-jdbc.objectweb.org/ - [email protected] 45 - 07/11/2003
Checkpointing
Enable backends when done
PostgreSQL
C-JDBC Controller
PostgreSQL JDBC driver
C-JDBC driver
JVM
EJB Container JOnAS, WebLogic,
JBoss, WebSphere, ...
dump for initial
checkpoint
Recovery Log
Octopus
PostgreSQL PostgreSQLenabled
enabled
JDBC Recovery Log
enabledenabled
http://c-jdbc.objectweb.org/ - [email protected] 46 - 07/11/2003
Making new checkpoints
Disable one backend to have a coherent snapshot
Mark the new checkpoint entry in the log
Use Octopus to store the dump
...
dump for last
checkpoint
PostgreSQL
C-JDBC Controller
PostgreSQL JDBC driver
C-JDBC driver
JVM
EJB Container JOnAS, WebLogic,
JBoss, WebSphere, ...
dump for last
checkpoint
Recovery Log
Octopus
PostgreSQL PostgreSQLenabled
enabled
JDBC Recovery Log
enableddisabled
dump for initial
checkpoint
http://c-jdbc.objectweb.org/ - [email protected] 47 - 07/11/2003
Making new checkpoints
Replay missing updates from log
dump for
checkpoint
Octopus...
dump for last
checkpoint
dump for last
checkpoint
dump for initial
checkpoint
PostgreSQL
C-JDBC Controller
PostgreSQL JDBC driver
C-JDBC driver
JVM
EJB Container JOnAS, WebLogic,
JBoss, WebSphere, ...
Recovery Log
PostgreSQL PostgreSQLenabled
enabled
JDBC Recovery Log
disabled enabled
http://c-jdbc.objectweb.org/ - [email protected] 48 - 07/11/2003
Making new checkpoints
Re-enable backend when done
PostgreSQL
C-JDBC Controller
PostgreSQL JDBC driver
C-JDBC driver
JVM
EJB Container JOnAS, WebLogic,
JBoss, WebSphere, ...
dump for
checkpoint
Recovery Log
Octopus
PostgreSQL PostgreSQLenabled
enabled
JDBC Recovery Log
enabledenabled
...
dump for last
checkpoint
dump for last
checkpoint
dump for initial
checkpoint
http://c-jdbc.objectweb.org/ - [email protected] 49 - 07/11/2003
Recovery
A node fails!Automatically
disabled but should be fixed or changed by administrator
PostgreSQL
C-JDBC Controller
PostgreSQL JDBC driver
C-JDBC driver
JVM
EJB Container JOnAS, WebLogic,
JBoss, WebSphere, ...
dump for
checkpoint
Recovery Log
Octopus
PostgreSQL PostgreSQLenabled
enabled
JDBC Recovery Log
enableddisabled
...
dump for last
checkpoint
dump for last
checkpoint
dump for initial
checkpoint
http://c-jdbc.objectweb.org/ - [email protected] 50 - 07/11/2003
Recovery
Restore latest dump with Octopus
...
dump for last
checkpoint
PostgreSQL
C-JDBC Controller
PostgreSQL JDBC driver
C-JDBC driver
JVM
EJB Container JOnAS, WebLogic,
JBoss, WebSphere, ...
dump for last
checkpoint
Recovery Log
Octopus
PostgreSQL PostgreSQLenabled
enabled
JDBC Recovery Log
enableddisabled
dump for initial
checkpoint
http://c-jdbc.objectweb.org/ - [email protected] 51 - 07/11/2003
Recovery
Replay missing updates from log
dump for
checkpoint
Octopus...
dump for last
checkpoint
dump for last
checkpoint
dump for initial
checkpoint
PostgreSQL
C-JDBC Controller
PostgreSQL JDBC driver
C-JDBC driver
JVM
EJB Container JOnAS, WebLogic,
JBoss, WebSphere, ...
Recovery Log
PostgreSQL PostgreSQLenabled
enabled
JDBC Recovery Log
disabled enabled
http://c-jdbc.objectweb.org/ - [email protected] 52 - 07/11/2003
Recovery
Re-enable backend when done
PostgreSQL
C-JDBC Controller
PostgreSQL JDBC driver
C-JDBC driver
JVM
EJB Container JOnAS, WebLogic,
JBoss, WebSphere, ...
dump for
checkpoint
Recovery Log
Octopus
PostgreSQL PostgreSQLenabled
enabled
JDBC Recovery Log
enabledenabled
...
dump for last
checkpoint
dump for last
checkpoint
dump for initial
checkpoint
http://c-jdbc.objectweb.org/ - [email protected] 53 - 07/11/2003
Outline
MotivationsRAIDbC-JDBCPerformanceLessons learnedConclusion
http://c-jdbc.objectweb.org/ - [email protected] 57 - 07/11/2003
Fine-grain caching
Cache hit rate with TPC-Wbrowsing mixonly one database backend
ThroughputResponse
timeHit rate
No cache 9.1 req/s 3.30s
Table 12.9 req/s 1.96s 12.6%
Column 16 req/s 1.36s 48.8%
Column+
single-row16 req/s 1.35s 49.2%
http://c-jdbc.objectweb.org/ - [email protected] 58 - 07/11/2003
Fine-grain caching
Cache hit rate with TPC-Wshopping mixonly one database backend
ThroughputResponse
timeHit rate
No cache 12.8 req/s 3.11s
Table 13.5 req/s 2.58s 3.5%
Column 19.0 req/s 0.93s 30.0%
Column+
single-row20.2 req/s 0.84s 30.4%
http://c-jdbc.objectweb.org/ - [email protected] 59 - 07/11/2003
Outline
MotivationsRAIDbC-JDBCPerformanceLessons learnedConclusion
http://c-jdbc.objectweb.org/ - [email protected] 60 - 07/11/2003
Why did we design ?… Reloaded
Features we wanted ordered by priorityscalabilityon commodity hardwareusing open source databasesfault tolerance (high availability + failover)without modifying the client application
http://c-jdbc.objectweb.org/ - [email protected] 61 - 07/11/2003
Why users are using ?
JDBC standardOpen source solutionFeatures they want ordered by priority
fault tolerance (high availability + failover) [was 4/5]using open source existing databases [was 3/5]on commodity hardware [was 2/5]administration tools [was not]security [was not]scalability [was 1/5]without modifying the client application [was 5/5]
http://c-jdbc.objectweb.org/ - [email protected] 62 - 07/11/2003
How users are using ?
Hard to really knowJust default settings!Most common usage
existing applications (Tomcat/JBoss/JOnAS) with one MySQL/Postgres backend
add a second backend for fault tolerance and scalability
For things it was not designed forwrite mostly workloadsdistributed databaseshosting centers (administration tools missing)
http://c-jdbc.objectweb.org/ - [email protected] 63 - 07/11/2003
Lessons learned
Users do not use it for what it was first designed foradvanced features are never usedconcerned about ease of use and TCO
Default settings are importantGood technology is necessary but not
sufficient[administration] tools are neededminor bugs are ok for open source users
http://c-jdbc.objectweb.org/ - [email protected] 64 - 07/11/2003
Open problems
Partition of clustersUsers want control on
failure policyReconciliation must
also be user controlled
PostgreSQL
C-JDBC Controller
C-JDBC driver
JVM
Java client program
C-JDBC driver
JVM
Java client program
C-JDBC driver
JVM
Java client program
C-JDBC driver
JVM
Java client program
C-JDBC Controller
JavaGroups
PostgreSQL
http://c-jdbc.objectweb.org/ - [email protected] 65 - 07/11/2003
Open problems
Opening the architecture to the usersuser defined strategies when a fault or exception occurswhich interfaces/callbacks to provide ?
Monitoring needed for more accurate load balancing algorithms
Benchmarkingneed automatic evaluation of clustered serversplatform available: new INRIA 208 itanium-2 cluster
Sun Test Suiteshould help strengthening C-JDBC codeinteroperability with J2EE servers
http://c-jdbc.objectweb.org/ - [email protected] 66 - 07/11/2003
Outline
MotivationsRAIDbC-JDBCPerformanceLessons learnedConclusion
http://c-jdbc.objectweb.org/ - [email protected] 67 - 07/11/2003
Current status
C-JDBC 1.0b15 releaseGeneric JDBC 2.0 driverSchedulers and load balancers for RAIDb 0, 1 and 2Fine grain query cachingJDBC recovery logLogger/request playerJava installerUser documentation
Currently missingOctopus integrationRecovery for horizontal scalability RAIDb-1ec and RAIDb-2ecDynamic reconfiguration
http://c-jdbc.objectweb.org/ - [email protected] 68 - 07/11/2003
Stats as of Nov 6, 03
Downloadstotal : > 8300 downloads since may 2003last 30 days : > 2800 downloads> 430.000 hits since first release2nd most downloaded ObjectWeb project
Mailing [email protected]: 101 [email protected]: 18 subscribers
Team9 committers1 full-time INRIA engineer
http://c-jdbc.objectweb.org/ - [email protected] 69 - 07/11/2003
Conclusion
RAIDbclassification of replication techniquesdifficult to publish
C-JDBCopen platform for database replication at the
middleware levelRDBMS independentno application modification required
Lot of features missing … join us !
Questions ?Visit http://c-jdbc.objectweb.org
Bonus slides
http://c-jdbc.objectweb.org/ - [email protected] 72 - 07/11/2003
Fine-grain caching
increased throughput
better response time
even with a single database backend
http://c-jdbc.objectweb.org/ - [email protected] 73 - 07/11/2003
How do we build a community?
Necessary features (but not sufficient)open sourcestandard APIresponsiveness on the mailing list
VisibilityWeb: slashdot, TheServerSide, freshmeat, …Conferences: JAX, Middleware, LinuxWorld, ICAR, …
Our weak pointsno detailed design documentationbeta phase
http://c-jdbc.objectweb.org/ - [email protected] 74 - 07/11/2003
How do we interact with the user community?
only one mailing listbeing very responsive on the mailing list
reply even if we don’t have a response yetno direct communication with team but share everything
on the mailing list
benefit from engineers who work 1 week full-time to evaluate C-JDBC for their corporation
plan every feature request in the task list
http://c-jdbc.objectweb.org/ - [email protected] 75 - 07/11/2003
How do we interact with the developer community?
single user/developer mailing listpost all design questions/choices on the mailing
listmost users use default settingshard to get feedback about usage
very permissive to accept new commiters8 committers (3 outside ObjectWeb – 2 full time)2 contributors who didn’t want to become committersno problem so far
involve people in testing
http://c-jdbc.objectweb.org/ - [email protected] 76 - 07/11/2003
Lessons learned
Visibilityperpetual involvementtime consuming but necessary
Responsiveness to user queriesalways on the mailing listmakes first impression for many users
Involve users in all decisionsBe open
source, CVS, contributions, patches, …
http://c-jdbc.objectweb.org/ - [email protected] 77 - 07/11/2003
Freshmeat.net
Links to projectsUsers can subscribe to
be notified of new releases
Need to register project in all possible categories to have good visibility
One release per week is a good timing
3 new subscribers with every release
SlashdotWeeklyrelease
Fridayrelease
out oftown