Skip to content

Commit 37ec645

Browse files
authored
feat(AIP-111): introducing AIP around planes. (#1132)
The term data plane have been used in the AIPs without a clear definition. Introducing the term "management" and "data" plane, as these are industry-standard terms and are also well defined in the context of Google APIs. These definitions are also helpful in: - providing fine-grained API guidance depending on the plane - help inform new annotations on resources and methods, which can be used for auditing and determining coverage - further help clarify classifications of methods (AIP-130) Also removing the redundant text in AIP-128.
1 parent 6b4e460 commit 37ec645

5 files changed

Lines changed: 102 additions & 23 deletions

File tree

aip/general/0008.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@ AIPs **must** have appropriate front matter.
3838

3939
```yaml
4040
---
41-
aip:
42-
id: 8
43-
state: reviewing
44-
created: 2019-05-28
41+
id: 8
42+
state: reviewing
43+
created: 2019-05-28
4544
permalink: /8
4645
redirect_from:
4746
- /08

aip/general/0111.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
id: 111
3+
state: approved
4+
created: 2023-06-17
5+
placement:
6+
category: api-concepts
7+
order: 50
8+
---
9+
10+
# Planes
11+
12+
Resources and methods on an API can be divided into the *plane* that they reside
13+
or perform operations upon. For the context of APIs, the following planes are
14+
defined:
15+
16+
- Management plane: a uniform, resource-oriented API that primarily
17+
configures and allows retrieval of resources.
18+
- Data plane: a heterogenous API (ideally resource-oriented) that reads and
19+
write user data. Often connects to entities provisioned by the management
20+
plane, such as virtual machines.
21+
22+
The term "plane" was originally used in networking architecture. Although system
23+
and network architecure often defines additional planes (e.g. control plane or
24+
power planes), as the AIPs are focused on the interface, they are not defined in
25+
this AIP.
26+
27+
## Guidance
28+
29+
### Management Plane
30+
31+
Management resources and methods exist primarily to provision, configure, and
32+
audit the resources that the data plane interfaces with.
33+
34+
As an example, the following are considered management resources for a cloud
35+
provider:
36+
37+
- virtual machines
38+
- virtual private networks
39+
- virtual disks
40+
- a blob store instance
41+
- a project or account
42+
43+
### Data Plane
44+
45+
Methods on the data plane operate on user data in a variety of data formats, and
46+
generally interface with a resource provisioned via a management plane API.
47+
Examples of data plane methods include:
48+
49+
- writing and reading rows in a table
50+
- pushing to or pulling from a message queue
51+
- uploading blobs to or downloading blobs from a blob store instance
52+
53+
Data plane APIs **may** be heterogenous across a larger API surface, due to
54+
requirements including high throughput, low latency, or the need to adhere to an
55+
existing interface specification (e.g. ANSI SQL).
56+
57+
- For convenience, resources and methods that operate on the data plane **may**
58+
expose themselves via resource-oriented management APIs. If so, those resources
59+
and methods **must** adhere to the requirements of the management plane as
60+
specified in the other AIPs ([AIP-131][] through [AIP-135][]).
61+
62+
### Major distinctions between management and data plane
63+
64+
- [IaC][] tools operate on the management plane exclusively.
65+
- Data planes are often on the critical path of user-facing functionality, and
66+
therefore:
67+
- Have higher availabilty requirements than management planes.
68+
- Are more peformance-sensitive than management planes.
69+
- Require higher-throughput than management planes.
70+
71+
72+
[AIP-131]: ./0131.md
73+
[AIP-135]: ./0136.md
74+
[IaC]: ./0009.md#iac
75+
76+
## Changelog
77+
78+
- **2023-06-10**: Introduction of this AIP.

aip/general/0128.md

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,6 @@ tools requires uniformity, so that integration can be automated.
2626

2727
## Guidance
2828

29-
Services **should** clearly delineate between "control plane" operations and
30-
"data plane" operations, ideally through the use of distinct services with
31-
their own interface definition documents.
32-
33-
- Control plane operations are responsible for managing the _lifecycle_ of
34-
resources.
35-
- Data plane operations are responsible for managing the _content_ of
36-
resources.
37-
38-
The same resource **may** have both control plane operations and data plane
39-
operations associated with it. For example, a database API would have
40-
operations to create or delete database tables (control plane) as well as
41-
operations to write and read rows to that table (data plane).
42-
4329
### Resources
4430

4531
Resources that are declarative-friendly **must** use only strongly-consistent
@@ -111,5 +97,6 @@ is a comprehensive reference to declarative-friendly guidance in other AIPs:
11197

11298
## Changelog
11399

114-
- **2023-05-11**: removed must on resource_id, which was upstreamd to a general
115-
must
100+
- **2023-06-17**: Definition of plane was removed and incorporated into AIP-111.
101+
- **2023-05-11**: Removed must on resource_id, which was upstreamed to a general
102+
must.

aip/general/0133.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,18 @@ to done if the request is effectively immediate.
126126

127127
### User-specified IDs
128128

129-
An API **must** allow a client to specify the ID component
130-
of a resource (the last segment of the resource name) on creation. An API
129+
An API **must** allow a user to specify the ID component of a resource (the last
130+
segment of the resource name) on creation if the API is operating on the
131+
[Management Plane][].
132+
133+
On the [Data Plane][], an API **should** allow a user to specify the ID.
134+
Exceptional cases should have the following behavior:
135+
136+
- The data plane resource allows identical records without a need to
137+
disambiguate between the two (e.g. rows in a table with no primary key).
138+
- The data plane resource will not be exposed in [IaC][] clients.
139+
140+
An API
131141
**may** allow the `{resource}_id` field have the [field_behavior][] `OPTIONAL`,
132142
and generate a system-generated ID if one is not specified.
133143

@@ -193,6 +203,8 @@ name and use it in references from other resources.
193203
[aip-155]: ./0155.md
194204
[aip-203]: ./0203.md
195205
[aip-210]: ./0210.md
206+
[Data Plane]: ./0111.md#data-plane
207+
[Management Plane]: ./0111.md#management-plane
196208
[errors]: ./0193.md
197209
[field_behavior]: ./203.md
198210
[IaC]: ./0009.md#iac
@@ -201,7 +213,8 @@ name and use it in references from other resources.
201213
## Changelog
202214

203215
- **2023-05-11**: Changing guidance around resource_id to a must.
204-
- **2022-11-04**: Referencing aggregated error guidance in AIP-193, similar to other CRUDL AIPs.
216+
- **2022-11-04**: Referencing aggregated error guidance in AIP-193, similar to
217+
other CRUDL AIPs.
205218
- **2022-06-02**: Changed suffix descriptions to eliminate superfluous "-".
206219
- **2020-10-06**: Added declarative-friendly guidance.
207220
- **2020-08-14**: Updated error guidance to use permission denied over

aip/general/scope.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ order: 0
44
categories:
55
- code: meta
66
- code: process
7+
- code: api-concepts
8+
title: API Concepts
79
- code: resource-design
810
title: Resource Design
911
- code: operations

0 commit comments

Comments
 (0)