Sun Microsystems 5800 Computer Drive User Manual


 
Architecture
The 5800 system C API client supports two dierent access patterns: a synchronous “EZ” access
very similar to the current Java implementation, and a more exible, 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-specic fd_set.
Overview ofthe5800 SystemCClient API
SunStorageTek 5800SystemClientAPIReferenceManual June 200840