Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update dmi docs #471

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions docs/concept/device/dmi.md

This file was deleted.

40 changes: 40 additions & 0 deletions docs/developer/dmi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: Device Management Interface
sidebar_position: 1
---

## DMI
Device Management Interface(DMI) integrates the device management interface and optimizes the device management capability of KubeEdge.
It is the goal of KubeEdge DMI that builds a cloud native device twin management platform which covers device management, device operation and device data management.
DMI defines a unified connection entrance between EdgeCore and Mapper, and EdgeCore and Mapper implement the upstream data flow and downstream data flow respectively,
At the same time, DMI decouples device management plane and device data plane , allowing device management plane to only carry the life cycle
management of the device itself, while device data plane is directly provided to data consumer applications through microservices.
Under such an architecture, device data is pushed directly from the data plane and does not necessarily need to be pushed to the cloud.
This allows the cloud-edge channel to transmit only a small amount of management plane information, reducing the possibility of cloud-edge communication congestion.


### Architecture
![DMI](/img/device/DMI.png)

### Device management and data management in DMI
The picture above is the design diagram of DMI device management and data management. The yellow line is the
device management process and the blue line is the data management process.

In the architectural design of DMI, the device management plane mainly includes the device's metadata,
device attributes, configuration, status, life cycle, etc. It is characterized by being relatively stable.
After creation, there are fewer updates of information except status reporting, and it is closer to the Pod.
Users can maintain the life cycle of Device through the cloud Kubernetes API just like accessing Pod, while minimizing the additional data transmission overhead caused by
device management.

In DMI design, the device provides data services to device data consumers in a cloud-native manner. Device data access under
the DMI framework supports multiple scenarios and is more flexible. The above figure lists several main data access
methods, including push data and pull data, etc. The details are as follows:
1. Mapper pushes data to cloud/edge applications by configuring the destination address.
2. Mapper pushes data to cloud/edge databases by configuring the destination address.
3. Users applications actively pull device data through the API.
4. Mapper pushes device data to the cloud through the cloud edge channel

### DMI interface definition
DMI interface definition refers to [DMI interface](https://github.com/kubeedge/kubeedge/blob/master/pkg/apis/dmi/services.go)
The current version of DMI interface is defined in gRPC proto.
You can use the generate-dmi-proto [script](https://github.com/kubeedge/kubeedge/blob/master/hack/generate-dmi-proto.sh) to create the corresponding gRPC-go code.

This file was deleted.

34 changes: 34 additions & 0 deletions i18n/zh/docusaurus-plugin-content-docs/current/developer/dmi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: 设备管理框架
sidebar_position: 1
---

## 设备管理框架

设备管理框架(Device Management Interface,DMI)集成了设备管理接口,优化了KubeEdge的设备管理能力。KubeEdge DMI的目标是
构建一个涵盖设备管理、设备操作和设备数据处理的云原生设备孪生管理平台。 DMI定义了EdgeCore和Mapper之间的统一连接入口,
EdgeCore和Mapper分别实现上游数据流和下游数据流,同时,DMI解耦了设备管理面和设备数据面,让设备管理面只承载设备生命周期的管理,
而设备数据面通过微服务直接提供给数据消费应用程序。在这样的架构下,设备数据直接从数据面推送,不一定需要推送到云端。这使得云边通道能够
只传输少量的管理面信息,减少了云边通信拥塞的可能性。

### 架构
![DMI](/img/device/DMI.png)

### DMI中的设备管理和数据管理
上图是DMI设备管理和数据管理的设计图。黄线是设备管理流程,蓝线是数据管理流程。

在DMI的架构设计中,设备管理面主要包括设备的元数据、设备属性、配置、状态、生命周期等。其特点是比较稳定。创建后,除了状态报告之外,
信息的更新较少,接近于Pod。 用户可以像访问Pod一样通过云端Kubernetes API维护Device的生命周期,同时最大限度地减少设备管理带来的
额外数据传输开销。

在DMI设计中,设备以云原生的方式向设备数据消费者提供数据服务。DMI框架下的设备数据访问支持多种场景,更加灵活。上图列出了几个主要的数据访问
方法,包括推送数据和拉取数据等,具体如下:

1. Mapper通过配置目标地址将数据推送到云/边缘应用程序。
2. Mapper通过配置目标地址将数据推送到云/边缘数据库。
3. 用户应用程序通过 API 主动拉取设备数据。
4. Mapper通过云边通道将设备数据推送到云端。

### DMI接口定义
DMI接口定义可以参考 [DMI interface](https://github.com/kubeedge/kubeedge/blob/master/pkg/apis/dmi/services.go)。
当前版本的 DMI 接口是在 gRPC proto 中定义的。你可以使用generate-dmi-proto脚本创建相应的gRPC-go代码。
Binary file added static/img/device/DMI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.