jonas developer workshop – - [email protected] 1 - 23/02/2004 status emmanuel cecchet...
TRANSCRIPT
![Page 1: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/1.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 1 - 23/02/2004
status
Emmanuel [email protected]
![Page 2: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/2.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 2 - 23/02/2004
Outline
OverviewAdvanced conceptsQuery cachingHorizontal scalabilityMonitoringPerspectives
![Page 3: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/3.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 3 - 23/02/2004
Motivations
J2EE performance scalability bounded by database performance
Database tier must be–scalable–fault tolerant (high availability + failover)–without modifying the client application–using open source databases–on commodity hardware
![Page 4: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/4.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 4 - 23/02/2004
Internet
How do we want to use ?
• end-to-end open source solution for large scale J2EE clustered application servers
• cost-effective solution for both small and large configurations
Apache
MySQL
![Page 5: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/5.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 5 - 23/02/2004
Redundant Array of Inexepensive Databases
RAIDb controller– gives the view of a single database to the client– balance the load on the database backends
RAIDb levels– RAIDb-0: full partitioning– RAIDb-1: full mirroring– RAIDb-2: partial replication– composition possible
![Page 6: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/6.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 6 - 23/02/2004
C-JDBC
Middleware implementing RAIDbTwo components
– generic JDBC 2.0 driver (C-JDBC driver)– C-JDBC Controller
C-JDBC Controller provides– performance scalability– high availability– failover– caching, logging, monitoring, …
Supports heterogeneous databases
![Page 7: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/7.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 7 - 23/02/2004
Using JOnAS with C-JDBC
• Without C-JDBC
Database
JDBCDriver
![Page 8: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/8.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 8 - 23/02/2004
Pooling
Cache
ControllerDatabaseVirtual
Driver
Using JOnAS with C-JDBC
Update the datasource to use the C-JDBC driver
Backend
JDBCDriver
JOnAS
![Page 9: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/9.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 9 - 23/02/2004
What C-JDBC offers
No application modificationNo JOnAS modificationNo database modification
DatabaseVirtual
BackendBackend recovery
Pooling
Cache
ControllerDatabaseVirtual
JDBCDriver
Load balancing
Driver
![Page 10: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/10.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 10 - 23/02/2004
Outline
OverviewAdvanced conceptsQuery cachingHorizontal scalabilityMonitoringPerspectives
![Page 11: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/11.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 11 - 23/02/2004
Inside the 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
![Page 12: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/12.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 12 - 23/02/2004
Fault tolerant recovery log
C-JDBC Controller
MySQL MySQL
Application virtual database
Database Backend
Database Backend
Request Manager
Request Cache
Scheduler
Load balancer
Recovery Log
Authentication Manager
MySQL
Database Backend
Recovery virtual database
Request Manager
SchedulerLoad balancer
Authentication Manager
C-JDBC driver
Client application (Servlet, EJB, ...)
Checkpointing service
Database Backend
Database Backend
C-JDBC driver
MySQL
![Page 13: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/13.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 13 - 23/02/2004
Cascading controller
DB 6DB 5
DB native JDBC driver
DB 7
C-JDBC driver
DB 1 DB 2
DB native JDBC driver
DB 3
DB native JDBC driver
DB 4
C-JDBC controller Full replication
C-JDBC controller Full replication
C-JDBC controller Full replication
C-JDBC controller Full replication
C-JDBC driverJVM
Client program
C-JDBC driver
JVM
Client program
C-JDBC driver
JVM
Client program
C-JDBC driver
C-JDBC driver
![Page 14: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/14.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 14 - 23/02/2004
Heterogeneity support
application alreadywritten for a specific[commercial] database
user defined rulesfor on-the-fly queryrewriting to executeon heterogeneousbackends
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, ...
![Page 15: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/15.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 15 - 23/02/2004
Outline
OverviewAdvanced conceptsQuery cachingHorizontal scalabilityMonitoringPerspectives
![Page 16: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/16.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 16 - 23/02/2004
Query caching status
Cache contains a list of SQL->ResultSetPolicy defined by queryPattern->Policy3 policies
– EagerCaching: variable granularities for invalidations– RelaxedCaching: invalidations based on timeout– NoCaching: never cached
RUBiS bidding mixwith 450 clients
No cache Coherentcache
Relaxedcache
Throughput (rq/min) 3892 4184 4215
Avg response time 801 ms 284 ms 134 ms
Database CPU load 100% 85% 20%
C-JDBC CPU load - 15% 7%
![Page 17: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/17.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 17 - 23/02/2004
RUBiS - Tomcat withoutC-JDBC caching
Tomcat~50% cpu
1 Database100% cpu
Throughput: 3900 pages/min
![Page 18: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/18.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 18 - 23/02/2004
RUBiS - Tomcat withC-JDBC relaxed caching
Tomcat~55% cpu
1 Database~20% cpu
Throughput: 4200 pages/min
C-JDBC <10% cpu
![Page 19: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/19.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 19 - 23/02/2004
JOnAS and C-JDBC query caching
RUBiS
Throughput(req/min)
Response time (ms)
No cache No cache
Servlet 3890 4140 744 310JOnAS SFCMP 1.1 2947 3418 2929 2045JOnASCMP 2.0 2178 2450 6372 4630
![Page 20: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/20.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 20 - 23/02/2004
Outline
OverviewAdvanced conceptsQuery cachingHorizontal scalabilityMonitoringPerspectives
![Page 21: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/21.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 21 - 23/02/2004
Horizontal scalability
JGroups for controller synchronizationGroups messages for writes only
DB1 DB2 DB3 DB4
Controller1
DB1 DB2 DB3 DB4
Controller1 Controller2
Client 1 Client... Client n Client 1 Client... Client n
![Page 22: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/22.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 22 - 23/02/2004
Horizontal scalability
Centralized write approach issues
Issues with transactions assigned to connections
DB1 DB2 DB3 DB4
Controller1 Controller2
commit
DB1 DB2 DB3 DB4
Controller1 Controller2
commit
commit commit
DB1 DB2 DB3 DB4
Controller2
? ? ? ?
DB1 DB2
Controller1 Controller2
DB1 DB2
Controller1 Controller2
T1(Read)
T1(R)
DB1 DB2
Controller1 Controller2
T1(Write)
T1(R)T1(W) T2(W)
![Page 23: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/23.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 23 - 23/02/2004
Horizontal scalability
General case for a write query– 3 multicast + 2n unicast
DistributedVirtualDatabase@controller2
DistributedRequestManager
DistributedVirtualDatabase@controller3
DistributedVirtualDatabase@controller1
DistributedRequestManager
DistributedRequestManager
execWriteRequest(AbstractWriteRequest)
Scheduler
Write query handler
Load Balancer
Scheduler
Load Balancer
Distributed scheduling handler
Wait for schedulers replies
Send request to all controllers
Send execute request order to all controllers
Wait for load balancer replies
Distributed load balancer handler
Scheduler
Load Balancer
Distributed scheduling handler
Distributed load balancer handler
Notify controllers of completion success or not
Distributed scheduling handler
Distributed load balancer handler
Notify scheduler of completion
Return result
return result
Notify scheduler of completion
Notify scheduler of completion
![Page 24: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/24.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 24 - 23/02/2004
Horizontal scalability
Solution: No backend sharing– 1 multicast + n unicast [+ 1 multicast]
DB1 DB2 DB3 DB4 DB5 DB6
Controller1 Controller2 Controller3
DistributedVirtualDatabase@controller2
DistributedVirtualDatabase@controller3
DistributedVirtualDatabase@controller1
DistributedRequestManager
DistributedRequestManager
execWriteRequest(AbstractWriteRequest)DistributedRequestManager
Scheduler
Write query handler
Load Balancer
Scheduler
Load Balancer
Distributed scheduling handler
Send request to all controllers
Wait for load balancer replies
Distributed load balancer handler
Scheduler
Load Balancer
Distributed scheduling handler
Distributed load balancer handler
Notify controller(s) that have failed if other have succeeded
Distributed scheduling handler
Distributed load balancer handler
Wait if all backends failed
Return result
return result
Wait if all backends failed
Wait if all backends failed
![Page 25: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/25.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 25 - 23/02/2004
Horizontal scalability
Issues with JGroups– resources needed by a channel– instability of throughput with UDP– performance scalability
TCP better than UDP but– unable to disable reliability on top of TCP– unable to disable garbage collection– ordering implementation is sub-optimal
Need for a new group communication layer optimized for cluster
![Page 26: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/26.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 26 - 23/02/2004
Horizontal scalability
JGroups performance on UDP/FastEthernet
![Page 27: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/27.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 27 - 23/02/2004
Outline
OverviewAdvanced conceptsQuery cachingHorizontal scalabilityMonitoringPerspectives
![Page 28: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/28.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 28 - 23/02/2004
Design choices
JMX for both administration and monitoring– JMX server is MX4J
HTTP console for basic features but not suited for monitoring
Swing console for monitoring– uses JMX/RMI connector
Currently working on a scalable monitoring infrastructure
![Page 29: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/29.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 29 - 23/02/2004
Online Monitoring
![Page 30: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/30.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 30 - 23/02/2004
Viewing logs remotely
![Page 31: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/31.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 31 - 23/02/2004
Outline
OverviewAdvanced conceptsQuery cachingHorizontal scalabilityMonitoringPerspectives
![Page 32: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/32.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 32 - 23/02/2004
Current status
C-JDBC 1.0 rc2 releaseWeb site: >100.000 hits per monthDownloads: >1200 per monthMailing lists: 134 subscribers
Ready for production environments
![Page 33: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/33.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 33 - 23/02/2004
Ongoing work
Scalable group communication middleware for clusters– Needed for horizontal scalability
– Decouple application streams from network channels
Monitoring– Continuous monitoring stored in repositories
– Generic monitoring console for both online monitoring and monitoring history browsing
Administration– Fully featured administration console– Graphical configuration and deployment of centralized/distributed backeds
and controllers (offline/online)– Dynamic reconfiguration
Misc.– Automated Load testing– RPM packaging (JPackage)
![Page 34: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/34.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 34 - 23/02/2004
Questions & Answers_________
Thanks to all users and contributors ...
http://c-jdbc.objectweb.org
![Page 35: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/35.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 35 - 23/02/2004
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
![Page 36: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/36.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 36 - 23/02/2004
TPC-W Performance(Amazon.com)
0
200
400
600
800
1000
1200
1400
1600
0 1 2 3 4 5 6
Number of nodes
Th
rou
gh
pu
t in
req
ues
ts p
er m
inu
te
Single DB
RAIDb-0
RAIDb-1
RAIDb-2
![Page 37: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/37.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 37 - 23/02/2004
Outline
OverviewFault tolerancePerformanceNew featuresRoadmap
![Page 38: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/38.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 38 - 23/02/2004
Building the initial state
Octopus is an ETL tool Use Octopus to store a dump of
the initial database state
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
![Page 39: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/39.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 39 - 23/02/2004
Journaling
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
![Page 40: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/40.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 40 - 23/02/2004
Adding backend on the fly
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
![Page 41: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/41.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 41 - 23/02/2004
Synchronizing backends
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
![Page 42: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/42.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 42 - 23/02/2004
Expanded Cluster
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
![Page 43: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/43.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 43 - 23/02/2004
Handling a backend failure
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
![Page 44: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/44.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 44 - 23/02/2004
Restoring a backend
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
![Page 45: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/45.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 45 - 23/02/2004
Re-synchronization
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
![Page 46: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/46.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 46 - 23/02/2004
Healed Cluster
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
![Page 47: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/47.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 47 - 23/02/2004
Prototype
C-JDBC Management Framework
Shared design
![Page 48: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/48.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 48 - 23/02/2004
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
![Page 49: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/49.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 49 - 23/02/2004
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
![Page 50: JOnAS developer workshop – - c-jdbc@objectweb.org 1 - 23/02/2004 status Emmanuel Cecchet c-jdbc@objectweb.org](https://reader030.vdocument.in/reader030/viewer/2022032803/56649e2c5503460f94b1b5ba/html5/thumbnails/50.jpg)
JOnAS developer workshop – http://www.objectweb.org - [email protected] 50 - 23/02/2004
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