SlideShare a Scribd company logo
1 of 19
Download to read offline
© 2014 Hazelcast Inc.
How to speed up your Database.

DAVID BRIMLEY
SENIOR SOLUTIONS ARCHITECT
© 2014 Hazelcast Inc.
About me
2
"
Senior Solutions Architect for Hazelcast.

Oracle Coherence @ HSBC 2007-2010



Gemfire @ Nomura 2010 - 2013

Worked for Major Investment Banks in the City of
London.

Java Programmer since 1998.



David Brimley
@dbrimley
© 2014 Hazelcast Inc.
Agenda - 40 Minutes + Q&A time.
• Introduction to Hazelcast.

• The Slow Database problem.

• Adding Hazelcast for faster queries.

• And doing the same for inserts and updates.

• Q&A
3
© 2014 Hazelcast Inc.
Introduction to Hazelcast
• Hazelcast the Open Source Project



www.hazelcast.org"
"
• Hazelcast the Company



www.hazelcast.com

4
© 2014 Hazelcast Inc.
The Slow Database Problem
• Traditional Databases are hard to scale.

• They cost a lot in time and effort.

• Common solution is a Cache."
"
• IMDG like Hazelcast give horizontal scalability.
5
© 2014 Hazelcast Inc.
The Hazelcast Approach
• Cluster of JVM that all contribute memory.

• Client API can work against Maps.

• Query using Predicates or SQL like strings."
"
• Faster Reads using the Cache.

• Faster Update/Inserts using write-behind.

6
© 2014 Hazelcast Inc.
The Test Suite
• Postgres 9.3.4 installed on a Macbook Pro Dual
Core with 16gb RAM and 256gb SSD.

• Dataset : Stackoverflow Public Dump (47gb)

• Hazelcast 3.2
7
© 2014 Hazelcast Inc.© 2014 Hazelcast Inc.© 2014 Hazelcast Inc.
The Simple Postgres Java DAO
8
© 2014 Hazelcast Inc.
Step 1 : Configure the Hazelcast Distributed Map."


A) MapStore for connecting Hazelcast to the Database."
B) Configure Indexes for faster In Memory Query of Map."
"
Integrating Hazelcast in 4 steps
9
"
<map name="user">
<map-store enabled="true">
<class-name>com.craftedbytes.hazelcast.dao.UserMapStore</class-name>
<write-delay-seconds>30</write-delay-seconds>
</map-store>
<indexes>
<index ordered="true">location</index>
</indexes>
</map>


