Getting Started with Infinispan.pdf

of 32
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Related Documents
Getting Started with Infinispan Manik Surtani, Mircea Markus, Galder Zamarreño, Pete Muir, and others from the Infinispan community Table of Contents 1. Introduction 1.1. Runtimes 1.2. Modes 1.3. Interacting with Infinispan 2. Downloading and installing Infinispan 2.1. JDK 2.2. Maven 2.3. Infinispan 2.3.1. Getting Infinispan from Maven 2.4. Download the quickstarts 3. Infinispan in action - GUIDemo 4. Using Infinispan as an embedded cache in Java SE 4.1. Creating a new Infinispan project 4.1.1.
  Getting Started  with Infinispan Manik Surtani, Mircea Markus, Galder Zamarreño, Pete Muir, and others from the Infinispan community Table of Contents 1. Introduction1.1. Runtimes1.2. Modes1.3. Interacting with Infinispan2. Downloading and installing Infinispan2.1. JDK2.2. Maven2.3. Infinispan2.3.1. Getting Infinispan from Maven2.4. Download the quickstarts3. Infinispan in action - GUIDemo4. Using Infinispan as an embedded cache in Java SE4.1. Creating a new Infinispan project4.1.1. Maven users4.1.2. Ant users4.2. Running Infinispan on a single node4.3. Use the default cache4.4. Use a custom cache5. Using Infinispan as an embedded data grid in Java SE5.1. Sharing JGroups channels5.2. Running Infinispan in a cluster5.2.1. Replicated mode5.2.2. Distributed mode5.3. clustered-cache quickstart architecture5.3.1. Logging changes to the cache5.3.2. What’s going on?5.4. Configuring the cluster5.4.1. Tweaking the cluster configuration for your network5.5. Configuring a replicated data-grid5.6. Configuring a distributed data-grid6. Creating your own Infinispan project6.1. Maven Archetypes6.1.1. Starting a new project6.1.2. Playing with your new project6.1.3. On the command line…6.1.4. Writing a test case for Infinispan6.1.5. On the command line…6.1.6. Versions6.1.7. Source Code7. Using Infinispan as a second level cache for Hibernate8. Accessing an Infinispan data grid remotely8.1. Using Hot Rod to access an Infinispan data-grid8.2. Using REST to access an Infinipsan data-grid8.3. Using memcached to access an Infinispan data-grid9. Using Infinispan in JBoss AS 7  10. Using Infinispan in servlet containers (such as Tomcat or Jetty) and other application servers (such as GlassFish)11. Monitoring Infinispan12. Infinispan GUI demo12.1. Step 1: Start the demo GUI12.2. Step 2: Start the cache12.3. Step 3: Manipulate data12.4. Step 4: Start more cache instances12.5. Step 5: Manipulate more data13. Example with Groovy13.1. Introduction13.1.1. Installing Groovy13.1.2. Installing Infinispan13.1.3. Setting the classpath13.2. Loading the configuration file13.3. Basic cache configuration13.4. Cache with transaction management13.5. Cache with a cache store13.6. Cache with eviction13.7. Cache with eviction and cache store14. Example with Scala14.1. Environment14.2. Testing Setup14.3. Loading the Configuration file14.4. Basic cache operations14.5. Basic cache operations with TTL14.6. Cache restarts14.7. Transactional cache operations14.8. Persistent stored backed Cache operations14.9. Operating against a size bounded cache14.10. Size bounded caches with persistent store This is a guide to getting started with Infinispan. It is meant to be read alongside the morecomplete User Guide (../user_guide/user_guide.html), and as a supplement to the Quickstarts( that have been made available. 1. Introduction This guide will walk you through downloading, installing and running Infinispan for the first time. It will then introduce tosome of the key features of Infinispan. 1.1. Runtimes Infinispan can be used in a variety of runtimes:  Java SE  , started by your applicationan  application server   which provides Infinispan as a service (such as JBoss AS)  bundled as a library   in your application, deployed to an application server, and started on by your application (forexample, you could use Infinispan with Tomcat or GlassFish)  1.2. Modes Infinispan offers four modes of operation, which determine how and where the data is stored: * Local   , where entries arestored on the local node only, regardless of whether a cluster has formed. In this mode Infinispan is typically operating as alocal cache * Invalidation  , where all entries are stored into a cache store (such as a database) only, and invalidated fromall nodes. When a node needs the entry it will load it from a cache store. In this mode Infinispan is operating as adistributed cache, backed by a canonical data store such as a database * Replication  , where all entries are replicated toall nodes. In this mode Infinispan is typically operating as a data grid or a temporary data store, but doesn’t offer anincreased heap space * Distribution  , where entries are distributed to a subset of the nodes only. In this mode Infinispan istypically operating as a data grid providing an increased heap spaceInvalidation, Replication and Distribution can all use synchronous or asynchronous communication. 1.3. Interacting with Infinispan Infinispan offers two access patterns, both of which are available in any runtime: Embedded   into your application code As a Remote  server accessed by a client (REST, memcached or Hot Rod wire protocols are supported)This guide will introduce to each of the runtime options, access patterns and modes of operations by walking you throughsimple applications for each. 2. Downloading and installing Infinispan To run Infinispan, you’ll need A Java 1.6.0 JDK (a 1.7.0 JDK is required if you wish to recompile Infinispan itself. The generated artifacts will howeverbe compatible with JDK 1.6.0)Maven 3, if you wish to use the quickstart examples or create a new project using Infinispan archetype(../getting_started/getting_started.html#_maven_archetypes)the Infinispan distribution zip, if you wish to use Infinispan in server mode, or want to use the jars in an ant projectthe Infinispan Quickstart zip, if you want to follow along with the projects discussed in the guide  If you already have any of these pieces of software, there is no need to install them again! 2.1. JDK  Choose your Java runtime, and follow their installation instructions. For example, you could choose one of:OpenJDK ( Java SE ( JRockit ( 2.2. Maven Follow the official Maven installation guide if you don’t already have Maven 3 installed. You can check which version ofMaven you have installed (if any) by running mvn --version . If you see a version newer than 3.0.0, you are ready to go.   You can also deploy the examples using your favorite IDE. We provide instructions for using Eclipse only. 2.3. Infinispan Finally, download Infinispan from the Infinispan downloads ( page. 2.3.1. Getting Infinispan from Maven TODO 2.4. Download the quickstarts The quickstarts are in GitHub, in this repository using: $ git clone‐quickstart 3. Infinispan in action - GUIDemo TODO 4. Using Infinispan as an embedded cache in Java SE Running Infinispan in embedded mode is very easy. First, we’ll set up a project, and then we’ll run Infinispan, and startadding data.  embedded-cache quickstart  All the code discussed in this tutorial is available in the embedded-cache quickstart( 4.1. Creating a new Infinispan project The only thing you need to set up Infinispan is add it’s dependencies to your project. 4.1.1. Maven users If you are using Maven (or another build system like Gradle or Ivy which can use Maven dependencies), then this is easy.Just add: pom.xml <dependency> <groupId>org.infinispan</groupId> <artifactId>infinispan‐core</artifactId> <version>${infinispan.version}</version></dependency>
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks