![]()
Getting Started with Hazelcast Second Edition
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
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
![]()
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
![]()
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.
![]()
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
<[email protected]> 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/...