"
© 2014 Hazelcast Inc.
Integrating Hazelcast in 4 steps
Step 2 : Code your MapStore implementation"
10
"
public class UserMapStore implements MapStore<Integer, User> {
"
private UserDAO userDao = new UserDAO();
"
private UserMapStore() {}
"
@Override
public void store(Integer userKey, User user) {
userDao.insertUser(user);
}
@Override
public User load(Integer userKey) {
return userDao.getUser(userKey);
}
"
@Override
public Map<Integer, User> loadAll(Collection<Integer> userKeys) {
return userDao.loadAll(userKeys);
}
"
© 2014 Hazelcast Inc.
Integrating Hazelcast in 4 steps
Step 3 : Query against a Java Map !"
11
"
@Override
public Collection<User> getUserByLocation(String location){
return userMap.values(Predicates.equal("location", location));
}
"
@Override
public User getUser(Integer userKey) {
return userMap.get(userKey);
}
"
@Override
public void removeUser(Integer userKey) {
userMap.evict(userKey);
}
"
@Override
public void addUsers(Map<Integer,User> users) {
userMap.putAll(users);
}
"
"
© 2014 Hazelcast Inc.
Integrating Hazelcast in 4 steps
Step 4 : Start your cluster !

Hazelcast will prime from Database using the loadAllKeys method from your
MapStore."
"
No changes were required to the Database.
12
© 2014 Hazelcast Inc.© 2014 Hazelcast Inc.© 2014 Hazelcast Inc.
Hazelcast for faster reads
13
© 2014 Hazelcast Inc.
Hazelcast will read through to Database
• If you only load a subset of data from your whole
set.

• Hazelcast will use the MapStore to read to the
Database to cache a Map Entry on a Cache Miss.
14
© 2014 Hazelcast Inc.© 2014 Hazelcast Inc.© 2014 Hazelcast Inc.
Hazelcast read-through to DB
15
© 2014 Hazelcast Inc.
Hazelcast can make updates faster as well
• A Map put can be async to the Database.

• Write behind stores records and writes to DB
after delay.

• The User doesn’t have to wait for the DB to
complete, once entry hits cache the transaction is
complete.
16
© 2014 Hazelcast Inc.© 2014 Hazelcast Inc.© 2014 Hazelcast Inc.
Hazelcast write-behind to DB
17
© 2014 Hazelcast Inc.
Q&A










ANY QUESTIONS?
18
© 2014 Hazelcast Inc.

More Related Content

Similar to How to Speed up your Database

Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...HostedbyConfluent
 
Anton Faibyshev - Drupal 8: lazy builder. What we need to build a house - we ...
Anton Faibyshev - Drupal 8: lazy builder. What we need to build a house - we ...Anton Faibyshev - Drupal 8: lazy builder. What we need to build a house - we ...
Anton Faibyshev - Drupal 8: lazy builder. What we need to build a house - we ...DrupalCamp Kyiv
 
Mobile App Development With IBM Cloudant
Mobile App Development With IBM CloudantMobile App Development With IBM Cloudant
Mobile App Development With IBM CloudantIBM Cloud Data Services
 
Quick and Easy Development with Node.js and Couchbase Server
Quick and Easy Development with Node.js and Couchbase ServerQuick and Easy Development with Node.js and Couchbase Server
Quick and Easy Development with Node.js and Couchbase ServerNic Raboy
 
On Docker and its use for LHC at CERN
On Docker and its use for LHC at CERNOn Docker and its use for LHC at CERN
On Docker and its use for LHC at CERNSebastien Goasguen
 
[Codemash] Caching Made "Bootiful"!
[Codemash] Caching Made "Bootiful"![Codemash] Caching Made "Bootiful"!
[Codemash] Caching Made "Bootiful"!Viktor Gamov
 
Cascading - A Java Developer’s Companion to the Hadoop World
Cascading - A Java Developer’s Companion to the Hadoop WorldCascading - A Java Developer’s Companion to the Hadoop World
Cascading - A Java Developer’s Companion to the Hadoop WorldCascading
 
Owning Web Performance with PhantomJS 2 - Fluent 2016
Owning Web Performance with PhantomJS 2 - Fluent 2016Owning Web Performance with PhantomJS 2 - Fluent 2016
Owning Web Performance with PhantomJS 2 - Fluent 2016Wesley Hales
 
Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)
Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)
Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)Red Hat Developers
 
No sq ls-biggest-lie_sql-never-went-away_martin-esmann
No sq ls-biggest-lie_sql-never-went-away_martin-esmannNo sq ls-biggest-lie_sql-never-went-away_martin-esmann
No sq ls-biggest-lie_sql-never-went-away_martin-esmannMartin Esmann
 
Building a Dev/Test Cloud with Apache CloudStack
Building a Dev/Test Cloud with Apache CloudStackBuilding a Dev/Test Cloud with Apache CloudStack
Building a Dev/Test Cloud with Apache CloudStackke4qqq
 
Introduction to Apache jclouds at NYJavaSIG
Introduction to Apache jclouds at NYJavaSIGIntroduction to Apache jclouds at NYJavaSIG
Introduction to Apache jclouds at NYJavaSIGEverett Toews
 
Cloud4all - automatic personalised access, by Steve Lee
Cloud4all - automatic personalised access, by Steve LeeCloud4all - automatic personalised access, by Steve Lee
Cloud4all - automatic personalised access, by Steve LeeDissemination Cloud4all
 
