Book Image

Infinispan Data Grid Platform

By : Francesco Marchioni, Manik Surtani
Book Image

Infinispan Data Grid Platform

By: Francesco Marchioni, Manik Surtani

Overview of this book

<p>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.<br /><br />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.<br /><br />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.</p>
Table of Contents (13 chapters)
Infinispan Data Grid Platform
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface

Preface

In today's competitive business world, Enterprise systems must be able to deliver highly available systems that are able to cope with 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 that achieve high availability and scalability using data grids. Using Infinispan will give you a decisive competitive advantage over the standard clustering toolkits that are typical in Enterprise today. This is the only book which covers Infinispan, offering 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.

What this book covers

Chapter 1, Installing Infinispan: This chapter will introduce the Infinispan data grid platform by discussing the definition of data grid and its conceptual background. It also shows the installation of the Infinispan platform and a common set of tools that will help us in the development process.

Chapter 2, Using Infinispan Core API: This chapter introduces the core Infinispan API by discussing the two Infinispan operational modes and showing how to interact with the basic Infinispan constructs—the CacheManager interfaces and the Cache API.

Chapter 3, Introducing Infinispan Configuration: In this chapter, we will show both declarative and programmatic approaches with a focus on the basic configuration elements.

Chapter 4, Developing Advanced Configurations: This chapter introduces some advanced topics, such as clustering and transactions that are essential for scalable and reliable Enterprise applications.

Chapter 5, Monitoring Infinispan: This chapter dives into management and monitoring of the Infinispan platform, showing how to collect the relevant information related to Cache Manager and cache objects.

Chapter 6, Infinispan and CDI: This chapter demonstrates using Infinispan with the increasingly popular CDI programming model.

Chapter 7, Advanced Topics: This chapter discusses three of Infinispan's advanced topics—the asynchronous API, the query API, and customizing Infinispan.

Bonus Section— Appendix A, Infinispan and JBoss AS 7: In the appendix, we will show how to configure and develop applications using Infinispan API on a JBoss AS 7 server. The Appendix is not present in the book but is available as a free download from the following link: http://www.packtpub.com/sites/default/files/downloads/8222_Appendix_Final.pdf.

What you need for this book

OpenJDK 1.6.0 or Sun JDK 1.6.0 or above, and Apache Maven 3.0 or above. Furthermore, a Java Integrated Development Environment (IDE) such as Eclipse is highly recommended.

Who this book is for

This book is for Enterprise developers and architects who want to use a distributed caching and data grid solution. You should have programming knowledge of Java and a general familiarity with concepts such as data caching and clustering.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "The stateTransfer attribute configures how a state is retrieved when a new cache joins the cluster."

A block of code is set as follows:

<clustering mode="distribution">
<sync/>
<hash
numOwners="3"
rehashEnabled="true"
rehashRpcTimeout="600000"
/>
</clustering>

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

<transaction
useEagerLocking="true"
eagerLockSingleNode="true">
<recovery enabled="true" />
</transaction>

Any command-line input or output is written as follows:

mvn --version
Apache Maven 3.0.4 (r1075438; 2011-02-28 18:31:09+0100)
Maven home: C:\apache-maven-3.0.4\bin\..
Java version: 1.6.0, vendor: Sun Microsystems Inc.
Java home: C:\Programmi\Java\jdk1.6.0\jre
Default locale: it_IT, platform encoding: Cp1252
OS name: "windows xp", version: "5.1",
arch: "x86", family: "windows"

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "In order to get started, hit the Start Cache button, which will instantiate a cache".

Note

Warnings or important notes appear in a box like this.

Note

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title through the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

The example code for this book is also publicly available in Infinispan's source code repository on GitHub at http://github.com/infinispan/Infinispan-book.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website, or added to any list of existing errata, under the Errata section of that title.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.