Advantages of resource provisioning design:
1.
It enables deployment, scaling, load
balancing, logging, and monitoring of all resources both built-in and client
authored.
2.
There needs to be only one resource
type in the control plane for a new adapter service that stands for the desired
device configuration in terms of action and state. A controller can reconcile the device to its
device configuration. There needs to be only one controller for a resource
type. The commands, actions and state of a device may be quite involved but the
adapter service has a chance to consolidate a logical resource type.
3.
The device statistics can be converted to
metrics and monitoring and offloaded for collection and analysis to its own
stack. The metrics are pushed from other services. This has an opportunity to
use an off the shelf solution. The data in written once but it can be read-only
for analysis stacks. The Read-Write and Read-Only separation will help maintain
the source of truth.
4.
Separation of control plane and data plane also
provides opportunity to use other infrastructure at a later point of time that
allows all the services to be cloud friendly and portable.
5.
One of the ways to enforce backward
compatibility is to have specific versions for the APIs. In addition to having
data syntax and semantics compatibility described via data contracts that can
be verified offline via independent tools, it might be helpful to support
multiple versions of the service from the start. Exposing resources via
Representational State Transfer is a well-known design pattern
6.
The reconciliation of the resource
can be achieved with the help of a dedicated controller. A controller for the
device control plane resource object is a control loop that watches for the
state of the resource and then makes, or request changes as needed. Each controller
tries to move the current state to the desired state by reading the spec field
associated with the resource object. The control plane resource object can be
created, updated or deleted just like any other resource with representational
state transfer API design. The controller can set additional states on the
resource such as marking it as finished.
No comments:
Post a Comment