the Spring 4 update
the Spring 4 updatethe Spring 4 update
the Spring 4 updateJoshua Long
 
Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Derek Jacoby
 
2009 Dotnet Information Day: More effective c#
2009 Dotnet Information Day: More effective c#2009 Dotnet Information Day: More effective c#
2009 Dotnet Information Day: More effective c#Daniel Fisher
 
Plone FSR
Plone FSRPlone FSR
Plone FSRfulv
 
Building scalable applications with hazelcast
Building scalable applications with hazelcastBuilding scalable applications with hazelcast
Building scalable applications with hazelcastFuad Malikov
 
NoSQL's biggest lie: SQL never went away - Martin Esmann
NoSQL's biggest lie: SQL never went away - Martin EsmannNoSQL's biggest lie: SQL never went away - Martin Esmann
NoSQL's biggest lie: SQL never went away - Martin Esmanndistributed matters
 

Similar to How to Speed up your Database (20)

Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
 
Anton Faibyshev - Drupal 8: lazy builder. What we need to build a house - we ...
Anton Faibyshev - Drupal 8: lazy builder. What we need to build a house - we ...Anton Faibyshev - Drupal 8: lazy builder. What we need to build a house - we ...
Anton Faibyshev - Drupal 8: lazy builder. What we need to build a house - we ...
 
Mobile App Development With IBM Cloudant
Mobile App Development With IBM CloudantMobile App Development With IBM Cloudant
Mobile App Development With IBM Cloudant
 
Quick and Easy Development with Node.js and Couchbase Server
Quick and Easy Development with Node.js and Couchbase ServerQuick and Easy Development with Node.js and Couchbase Server
Quick and Easy Development with Node.js and Couchbase Server
 
On Docker and its use for LHC at CERN
On Docker and its use for LHC at CERNOn Docker and its use for LHC at CERN
On Docker and its use for LHC at CERN
 
[Codemash] Caching Made "Bootiful"!
[Codemash] Caching Made "Bootiful"![Codemash] Caching Made "Bootiful"!
[Codemash] Caching Made "Bootiful"!
 
Cascading - A Java Developer’s Companion to the Hadoop World
Cascading - A Java Developer’s Companion to the Hadoop WorldCascading - A Java Developer’s Companion to the Hadoop World
Cascading - A Java Developer’s Companion to the Hadoop World
 
Owning Web Performance with PhantomJS 2 - Fluent 2016
Owning Web Performance with PhantomJS 2 - Fluent 2016Owning Web Performance with PhantomJS 2 - Fluent 2016
Owning Web Performance with PhantomJS 2 - Fluent 2016
 
Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)
Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)
Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)
 
No sq ls-biggest-lie_sql-never-went-away_martin-esmann
No sq ls-biggest-lie_sql-never-went-away_martin-esmannNo sq ls-biggest-lie_sql-never-went-away_martin-esmann
No sq ls-biggest-lie_sql-never-went-away_martin-esmann
 
Building a Dev/Test Cloud with Apache CloudStack
Building a Dev/Test Cloud with Apache CloudStackBuilding a Dev/Test Cloud with Apache CloudStack
Building a Dev/Test Cloud with Apache CloudStack
 
Introduction to Apache jclouds at NYJavaSIG
Introduction to Apache jclouds at NYJavaSIGIntroduction to Apache jclouds at NYJavaSIG
Introduction to Apache jclouds at NYJavaSIG
 
Cloud4all - automatic personalised access, by Steve Lee
Cloud4all - automatic personalised access, by Steve LeeCloud4all - automatic personalised access, by Steve Lee
Cloud4all - automatic personalised access, by Steve Lee
 
the Spring 4 update
the Spring 4 updatethe Spring 4 update
the Spring 4 update
 
Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9
 
