# Natural Access architecture overview

The major components in the Natural Access architecture are:

- Service implementation

- Service API

- Service SPI

- Service manager

- Dispatcher

The following illustration shows the components in the Natural Access architecture:

Natural Access architectural model

## Managed resource

Natural Access provides an environment for an application to interact with a managed resource such as a telephony board.

Managed resource

The Natural Access application corresponds to an RPC client. The managed resource corresponds to a managed resource in RPC. Client-side and server-side components can reside on the same computer, or on different computers.

## Service implementation

The service implementation provides the underlying (detailed) logic to interact with the managed resource.

Service implementation

A Natural Access service implementation corresponds to an RPC service implementation.

## Service API

In order to access the managed resource through the service implementation, a Natural Access application makes calls on a well-defined API. The service API is the set of function calls, including arguments and managed parameters, return values, and asynchronous events, that define the work that is performed by the service.

The service API acts as a contract specifying what a client can expect and what an implementation must provide.

Service API

The service API corresponds to the list of remote procedure calls in RPC.

## Service SPI

The service SPI (service provider interface) converts the API call into a message that is suitable for transmission to the service implementation.

Services communicate with other services by calling their SPI functions, not their high level API.

Service SPI

The service SPI corresponds to the RPC client side stub.

## Service manager

The service manager is a set of well-known, Natural Access-specified functions (known as binding functions) to be implemented on a per-service basis.

Among other things, the service manager implements binding functions to start up and shut down the service implementations, and functions to perform upcalls to service implementation functions.

Service manager

The service manager corresponds to RPC server side stubs and a portion of the RPC runtime library having to do with upcall processing.

## Dispatcher

The dispatcher provides the communications channel between the service interface and the service implementation components. If the client-side and server-side components reside on different computers, for example, the dispatcher provides the communications link between the two sides.

The dispatcher also provides a set of built-in services addressing common, system-level programming needs. The built-in dispatcher services are implemented across the client/server separation.

Dispatcher functionality

The dispatcher services are called using dispatcher functions (disp functions). The service manager binding functions interact with corresponding dispatcher built-in services.