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