2009 Dotnet Information Day: More effective c#
2009 Dotnet Information Day: More effective c#2009 Dotnet Information Day: More effective c#
2009 Dotnet Information Day: More effective c#
 
Plone FSR
Plone FSRPlone FSR
Plone FSR
 
Arquitecturas de microservicios - Medianet Software
Arquitecturas de microservicios   -  Medianet SoftwareArquitecturas de microservicios   -  Medianet Software
Arquitecturas de microservicios - Medianet Software
 
Building scalable applications with hazelcast
Building scalable applications with hazelcastBuilding scalable applications with hazelcast
Building scalable applications with hazelcast
 
NoSQL's biggest lie: SQL never went away - Martin Esmann
NoSQL's biggest lie: SQL never went away - Martin EsmannNoSQL's biggest lie: SQL never went away - Martin Esmann
NoSQL's biggest lie: SQL never went away - Martin Esmann
 

More from Hazelcast

Hazelcast 3.6 Roadmap Preview
Hazelcast 3.6 Roadmap PreviewHazelcast 3.6 Roadmap Preview
Hazelcast 3.6 Roadmap PreviewHazelcast
 
Time to Make the Move to In-Memory Data Grids
Time to Make the Move to In-Memory Data GridsTime to Make the Move to In-Memory Data Grids
Time to Make the Move to In-Memory Data GridsHazelcast
 
The Power of the JVM: Applied Polyglot Projects with Java and JavaScript
The Power of the JVM: Applied Polyglot Projects with Java and JavaScriptThe Power of the JVM: Applied Polyglot Projects with Java and JavaScript
The Power of the JVM: Applied Polyglot Projects with Java and JavaScriptHazelcast
 
JCache - It's finally here
JCache -  It's finally hereJCache -  It's finally here
JCache - It's finally hereHazelcast
 
Speed Up Your Existing Relational Databases with Hazelcast and Speedment
Speed Up Your Existing Relational Databases with Hazelcast and SpeedmentSpeed Up Your Existing Relational Databases with Hazelcast and Speedment
Speed Up Your Existing Relational Databases with Hazelcast and SpeedmentHazelcast
 
Shared Memory Performance: Beyond TCP/IP with Ben Cotton, JPMorgan
Shared Memory Performance: Beyond TCP/IP with Ben Cotton, JPMorganShared Memory Performance: Beyond TCP/IP with Ben Cotton, JPMorgan
Shared Memory Performance: Beyond TCP/IP with Ben Cotton, JPMorganHazelcast
 
Applying Real-time SQL Changes in your Hazelcast Data Grid
Applying Real-time SQL Changes in your Hazelcast Data GridApplying Real-time SQL Changes in your Hazelcast Data Grid
Applying Real-time SQL Changes in your Hazelcast Data GridHazelcast
 
WAN Replication: Hazelcast Enterprise Lightning Talk
WAN Replication: Hazelcast Enterprise Lightning TalkWAN Replication: Hazelcast Enterprise Lightning Talk
WAN Replication: Hazelcast Enterprise Lightning TalkHazelcast
 
JAAS Security Suite: Hazelcast Enterprise Lightning Talk
JAAS Security Suite: Hazelcast Enterprise Lightning TalkJAAS Security Suite: Hazelcast Enterprise Lightning Talk
JAAS Security Suite: Hazelcast Enterprise Lightning TalkHazelcast
 
Hazelcast for Terracotta Users
Hazelcast for Terracotta UsersHazelcast for Terracotta Users
Hazelcast for Terracotta UsersHazelcast
 
Extreme Network Performance with Hazelcast on Torusware
Extreme Network Performance with Hazelcast on ToruswareExtreme Network Performance with Hazelcast on Torusware
Extreme Network Performance with Hazelcast on ToruswareHazelcast
 
Big Data, Simple and Fast: Addressing the Shortcomings of Hadoop
Big Data, Simple and Fast: Addressing the Shortcomings of HadoopBig Data, Simple and Fast: Addressing the Shortcomings of Hadoop
Big Data, Simple and Fast: Addressing the Shortcomings of HadoopHazelcast
 
