Writing a service

There are two phases in writing a service:

Defining a service

To define a service:

Step

Description

See...

1

Understand the managed resource and how to best interact with it.

Understanding the managed resource

2

Design an interface (a set of API function calls and their associated errors, events, and reasons).

3

Determine the tracing capability for debugging purposes.

Defining tracing


Implementing a service

To implement a service:

Step

Description

See...

1

Write the service API.

API implementation overview

2

Write the service SPI.

SPI implementation overview

3

Implement the service manager functions for initialization and shut down.

4

Implement the service manager functions for command and event processing.

5

Implement the service manager functions for tracing and error handling.

6

Implement the service functions that interact with the managed resource.

Implementing service functions