Overview of the 5800 System C Client API

Architecture

The 5800 system C API client supports two different access patterns: a synchronous “EZ” access very similar to the current Java implementation, and a more flexible, nonblocking access based on the POSIX model.

Note – For this release, the nonblocking C API client is not implemented.

Interfaces

The C client library interacts with the 5800 system server entirely through an HTTP protocol.

Retrying Operations

Calls to the C 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.

Multithreaded Access

Both the synchronous and the nonsynchronous C APIs are fully thread-safe and can be used simultaneously in multiple threads from the same process. Each thread must call “hc_session_create_ez” on page 53 to create its own session. Sessions must not be shared between threads.

Caution – Name resolution must be done in a single thread with the subsequent IP address passed to hc_session_create_ez, otherwise core dumps will occur if multiple name resolution threads call getaddrinfo at the same time.

Performance and Scalability

The 5800 system C client library provides high performance and is highly scalable.

The synchronous C API performs its own calls to select() internally.

For the nonblocking C API (not yet implemented), access is provided to the underlying fd_set so that all pending I/O operations can be serviced by a single thread on the basis of status returned by the POSIX select() function, possibly after merging the 5800 system fd_set with some external, application-specific fd_set.

40

Sun StorageTek 5800 System Client API Reference Manual • June 2008

Page 40
Image 40
Sun Microsystems 5800 manual Architecture, Multithreaded Access