Developing data grid applications with the REST gateway

You can use the Representational State Transfer (REST) gateway to access simple data grids that are hosted by a collective. This REST gateway is useful when you must access grid data from non-Java environments.

Before you begin

  • You can use the REST gateway with WebSphere® DataPower® XC10 Appliance Version 1.0.0.4 or later.
  • You must create a simple data grid on the appliance. For more information about creating a simple data grid, see Creating simple data grids.

About this task

Use the REST gateway to access simple data grid data from non-Java environments such as the DataPower XI50 Appliance or a .NET application. You can also use the REST gateway to access map data from a Java™ virtual machine that cannot host the IBM® Object Request Broker (ORB) that is used by the Java-based ObjectMap API.

Transactions

Each REST operation to the WebSphere DataPower XC10 Appliance begins and ends an independent transaction to the data grid. It is not possible to chain together multiple operations into a single transaction.

Load balancing

When you are using the REST gateway, it is the client responsibility to load balance their requests onto the WebSphere DataPower XC10 Appliance collective. You can use an external load balancer or add additional logic in the HTTP client you are using in the client program.

Security

Communication through the REST gateway always results in a secure configuration, even if you do not have security enabled on the data grid. Configure the user groups that you want to access the data grid to have all access rights to the data grid.

Relationship to WebSphere eXtreme Scale REST data service

The REST gateway is a separate entity from the WebSphere eXtreme Scale REST data service, which implements the Microsoft ADO.NET Data Services interface.

  • REST gateway: URI format
    By specifying a URI in a specific format, you can access and perform operations on your simple data grid.
  • REST gateway: Data format
    The REST gateway uses the Content-Type header in your HTTP requests to determine the data format of the data stored into the data grid.
  • REST gateway: REST operations
    You use HTTP POST, GET, and DELETE operations to insert or update, get, and remove data from the data grid.
  • REST gateway example: Inserting and getting data grid map entries
    You can use the POST and GET HTTP methods to insert and get data grid map entries.
  • REST gateway example: Clearing data grid map entries
    You can use the HTTP DELETE method of the REST gateway to clear a map in a data grid.
  • REST gateway example: Creating dynamic maps
    When you create a simple data grid, a default map with the same name is created by default. You can also use map templates to create additional maps as your application requires.
  • REST gateway example: Time to live (TTL) expiration
    You can set a TTL value for both last update time (*.LUT) and last access time (*.LAT) maps. The default TTL for both types of maps is one hour.
  • REST gateway: Security configuration
    To access a data grid through the REST gateway, the user must be authenticated to the WebSphere DataPower XC10 Appliance, regardless of whether the data grid has security enabled. The application client must always provide a basic authorization header with the authorized user ID and password in the HTTP headers of the HTTP request. To access data grids through the REST gateway, provide the user ID and password in an authorization header.
  • REST gateway: HTTP sessions and cookies
    Use HTTP sessions and cookies with the REST gateway with Set-Cookie: headers.
Parent topic: Developing applications to access simple data grids
Related concepts:
Developing data grid applications with Java APIs
Related tasks:
Creating simple data grids