Sun StorageTek 5800 System Client API Reference Guide

Overview of the 5800 System Java Client API

This section provides an overview of the 5800 system Java client API. The following topics are discussed:

Client Library

The 5800 system Java client library provides a simple way to communicate with 5800 system clusters. It provides programmatic access to the 5800 system network protocol, which operates over HTTP, enabling you to store, retrieve, query, and delete object data and metadata.

The 5800 system Java client library provides a platform-independent mechanism to upload data and metadata to a 5800 system, and to retrieve and query the data and metadata. The Java client library works with any implementation of J2SETM platform 4.0 or later with HTTP connectivity to the 5800 system cluster. Access is designed to be high-level and easy to use. Most operations are accomplished in a single (synchronous) function call.

Interfaces

The Java client API interacts with the 5800 system server entirely through an HTTP protocol. The HTTP communication layer uses the Apache Commons HTTP client.

Object data is streamed through the Java client library opaquely and a well-defined data hash is returned for verification purposes. Metadata is added or retrieved with typed accessors. The stored representation of metadata on the 5800 system server is not exposed to the user, and no hash is returned when metadata is stored.

The 5800 system Java client library provides the NameValueObjectArchive class as an application access layer, which should be appropriate for most applications. In addition, an advanced interface provides a mechanism to customize the 5800 system and to serve as a toolkit to build new applications.


Note –

The advanced toolkit is not described in this document. If you are interested in pursuing advanced applications, contact your 5800 system Sales Representative.


Retrying Operations

Calls to the Java API should be wrapped with retry logic so that their applications are resilient to transient failures that may be experienced when a node or switch fails while servicing an operation.

Requests that fail on recoverable HTTP errors are automatically retried once. A typical recoverable error occurs when the 5800 system HTTP server times out a connection that the client then tries to reuse (the client maintains a collection pool). This results in a connection failure at request time. Because this is a recoverable error, it is retried and the retry typically succeeds.

Performance and Scalability

Starting the Java Virtual Machine (JVM) incurs a performance penalty, but once the JVM is running, you can use the client object archive repeatedly and from multiple threads. I/O is synchronous (blocking). HTTP connections are pooled for performance. You should instantiate one instance of the NameValueObjectArchive per 5800 system server and use it for all access to that server until exit.

Updating Client View of the Schema

In the Java client API, the schema is fetched when the NameValueObjectArchive class is instantiated. If the schema has changed, the client application needs to create a new NameValueArchive. A local copy of the schema is used for some metadata operations.