beautypg.com

Architecture, Interfaces, Retrying operations – Sun Microsystems Sun StorageTek 5800 User Manual

Page 40: Multithreaded access, Performance and scalability

background image

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.

Overview of the 5800 System C Client API

Sun StorageTek 5800 System Client API Reference Manual • June 2008

40