With a simple data grid,
you can perform create, retrieve, update and delete operations. In
particular, you can use the simple data grid to allow faster access
to data that is stored in a database.
Before you begin
You can use simple
data grids with
WebSphere® Application
Server or with a stand-alone Java™ application. The
WebSphere eXtreme
Scale Client must be installed in
either scenario.
About this task
You can use simple
data grids to
speed up dynamic Web applications by alleviating database load. You
can store key-value pairs of arbitrary data in-memory, reducing expensive
database queries. The keys can be of any existing Java type, such
as java.lang.String or Integer. The values can be any serializable
object type. Every time data is needed, the simple
data grid on the appliance is checked
first. If the appliance does not have the data, the data is retrieved
from the database and inserted into the simple
data grid.
Procedure
- Create the simple data grid. In the user interface, click . Click the add icon ( ) and specify a name for the simple data grid that you want to create.
The following characters cannot be used in the name of the data grid: ^ . \\ / , # $ @ : ; \ * ? <
> | = + & % [ ] " ".
- Download the objectgrid.xml file for
your simple data grid. In the configuration for the simple data grid that you created, click
the download icon () and save the
file to your local file system.
- Create an application that accesses the data grid. For more
information, see Developing applications to access simple data grids.
What to do next
- Configure security before you begin to send data to the data grid.
See Enabling security for data grids for more information.
- Configure replicas. Replicas ensure that your data grid data is
available if the primary copy fails. To configure replicas, click . Replicas
are created only when the appliance is in a collective. If the number
of appliances in the collective is n, the maximum
number of replicas is n-1. Therefore if you configure
three replicas, but you only have two appliances in the collective,
only one replica is created. Additional replicas are created if you
add appliances to the collective. Set the number of replicas to the
ideal amount that you want to have, so that as appliances join the
collective, new replicas can be created. The data grid content is
cleared when you edit the number of replicas.
- Configure a capacity limit for the data grid.
By configuring capacity limits on the data grid, you can ensure that
the storage capacity for the collective is used in a predictable manner.
See Configuring the maximum capacity of a data grid for more information.
- Configure a time to live evictor for a simple grid. See Configuring a time to live (TTL) evictor for more information.
- You can monitor your data grid in
the DataPower® XC10
Appliance user interface. See Monitoring data grids in the user interface for more information.