JAXLondon - Squeezing Performance of IMDGs
JAXLondon - Squeezing Performance of IMDGsJAXLondon - Squeezing Performance of IMDGs
JAXLondon - Squeezing Performance of IMDGsHazelcast
 
OrientDB & Hazelcast: In-Memory Distributed Graph Database
 OrientDB & Hazelcast: In-Memory Distributed Graph Database OrientDB & Hazelcast: In-Memory Distributed Graph Database
OrientDB & Hazelcast: In-Memory Distributed Graph DatabaseHazelcast
 
How to Use HazelcastMQ for Flexible Messaging and More
 How to Use HazelcastMQ for Flexible Messaging and More How to Use HazelcastMQ for Flexible Messaging and More
How to Use HazelcastMQ for Flexible Messaging and MoreHazelcast
 
Devoxx UK 2014 High Performance In-Memory Java with Open Source
Devoxx UK 2014   High Performance In-Memory Java with Open SourceDevoxx UK 2014   High Performance In-Memory Java with Open Source
Devoxx UK 2014 High Performance In-Memory Java with Open SourceHazelcast
 
JSR107 State of the Union JavaOne 2013
JSR107  State of the Union JavaOne 2013JSR107  State of the Union JavaOne 2013
JSR107 State of the Union JavaOne 2013Hazelcast
 
Jfokus - Hazlecast
Jfokus - HazlecastJfokus - Hazlecast
Jfokus - HazlecastHazelcast
 
In-memory No SQL- GIDS2014
In-memory No SQL- GIDS2014In-memory No SQL- GIDS2014
In-memory No SQL- GIDS2014Hazelcast
 
In-memory Data Management Trends & Techniques
In-memory Data Management Trends & TechniquesIn-memory Data Management Trends & Techniques
In-memory Data Management Trends & TechniquesHazelcast
 

More from Hazelcast (20)

Hazelcast 3.6 Roadmap Preview
Hazelcast 3.6 Roadmap PreviewHazelcast 3.6 Roadmap Preview
Hazelcast 3.6 Roadmap Preview
 
Time to Make the Move to In-Memory Data Grids
Time to Make the Move to In-Memory Data GridsTime to Make the Move to In-Memory Data Grids
Time to Make the Move to In-Memory Data Grids
 
The Power of the JVM: Applied Polyglot Projects with Java and JavaScript
The Power of the JVM: Applied Polyglot Projects with Java and JavaScriptThe Power of the JVM: Applied Polyglot Projects with Java and JavaScript
The Power of the JVM: Applied Polyglot Projects with Java and JavaScript
 
JCache - It's finally here
JCache -  It's finally hereJCache -  It's finally here
JCache - It's finally here
 
Speed Up Your Existing Relational Databases with Hazelcast and Speedment
Speed Up Your Existing Relational Databases with Hazelcast and SpeedmentSpeed Up Your Existing Relational Databases with Hazelcast and Speedment
Speed Up Your Existing Relational Databases with Hazelcast and Speedment
 
Shared Memory Performance: Beyond TCP/IP with Ben Cotton, JPMorgan
Shared Memory Performance: Beyond TCP/IP with Ben Cotton, JPMorganShared Memory Performance: Beyond TCP/IP with Ben Cotton, JPMorgan
Shared Memory Performance: Beyond TCP/IP with Ben Cotton, JPMorgan
 
Applying Real-time SQL Changes in your Hazelcast Data Grid
Applying Real-time SQL Changes in your Hazelcast Data GridApplying Real-time SQL Changes in your Hazelcast Data Grid
Applying Real-time SQL Changes in your Hazelcast Data Grid
 
WAN Replication: Hazelcast Enterprise Lightning Talk
WAN Replication: Hazelcast Enterprise Lightning TalkWAN Replication: Hazelcast Enterprise Lightning Talk
WAN Replication: Hazelcast Enterprise Lightning Talk
 
