Live Demo Achieving Fault Tolerance in Your JEE/Spring App
In this Demo <ul><li>How GigaSpaces XAP guarantees continuous High Availability even under  Database Failure </li></ul><ul...
Application High Level  Architecture <ul><li>GigaSpaces Components: </li></ul><ul><li>Load balancer agent </li></ul><ul><l...
How to Experience Database Failover? <ul><li>Step 1 – Deploy the demo on the cloud </li></ul><ul><li>Step 2 – Add some dat...
STEP 1 –  DEPLOY THE DEMO ON THE CLOUD
Deploy The Pet Clinic <ul><li>Click  Deploy </li></ul><ul><li>Wait until application status: </li></ul>Expected waiting ti...
STEP 2 –  ADD SOME DATA
Add a Pet Owner <ul><li>Click  View PetClinic (allow pop-ups if necessary) </li></ul><ul><li>Click  Find Owner </li></ul><...
Validate Addition of Pet Owner <ul><li>Click  Home Click  Find Owner </li></ul><ul><li>Click  Find Owners  button </li></u...
Validate Data Persistency <ul><li>Click  Database (follow plug-in instructions) </li></ul><ul><li>When MySQL opens, type: ...
Step 2 Recap <ul><li>The new pet owner is added to:  </li></ul><ul><ul><li>The In-Memory Data Grid </li></ul></ul><ul><ul>...
STEP 3 –  EXPERIENCE DATABASE FAILURE
Database Connection Failure Database  (Commodity, Background) Network  Load-Balancer Web Container/  App Server In-Memory ...
Disconnect Database (Simulating Failure) <ul><li>Locate the Database machine </li></ul><ul><li>Click the  Block Network  b...
Add a Pet Owner <ul><li>Click  Home Click  Find Owner  </li></ul><ul><li>Click  Add Owner Fill in the details of yet anoth...
Validate Data Availability Despite DB Failure <ul><li>Click  Home Click  Find Owner </li></ul><ul><li>Click  Find Owners  ...
Validate Owner Data Was NOT Persisted <ul><li>Make sure 30 seconds have passed since blocking network, to give the databas...
Step 3 Recap <ul><li>Disconnected database  </li></ul><ul><li>Added a new owner </li></ul><ul><li>Entry was added to the I...
STEP 4 –  WITNESS SYSTEM RECOVERY FROM DATABASE FAILURE
Restoring Database Connection Database  (Commodity, Background) Network  Load-Balancer Web Container/  App Server In-Memor...
Restore Database <ul><li>Locate the Database machine. Click the  Allow Network  button. </li></ul><ul><li>Wait a few secon...
Validate Data Persistency <ul><li>Switch to MySQL and type:  select * from owners;  </li></ul>Ensure the new pet owner is ...
What Did this Demonstration Show? <ul><li>A standard web application that maintained availability despite a database failu...
THANK YOU! Download the demo source code to run on your machine:   http://www.openspaces.org/display/DAE/GigaSpaces+PetCli...
Upcoming SlideShare
Loading in...5
×

GigaSpaces pet clinic demo

1,289

Published on

GigaSpaces pet clinic demo ..

