gigaspaces pet clinic demo

24
Live Demo Achieving Fault Tolerance in Your JEE/Spring App

Upload: nati-shalom

Post on 30-May-2015

1.269 views

Category:

Documents


1 download

DESCRIPTION

GigaSpaces pet clinic demo ..

TRANSCRIPT

Page 1: GigaSpaces pet clinic demo

Live Demo

Achieving Fault Tolerance in Your JEE/Spring App

Page 2: GigaSpaces pet clinic demo

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

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

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

STEP 1 – DEPLOY THE DEMO ON THE CLOUD

Page 6: GigaSpaces pet clinic demo

Deploy The Pet Clinic

1. Click Deploy

2. Wait until application status:

Expected waiting time: ~7 min

Deployed

Page 7: GigaSpaces pet clinic demo

STEP 2 – ADD SOME DATA

Page 8: GigaSpaces pet clinic demo

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

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

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

Step 2 Recap

The new pet owner is added to: – The In-Memory Data Grid

– The Database

Page 12: GigaSpaces pet clinic demo

STEP 3 – EXPERIENCE DATABASE FAILURE

Page 13: GigaSpaces pet clinic demo

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

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

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

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

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

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

STEP 4 – WITNESS SYSTEM RECOVERY FROM DATABASE FAILURE

Page 20: GigaSpaces pet clinic demo

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

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

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

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

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