JAAS Security Suite: Hazelcast Enterprise Lightning Talk
JAAS Security Suite: Hazelcast Enterprise Lightning TalkJAAS Security Suite: Hazelcast Enterprise Lightning Talk
JAAS Security Suite: Hazelcast Enterprise Lightning Talk
 
Hazelcast for Terracotta Users
Hazelcast for Terracotta UsersHazelcast for Terracotta Users
Hazelcast for Terracotta Users
 
Extreme Network Performance with Hazelcast on Torusware
Extreme Network Performance with Hazelcast on ToruswareExtreme Network Performance with Hazelcast on Torusware
Extreme Network Performance with Hazelcast on Torusware
 
Big Data, Simple and Fast: Addressing the Shortcomings of Hadoop
Big Data, Simple and Fast: Addressing the Shortcomings of HadoopBig Data, Simple and Fast: Addressing the Shortcomings of Hadoop
Big Data, Simple and Fast: Addressing the Shortcomings of Hadoop
 
JAXLondon - Squeezing Performance of IMDGs
JAXLondon - Squeezing Performance of IMDGsJAXLondon - Squeezing Performance of IMDGs
JAXLondon - Squeezing Performance of IMDGs
 
OrientDB & Hazelcast: In-Memory Distributed Graph Database
 OrientDB & Hazelcast: In-Memory Distributed Graph Database OrientDB & Hazelcast: In-Memory Distributed Graph Database
OrientDB & Hazelcast: In-Memory Distributed Graph Database
 
How to Use HazelcastMQ for Flexible Messaging and More
 How to Use HazelcastMQ for Flexible Messaging and More How to Use HazelcastMQ for Flexible Messaging and More
How to Use HazelcastMQ for Flexible Messaging and More
 
Devoxx UK 2014 High Performance In-Memory Java with Open Source
Devoxx UK 2014   High Performance In-Memory Java with Open SourceDevoxx UK 2014   High Performance In-Memory Java with Open Source
Devoxx UK 2014 High Performance In-Memory Java with Open Source
 
JSR107 State of the Union JavaOne 2013
JSR107  State of the Union JavaOne 2013JSR107  State of the Union JavaOne 2013
JSR107 State of the Union JavaOne 2013
 
Jfokus - Hazlecast
Jfokus - HazlecastJfokus - Hazlecast
Jfokus - Hazlecast
 
In-memory No SQL- GIDS2014
In-memory No SQL- GIDS2014In-memory No SQL- GIDS2014
In-memory No SQL- GIDS2014
 
In-memory Data Management Trends & Techniques
In-memory Data Management Trends & TechniquesIn-memory Data Management Trends & Techniques
In-memory Data Management Trends & Techniques
 

Recently uploaded

Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 

Recently uploaded (20)

Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 