1 Comment
1 Like
Statistics
Notes
No Downloads
Views
Total Views
1,289
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
13
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "GigaSpaces pet clinic demo"

  1. 1. Live Demo Achieving Fault Tolerance in Your JEE/Spring App
  2. 2. In this Demo <ul><li>How GigaSpaces XAP guarantees continuous High Availability even under Database Failure </li></ul><ul><li>Use of a popular standard web application stack </li></ul>
  3. 3. Application High Level Architecture <ul><li>GigaSpaces Components: </li></ul><ul><li>Load balancer agent </li></ul><ul><li>Web container </li></ul><ul><li>In-Memory Data Grid </li></ul>Database (Commodity, Background) Network Load-Balancer Web Container/ App Server In-Memory Data Grid <ul><li>Data Grid used for: </li></ul><ul><li>Performance boost </li></ul><ul><li>Reduction of DB load </li></ul><ul><li>Isolation of DB failure </li></ul>
  4. 4. How to Experience Database Failover? <ul><li>Step 1 – Deploy the demo on the cloud </li></ul><ul><li>Step 2 – Add some data </li></ul><ul><li>Step 3 – Experience database failure </li></ul><ul><li>Step 4 – Witness system healing from data crash </li></ul>
  5. 5. STEP 1 – DEPLOY THE DEMO ON THE CLOUD
  6. 6. Deploy The Pet Clinic <ul><li>Click Deploy </li></ul><ul><li>Wait until application status: </li></ul>Expected waiting time: ~7 min Deployed
  7. 7. STEP 2 – ADD SOME DATA
  8. 8. Add a Pet Owner <ul><li>Click View PetClinic (allow pop-ups if necessary) </li></ul><ul><li>Click Find Owner </li></ul><ul><li>Click Add Owner Fill in the details of your imaginary pet owner </li></ul>
  9. 9. Validate Addition of Pet Owner <ul><li>Click Home Click Find Owner </li></ul><ul><li>Click Find Owners button </li></ul><ul><li>Validate the addition of the new pet owner </li></ul>
  10. 10. Validate Data Persistency <ul><li>Click Database (follow plug-in instructions) </li></ul><ul><li>When MySQL opens, type: select * from owners; </li></ul>Ensure the new pet owner is listed
  11. 11. Step 2 Recap <ul><li>The new pet owner is added to: </li></ul><ul><ul><li>The In-Memory Data Grid </li></ul></ul><ul><ul><li>The Database </li></ul></ul>
  12. 12. STEP 3 – EXPERIENCE DATABASE FAILURE
  13. 13. Database Connection Failure Database (Commodity, Background) Network Load-Balancer Web Container/ App Server In-Memory Data Grid Disconnecting the database does not affect the end-user experience See it for yourself! Instructions are next…
  14. 14. Disconnect Database (Simulating Failure) <ul><li>Locate the Database machine </li></ul><ul><li>Click the Block Network button (located to the right) </li></ul>The machine is rebooted and data connections are blocked!
  15. 15. Add a Pet Owner <ul><li>Click Home Click Find Owner </li></ul><ul><li>Click Add Owner Fill in the details of yet another pet owner </li></ul>A new owner was added to the IMDG, but NOT to the database! (database is disconnected)
  16. 16. Validate Data Availability Despite DB Failure <ul><li>Click Home Click Find Owner </li></ul><ul><li>Click Find Owners button </li></ul><ul><li>Validate the addition of the new pet owner </li></ul>
  17. 17. Validate Owner Data Was NOT Persisted <ul><li>Make sure 30 seconds have passed since blocking network, to give the database machine time to reboot. </li></ul><ul><li>Re-open the MySQL window and type: select * from owners; </li></ul>Ensure the new pet owner does NOT exist
  18. 18. Step 3 Recap <ul><li>Disconnected database </li></ul><ul><li>Added a new owner </li></ul><ul><li>Entry was added to the In-Memory Data Grid, but NOT to the database! </li></ul>Application runs as usual despite database failure!
  19. 19. STEP 4 – WITNESS SYSTEM RECOVERY FROM DATABASE FAILURE
  20. 20. Restoring Database Connection Database (Commodity, Background) Network Load-Balancer Web Container/ App Server In-Memory Data Grid Restoring database connection and data persistency is initiated automatically Instructions are next…
  21. 21. Restore Database <ul><li>Locate the Database machine. Click the Allow Network button. </li></ul><ul><li>Wait a few seconds for the database to be updated. </li></ul>Allow Network
  22. 22. Validate Data Persistency <ul><li>Switch to MySQL and type: select * from owners; </li></ul>Ensure the new pet owner is listed
  23. 23. What Did this Demonstration Show? <ul><li>A standard web application that maintained availability despite a database failure </li></ul><ul><li>The application was not affected by either the database failure OR restoration </li></ul>
  24. 24. THANK YOU! Download the demo source code to run on your machine: http://www.openspaces.org/display/DAE/GigaSpaces+PetClinic
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×