You are previewing Infinispan Data Grid Platform.
O'Reilly logo
Infinispan Data Grid Platform

Book Description

Get the edge in building enterprise applications by learning a distributed caching and data grid solution. This introduction to Infinispan will expand your Java capabilities to new levels of performance and scalability.

  • Configure and develop applications using the Infinispan Data grid platform.

  • Follow a simple ticket booking example to easily learn the features of Infinispan in practice

  • Draw on the experience of Manik Surtani, the leader, architect and founder of this popular open source project

  • In Detail

    In today's competitive business world, Enterprise systems must be able to deliver highly available, high transaction volumes with an increasing number of users. Infinispan enables you to do this as well as share and distribute data among servers in the most efficient way possible so that you achieve faster response times, while trying to avoid single points of failure.

    Infinispan Data Grid Platform will teach you the most important concepts for building Enterprise applications. Using Infinispan will give you a decisive competitive advantage over the standard clustered applications that are typical in the enterprise today. This, the only book to cover Infinispan, offers detailed instructions for installing, configuring, and effectively using the Infinispan platform. You will learn how to utilize and make the most out of every feature of its API.

    Progress from examples of adding, removing, and evicting data from a cache, to more complex scenarios such as clustering and distributing data more efficiently in the grid. Throughout the book, you will follow a simple example of an API using a ticket booking system, which will help you to learn how to set up robust and scalable Infinispan configurations. You will also see a complete demonstration of integrating the Infinispan data grid platform with JBoss AS 7.

    Table of Contents

    1. Infinispan Data Grid Platform
      1. Table of Contents
      2. Infinispan Data Grid Platform
      3. Credits
      4. About the Authors
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. Installing Infinispan
        1. What is a data grid?
        2. Introducing Infinispan as a cache
          1. Going beyond JSR-107
        3. Installing the required software
          1. Installing Java SE
            1. Testing the installation
          2. Installing Maven
            1. Testing the installation
          3. Installing Infinispan
            1. Extending Infinispan with its additional modules
            2. Testing the installation with the GUI demo
        4. Summary
      9. 2. Using Infinispan Core API
        1. Infinispan operational modes
          1. Running Infinispan in embedded mode
          2. Running Infinispan in client-server mode
            1. The memcached protocol
            2. The Hot Rod protocol
            3. Infinispan REST interface
            4. Using the Hot Rod Java client
        2. Learning the Infinispan API
          1. Creating your first project
          2. Controlling the size of your data store
            1. Data eviction
            2. Data expiration
          3. Using listeners
            1. Listeners and synchronicity
        3. Infinispan and transactions
        4. Running the sample application with Maven
        5. Summary
      10. 3. Introducing Infinispan Configuration
        1. Learning the declarative configuration
          1. Global configuration settings
          2. Cache configuration settings
        2. Configuring cache loaders
          1. Common cache loader attributes
          2. Specific cache loader attributes
        3. Choosing the correct cache store for your application
          1. JDBC-based cache stores
        4. Chaining cache loaders
        5. Configuring eviction and expiration
          1. Testing our ticket system with eviction and passivation
        6. Infinispan programmatic configuration
          1. Creating a configuration from scratch
          2. Creating the Global configuration programmatically
        7. Summary
      11. 4. Developing Advanced Configurations
        1. Introducing clustering
        2. Configuring the network transport
        3. Creating the Infinispan cluster
          1. Configuring our application to use clustering
          2. Choosing between replication and distribution
          3. Advanced data distribution
            1. Improving the distribution of data with virtual nodes
            2. Using the L1 cache to prevent unnecessary remote calls
        4. Infinispan locking strategies
          1. Configuring isolation levels
          2. Data locking and transactions
            1. Explicit and implicit data locking
          3. Showing a node locking example
            1. Configuring lock timeouts
            2. Using lock pools to guard your cache keys
            3. Detecting deadlocks
        5. Summary
      12. 5. Monitoring Infinispan
        1. Enabling statistics collection
        2. Using JConsole to gather Infinispan data
        3. Managing Infinispan with RHQ
          1. Installing RHQ
          2. Configuring the RHQ agent
            1. Letting the agent discover Infinispan
            2. Installing the Infinispan plugin
        4. RHQ: your gateway to Infinispan
          1. A quick Summary view of our cache
          2. Getting alert conditions from your cache
          3. Monitoring your system in real time
        5. Summary
      13. 6. Infinispan and CDI
        1. A 30,000 foot overview of CDI
        2. Getting set up to use Infinispan and CDI
        3. Configuring and injecting Infinispan components into your CDI beans
          1. Injecting a cache using CDI
            1. Configuring which cache gets injected
          2. Configuring cache managers
            1. Specifying the default configuration
            2. Overriding the way an EmbeddedCacheManager is created
            3. Configuring a RemoteCacheManager
          3. Handling multiple configurations
        4. Controlling storage and retrieval using CDI annotations
          1. Enabling cache annotations in your CDI application
          2. Caching the result of a method invocation
            1. Specifying which cache to use
            2. Cache keys for cached results
            3. Custom key generation
          3. Removing an entry from the cache
          4. Clearing the cache
          5. Updating a cache entry
        5. Using Infinispan CDI with JBoss AS 7.x
        6. Summary
      14. 7. Advanced Topics
        1. The asynchronous API
          1. NotifyingFuture
        2. The query API
          1. Setting up your project to use Infinispan's querying capabilities
            1. Configuring your cache
            2. Annotating your objects
            3. Writing a query
          2. Storing indexes
            1. Infinispan directory
            2. Index storage and cache modes
              1. Local copy of global indexes
              2. Global, shared indexes
        3. Customizing Infinispan
          1. BaseCustomInterceptor
            1. Commands and InvocationContext
          2. Creating a custom interceptor
          3. Configuring custom interceptors
            1. Interceptor positioning
        4. Summary
      15. Index