How to Speed up your Database

  • 1. © 2014 Hazelcast Inc. How to speed up your Database.
 DAVID BRIMLEY SENIOR SOLUTIONS ARCHITECT
  • 2. © 2014 Hazelcast Inc. About me 2 " Senior Solutions Architect for Hazelcast.
 Oracle Coherence @ HSBC 2007-2010
 
 Gemfire @ Nomura 2010 - 2013
 Worked for Major Investment Banks in the City of London.
 Java Programmer since 1998.
 
 David Brimley @dbrimley
  • 3. © 2014 Hazelcast Inc. Agenda - 40 Minutes + Q&A time. • Introduction to Hazelcast.
 • The Slow Database problem.
 • Adding Hazelcast for faster queries.
 • And doing the same for inserts and updates.
 • Q&A 3
  • 4. © 2014 Hazelcast Inc. Introduction to Hazelcast • Hazelcast the Open Source Project
 
 www.hazelcast.org" " • Hazelcast the Company
 
 www.hazelcast.com
 4
  • 5. © 2014 Hazelcast Inc. The Slow Database Problem • Traditional Databases are hard to scale.
 • They cost a lot in time and effort.
 • Common solution is a Cache." " • IMDG like Hazelcast give horizontal scalability. 5
  • 6. © 2014 Hazelcast Inc. The Hazelcast Approach • Cluster of JVM that all contribute memory.
 • Client API can work against Maps.
 • Query using Predicates or SQL like strings." " • Faster Reads using the Cache.
 • Faster Update/Inserts using write-behind.
 6
  • 7. © 2014 Hazelcast Inc. The Test Suite • Postgres 9.3.4 installed on a Macbook Pro Dual Core with 16gb RAM and 256gb SSD.
 • Dataset : Stackoverflow Public Dump (47gb)
 • Hazelcast 3.2 7
  • 8. © 2014 Hazelcast Inc.© 2014 Hazelcast Inc.© 2014 Hazelcast Inc. The Simple Postgres Java DAO 8
  • 9. © 2014 Hazelcast Inc. Step 1 : Configure the Hazelcast Distributed Map." 
 A) MapStore for connecting Hazelcast to the Database." B) Configure Indexes for faster In Memory Query of Map." " Integrating Hazelcast in 4 steps 9 " <map name="user"> <map-store enabled="true"> <class-name>com.craftedbytes.hazelcast.dao.UserMapStore</class-name> <write-delay-seconds>30</write-delay-seconds> </map-store> <indexes> <index ordered="true">location</index> </indexes> </map> 
 "
  • 10. © 2014 Hazelcast Inc. Integrating Hazelcast in 4 steps Step 2 : Code your MapStore implementation" 10 " public class UserMapStore implements MapStore<Integer, User> { " private UserDAO userDao = new UserDAO(); " private UserMapStore() {} " @Override public void store(Integer userKey, User user) { userDao.insertUser(user); } @Override public User load(Integer userKey) { return userDao.getUser(userKey); } " @Override public Map<Integer, User> loadAll(Collection<Integer> userKeys) { return userDao.loadAll(userKeys); } "
  • 11. © 2014 Hazelcast Inc. Integrating Hazelcast in 4 steps Step 3 : Query against a Java Map !" 11 " @Override public Collection<User> getUserByLocation(String location){ return userMap.values(Predicates.equal("location", location)); } " @Override public User getUser(Integer userKey) { return userMap.get(userKey); } " @Override public void removeUser(Integer userKey) { userMap.evict(userKey); } " @Override public void addUsers(Map<Integer,User> users) { userMap.putAll(users); } " "
  • 12. © 2014 Hazelcast Inc. Integrating Hazelcast in 4 steps Step 4 : Start your cluster !
 Hazelcast will prime from Database using the loadAllKeys method from your MapStore." " No changes were required to the Database. 12
  • 13. © 2014 Hazelcast Inc.© 2014 Hazelcast Inc.© 2014 Hazelcast Inc. Hazelcast for faster reads 13
  • 14. © 2014 Hazelcast Inc. Hazelcast will read through to Database • If you only load a subset of data from your whole set.
 • Hazelcast will use the MapStore to read to the Database to cache a Map Entry on a Cache Miss. 14
  • 15. © 2014 Hazelcast Inc.© 2014 Hazelcast Inc.© 2014 Hazelcast Inc. Hazelcast read-through to DB 15
  • 16. © 2014 Hazelcast Inc. Hazelcast can make updates faster as well • A Map put can be async to the Database.
 • Write behind stores records and writes to DB after delay.
 • The User doesn’t have to wait for the DB to complete, once entry hits cache the transaction is complete. 16
  • 17. © 2014 Hazelcast Inc.© 2014 Hazelcast Inc.© 2014 Hazelcast Inc. Hazelcast write-behind to DB 17
  • 18. © 2014 Hazelcast Inc. Q&A 
 
 
 
 
 ANY QUESTIONS? 18