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

Caching more than ORM


Though we cache a lot of objects that map to database tables through an ORM framework, we are not limited to ORM'd objects. The NameToId map is an example of this. It does not have a corresponding table in a database. Instead, it is an intermediate map between users and their data. The user data doesn't necessarily need to be the user object and the bookmarks that go along with it. We can cache HTML fragments instead.

Which HTML fragments? A user looks at their bookmarks in a browser. If a user hasn't changed their bookmarks since the last cache hit, then we store the HTML view of those bookmarks in addition to the data objects. This moves the cache one logical layer closer to the user. Instead of assembling HTML in the controller, we perform a lookup in a BackingMap:

<backingMap name="HtmlFragments" />

That's it! Now our controllers can build the HTML that represents a list of bookmarks and store them in this map.

In fact, at any time, caching closer to the presentation...