Book Image

IBM WebSphere eXtreme Scale 6

By : Anthony Chaves
Book Image

IBM WebSphere eXtreme Scale 6

By: Anthony Chaves

Overview of this book

A data grid is a means of combining computing resources. Data grids provide a way to distribute object storage and add capacity on demand in the form of CPU, memory, and network resources from additional servers. All three resource types play an important role in how fast data can be processed, and how much data can be processed at once. WebSphere eXtreme Scale provides a solution to scalability issues through caching and grid technology. Working with a data grid requires new approaches to writing highly scalable software; this book covers both the practical eXtreme Scale libraries and design patterns that will help you build scalable software. Starting with a blank slate, this book assumes you don't have experience with IBM WebSphere eXtreme Scale. It is a tutorial-style guide detailing the installation of WebSphere eXtreme Scale right through to using the developer libraries. It covers installation and configuration, and discusses the reasons why a data grid is a viable middleware layer. It also covers many different ways of interacting with objects in eXtreme Scale. It will also show you how to use eXtreme Scale in new projects, and integrate it with relational databases and existing applications. This book covers the ObjectMap, Entity, and Query APIs for interacting with objects in the grid. It shows client/server configurations and interactions, as well as the powerful DataGrid API. DataGrid allows us to send code into the grid, which can be run where the data lives. Equally important are the design patterns that go alongside using a data grid. This book covers the major concepts you need to know that prevent your client application from becoming a performance bottleneck. By the end of the book, you'll be able to write software using the eXtreme Scale APIs, and take advantage of a linearly scalable middleware layer.
Table of Contents (15 chapters)
IBM WebSphere eXtreme Scale 6
Credits
About the Author
About the Reviewers
Preface

Preface

This is a book about in-memory data grids, particularly IBM WebSphere eXtreme Scale. An in-memory data grid (IMDG) lets us build more scalable data stores by partitioning data across many different servers. By "scaling out" across many servers instead of "scaling up" by using more powerful servers we can support more clients and data while keeping hardware costs low. One of the nicest things about working with eXtreme Scale is that it's easy to use. We don't need any special hardware or complicated software configuration wizards. It's as easy as downloading the light weight eXtreme Scale JAR file. The eXtreme Scale APIs are well defined and give us a lot of functionality.

This book explores many features of using an in-memory data grid starting from the object cache and going through using the compute grid functionality that lets us use the computing resources of the grid for business logic. We also explore how we can structure our data in a way that lets us take advantage of partitioned data stores.

What this book covers

Chapter 1: What is a Data Grid gets us up and running with IBM WebSphere eXtreme Scale. We download eXtreme Scale, add it to the build path, and get a small sample program running. We also explore some general in-memory data grid concepts.

Chapter 2: The ObjectMap API focuses on using eXtreme Scale as a key/value object cache. ObjectMap gives us a way to interact with the cache using familiar concepts associated with map-like data structures. We also look at working with distributed maps.

Chapter 3: Entities and Queries goes beyond a basic key/value object store. The Entity API lets us work with our objects using relationships between them. The Query API lets us use a SQL-like syntax to work with certain Entity objects in the cache.

Chapter 4: Database Integration explores areas where using a data grid makes sense and some areas where it may not make sense. Many applications already use a database and we can do some integration with eXtreme Scale to make cached objects persistent in the database.

Chapter 5: Handling Increased Load starts to look at some of the eXtreme Scale features that let us scale out across many servers. We cover configuration and dynamic deployments as well as the eXtreme Scale building blocks.

Chapter 6: Keeping Data Available covers more of the eXtreme Scale features that let us survive server or even data center failure. We also explore what happens when we add resources to or remove resources from a deployment.

Chapter 7: The DataGrid API goes beyond an object cache; a data grid provides compute grid functionality. By co-locating code with our data we're able to improve application performance and responsiveness.

Chapter 8: Data Grid Patterns looks at some problems that data grids can help us solve. We also show how we can structure our data to take the best advantage of a partitioned data store.

Chapter 9: Spring Integration deals with the popular Spring framework, which is used in many applications. Using eXtreme Scale with Spring is easy, and there are a few integration points that we cover. We can configure eXtreme Scale with Spring-managed beans. We can also instantiate eXtreme Scale objects using Spring.

Chapter 10: Putting It All Together provides an example of using eXtreme Scale with an existing project. Where do we start? What should we be aware of when migrating to a data grid? We also take a last look at what we can cache and where it is most helpful.

What you need for this book

You need a Java SDK to work with IBM WebSphere eXtreme Scale. Detailed instructions are provided in Chapter 1. Familiarity with a Java build environment is recommended. In this book, we occasionally mention the Eclipse IDE, though Eclipse is not required. The IBM JDK will require the least amount of effort to use these examples. Again, detailed instructions are provided in Chapter 1.

Who this book is for

This book is aimed at intermediate-level JavaEE Developers who want to build applications that handle larger data sets with massive scalability requirements. No previous experience of WebSphere eXtreme Scale is required.

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: "This method takes an instance of a java.util.Map and adds all of its key/value pairs to the ObjectMap."

A block of code is set as follows:

BackingMap bm = grid.defineMap("payments");
bm.setNullValuesSupported(true);
bm.setTimeToLive(60 * 60 * 24);
bm.setTtlEvictorType(TTLType.CREATION_TIME);
bm.setLockStrategy(LockStrategy.PESSIMISTIC);
bm.setLockTimeout(20)

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

try {

pl.initialize();
pl.loadPayments(args[0]);
} catch (ObjectGridException e) {

e.printStackTrace();
} catch (IOException e) {

e.printStackTrace();
}

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

startOgServer catalog0 -catalogServiceEndPoints catalog0:
galvatron:6601:6602

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: "A partition is made of even smaller pieces called shards".

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 email to, and mention the book title via the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or email .

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book on, 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.

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 to 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 let us know link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata added to any list of existing errata. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

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 web site 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.