Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Getting Started with Hazelcast - Second Edition
Getting Started with Hazelcast - Second Edition
Getting Started with Hazelcast - Second Edition
Ebook311 pages1 hour

Getting Started with Hazelcast - Second Edition

Rating: 0 out of 5 stars

()

Read preview

About this ebook

This book is an easy-to-follow, hands-on introduction that guides you through this innovative new technology. It covers everything from data grids to the simple-to-use distributed data storage collections. Queuing and topic messaging capabilities, as well as locking and transaction support to guard against concurrency race-conditions, are some of the topics that we will cover. We will then move on to distributed task execution, in-place data manipulations and big data analytical processing using MapReduce.At the end of all this, you will be armed with everything you need to bring amazing power and data scalability to your applications, as well as making them truly global and ready for a worldwide audience.
LanguageEnglish
Release dateJul 30, 2015
ISBN9781783554058
Getting Started with Hazelcast - Second Edition

Related to Getting Started with Hazelcast - Second Edition

Related ebooks

Programming For You

View More

Related articles

Reviews for Getting Started with Hazelcast - Second Edition

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    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 for more details.

    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

    Enjoying the preview?
    Page 1 of 1