Getting Started with Hazelcast - Second Edition
By Mat Johns
()
About this ebook
Related to Getting Started with Hazelcast - Second Edition
Related ebooks
Microservices Complete Self-Assessment Guide Rating: 0 out of 5 stars0 ratingsSoftware architecture A Complete Guide - 2019 Edition Rating: 0 out of 5 stars0 ratingsCloud Integration A Complete Guide - 2019 Edition Rating: 5 out of 5 stars5/5Spring 2.5 Aspect Oriented Programming Rating: 0 out of 5 stars0 ratingsSystem Design Interview: 300 Questions And Answers: Prepare And Pass Rating: 0 out of 5 stars0 ratingsChef Infrastructure Automation Cookbook - Second Edition Rating: 0 out of 5 stars0 ratingsGoogle Cloud Dataproc The Ultimate Step-By-Step Guide Rating: 0 out of 5 stars0 ratingsApplication Development for IBM WebSphere Process Server 7 and Enterprise Service Bus 7 Rating: 0 out of 5 stars0 ratingsFederal Data Science: Transforming Government and Agricultural Policy Using Artificial Intelligence Rating: 0 out of 5 stars0 ratingsOracle 10g/11g Data and Database Management Utilities Rating: 0 out of 5 stars0 ratingsApigee Third Edition Rating: 0 out of 5 stars0 ratingsopen banking api A Complete Guide - 2019 Edition Rating: 0 out of 5 stars0 ratingsJBoss Weld CDI for Java Platform Rating: 0 out of 5 stars0 ratingsAcceptance test-driven development A Clear and Concise Reference Rating: 0 out of 5 stars0 ratingsSOA-Based Enterprise Integration: A Step-by-Step Guide to Services-based Application Rating: 0 out of 5 stars0 ratingsAWS Organizations Second Edition Rating: 0 out of 5 stars0 ratingsManaging Technical Debt A Complete Guide - 2021 Edition Rating: 0 out of 5 stars0 ratingsJoint application design Third Edition Rating: 0 out of 5 stars0 ratingsDeep Learning for Data Architects: Unleash the power of Python's deep learning algorithms (English Edition) Rating: 0 out of 5 stars0 ratingsScrum Release Management: Successful Combination of Scrum, Lean Startup, and User Story Mapping Rating: 0 out of 5 stars0 ratingsMessage Broker A Clear and Concise Reference Rating: 0 out of 5 stars0 ratingsEnterprise Application Integration: A Wiley Tech Brief Rating: 2 out of 5 stars2/5Event-Driven IT The Ultimate Step-By-Step Guide Rating: 0 out of 5 stars0 ratingsInstant Magento Performance Optimization How-to Rating: 0 out of 5 stars0 ratingsBizTalk Server 2010 Cookbook Rating: 0 out of 5 stars0 ratingsHybrid Cloud Complete Self-Assessment Guide Rating: 0 out of 5 stars0 ratingsDatabase Security A Complete Guide - 2020 Edition Rating: 0 out of 5 stars0 ratingsKubernetes Secrets Management Rating: 0 out of 5 stars0 ratingsGoogle Apigee Third Edition Rating: 0 out of 5 stars0 ratingsMicroservices Architecture Standard Requirements Rating: 0 out of 5 stars0 ratings
Programming For You
SQL Guide for Microsoft Access: SQL Basics, Fundamental & Queries Exercise Rating: 5 out of 5 stars5/5Web Designer's Idea Book, Volume 4: Inspiration from the Best Web Design Trends, Themes and Styles Rating: 4 out of 5 stars4/5Learn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5HTML & CSS: Learn the Fundaments in 7 Days Rating: 4 out of 5 stars4/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Excel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5Python QuickStart Guide: The Simplified Beginner's Guide to Python Programming Using Hands-On Projects and Real-World Applications Rating: 0 out of 5 stars0 ratingsPython: For Beginners A Crash Course Guide To Learn Python in 1 Week Rating: 4 out of 5 stars4/5Hacking: Ultimate Beginner's Guide for Computer Hacking in 2018 and Beyond: Hacking in 2018, #1 Rating: 4 out of 5 stars4/5Learn PowerShell in a Month of Lunches, Fourth Edition: Covers Windows, Linux, and macOS Rating: 0 out of 5 stars0 ratingsLearn SQL in 24 Hours Rating: 5 out of 5 stars5/5Minecraft Basics For Dummies Rating: 0 out of 5 stars0 ratingsGame Development with Unreal Engine 5: Learn the Basics of Game Development in Unreal Engine 5 (English Edition) Rating: 0 out of 5 stars0 ratingsPython: Learn Python in 24 Hours Rating: 4 out of 5 stars4/5C# 7.0 All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsPython Projects for Beginners: A Ten-Week Bootcamp Approach to Python Programming Rating: 0 out of 5 stars0 ratingsLearn JavaScript in 24 Hours Rating: 3 out of 5 stars3/5SQL: For Beginners: Your Guide To Easily Learn SQL Programming in 7 Days Rating: 5 out of 5 stars5/5Python Programming : How to Code Python Fast In Just 24 Hours With 7 Simple Steps Rating: 4 out of 5 stars4/5
Reviews for Getting Started with Hazelcast - Second Edition
0 ratings0 reviews
Book preview
Getting Started with Hazelcast - Second Edition - Mat Johns
Table of Contents
Getting Started with Hazelcast Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
Trademarks
1. What is Hazelcast?
Starting out as usual
Data deciding to hang around
Therein lies the problem
Breaking the mould
Moving to new ground
Playing around with our data
Summary
2. Getting off the Ground
Let's get started
Showing off straightaway
Mapping back to the real world
Sets, lists, and queues
Many things at a time
Searching and indexing
What happens when we reach our limits?
Summary
3. Going Concurrent
Atomic control
Distributed locking
Tactical locking
Transactionally rolling on
Differences when queuing
Enterprising onwards
Collectively counting up
Spreading the word
Summary
4. Divide and Conquer
Divvying up the data
Backups everywhere and nowhere
Scaling up the cluster
Having some of our data everywhere
Grouping and separating nodes
Network partitioning
Maintaining quorum
Summary
5. Listening Out
Listening to the goings-on
The sound of our own data
Continuously querying
Listeners racing into action
Keyless collections
Programmatic configuration ahead of time
Events unfolding in the wider world
Moving data around the place
Extending quorum
Summary
6. Spreading the Load
All power to the compute
Giving up when tasks take too long
Running once, running everywhere
Placing tasks next to the data
Partitioning control by name
Self-updating results
In-place entry processing
Summary
7. Gathering Results
What is this big data hype all about?
Trying to make sense of it all
Combining data where possible
Putting theory into practice
Combining results as we go
Simplifying just aggregating up
Summary
8. Typical Deployments
All heap and nowhere to go
Stepping back from the cluster
Serialization and classes
Getting straight to the point
Architectural overview
Peer-to-peer clusters
Smart clients and server clusters
Dummy client proxying through a single node
Summary
9. From the Outside Looking In
What about the rest of us?
Memcache
Going RESTful
Cluster status via REST
REST resilience
Summary
10. Going Global
Getting set up in the cloud
Under manual control
Discovery – the Amazonian way
Filtering the possibilities
Spreading out around the globe
Summary
11. Playing Well with Others
Don't pass what you need, depend on it
Simplifying collection access
Transparently caching others' data
Bring your own cluster
Cacheable methods with the Spring cache
Caching by standard
Collection persistence
Web session storage
Cluster management
JMX statistics
Summary
A. Configuration Summary
Cluster name
Management center
General properties
WAN replication configuration
Local network/interface binding
Cluster discovery (multicast-, unicast-, or EC2-based)
Map configuration
Maximum size and eviction
Backup copies
Age expiry and idle expiry times
Map merge policy
Selected WAN replication configuration
Indexes on values
Listeners notified on map events
Listeners notified on topic broadcast
Cluster-wide listener registration
Index
Getting Started with Hazelcast Second Edition
Getting Started with Hazelcast Second Edition
Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: August 2013
Second edition: July 2015
Production reference: 1240715
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78528-533-2
www.packtpub.com
Credits
Author
Mat Johns
Reviewers
Thierry Leriche-Dessirier
Sven Panko
Adam Weidner
Commissioning Editor
Nadeem N. Bagban
Acquisition Editors
Mary Jasmine Nadar
Sonali Vernekar
Content Development Editor
Merwyn D'souza
Technical Editor
Bharat Patil
Copy Editors
Tani Kothari
Vedangi Narvekar
Project Coordinator
Nikhil Nair
Proofreader
Safis Editing
Indexer
Tejal Soni
Production Coordinator
Melwyn D'sa
Cover Work
Melwyn D'sa
About the Author
Mat Johns is an Agile software engineer, hands-on solution architect, and a general technologist based in London. His experience with the Web reaches all the way back to his misspent youth and some rather hacktastic code, but eventually, he grew up to graduate from the University of Southampton with a master's in computer science with distributed systems and networks. Since then, he has worked for a number of start-ups on various web projects and systems, and nowadays, he specializes in designing and creating high-performance and scalable web services, currently in the Internet TV world.
Away from technology, he is an avid explorer and endeavors to seek out new destinations and adventures as much as possible. He is also a qualified yacht skipper and regularly races in, around, and beyond the Solent.
You can follow him on Twitter at @matjohns.
Mat was also the author of the first edition of this book.
I would like to dedicate this book to my wonderful fiancée, Judith, for all her support and encouragement and for saying yes between Chapters 3 and 4!
About the Reviewers
Thierry Leriche-Dessirier works as a freelance JEE consultant (www.icauda.com) in Paris. He has 20 years of experience in the Java, web, and Agile development domains. He teaches software engineering at ESIEA (www.esiea.fr), and in between handling two baby bottles, he writes for blogs and magazines, such as Developpez (www.developpez.com) and Programmez (www.programmez.com). He has also created a free online DISC (Dominance, Influence, Steadiness, Conscientiousness: www.profil4.com) test, which is used to improve management.
Sven Panko has been developing software for the past 20 years and is enthusiastic about and dedicated to software craftsmanship and software design. He has worked as a developer, architect, chief architect, and head of software architecture for several IT companies worldwide. He is currently running his own consulting company based in Dusseldorf, Germany, where he supports clients in technology evaluation and in building robust and resilient distributed software. His special interests include performance tuning, API design (particularly, open cloud APIs), and concurrency. He also works as a motivational coach and personal trainer for teams in order to increase productivity, while ensuring that all team members help build a great working environment that is fun to work in.
You can reach Sven via e-mail at <sp@intuitiveminds.de> or his consulting site at www.intuitiveminds.de.
Adam Weidner recently graduated from Michigan Technological University and is currently employed as a software engineer. Adam knows many different languages and has experience in dozens of tools and technologies. He has also worked on big data projects and distributed systems in the past. He mostly spends his time working on various projects, writing web applications, and reading books and articles online. You can read about and contact him on his website http://adamweidner.com/.
www.PacktPub.com
Support files, eBooks, discount offers, and more
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.
Why subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Free access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.
Preface
Hazelcast is an innovative new approach to data, in terms of storage, processing, and distribution; it provides an accessible solution to the age-old problem of application and data scalability. This book introduces this great open source technology in a step-by-step, easy-to-follow manner, from the why to the how and the wow.
What this book covers
Chapter 1, What is Hazelcast?, introduces the technology, its place in an application's stack, and how it has evolved from traditional approaches to data.
Chapter 2, Getting off the Ground, helps us start coding and get acquainted with the standard distributed data store collections on offer.
Chapter 3, Going Concurrent, looks at more distributed and concurrent capabilities that we can bring into our applications.
Chapter 4, Divide and Conquer, looks at how data is split up and split across many nodes to provide both performance and resilience.
Chapter 5, Listening Out, discusses how we can register to receive notifications from the cluster in order to enable our application to be aware of what's going on.
Chapter 6, Spreading the Load, moves beyond data storage and investigates the distributed execution service and how Hazelcast is more than just a database.
Chapter 7, Gathering Results, looks at MapReduce for analyzing and discovering hidden values within our raw data and how it searches and aggregates data.
Chapter 8, Typical Deployments, explores the various ways in which we can use or install Hazelcast into our application or infrastructure, looking at the architectural decisions, reasons, and trade-offs behind each.
Chapter 9, From the Outside Looking In, rather than the use of the provided drivers for integrating with a Hazelcast cluster, looks at the popular alternative access that we have to our data.
Chapter 10, Going Global, discusses how we can explode onto the world stage by using the public cloud infrastructure and asynchronous remote replication to take our data all around the globe.
Chapter 11, Playing Well with Others, brings the technology together with popular companion frameworks to see how we might start to bring the technology to work with legacy applications.
Appendix, Configuration Summary, provides an overview of the configurations that we have used throughout the book.
What you need for this book
Hazelcast is a Java-based technology, so you will need a Java development environment (minimum Java 6; ideally, Java 8) and the use of a Java source