2

ExportServices - Client Registration

 2 years ago
source link: https://ahaedgar.github.io/2018/09/13/ExportServices-ClientRegistration/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

ExportServices - Client Registration:

  • Introduction to Client Registration
  • Data Model
  • Data Dictionary
  • High Level Interaction Diagram
  • Client Registration Details

Introduction to Client Registration

EdgeX Foundry Export Client Registration微服务使客户端(无论是在网关上还是在网关外)注册为通过Core Data传输数据的接收者。

数据由传感器和设备发送到网络边缘,进入EdgeX Foundry。然后,数据通过EdgeX Foundry的设备服务层传输到Core Services Layer中的Core Data,然后通过消息队列将数据汇集到导出工具。Export facility由两个微服务组成:

  • 一种微服务,使clients能够通过注册,获取它们感兴趣的数据(注册)
  • 一种微服务,用于根据需要过滤和转换数据,然后将数据物理地提供给已注册的clients,称为Export Distro微服务(分发)

网关上的客户端(Clients on-gateway)包括本地分析服务、关键事件处理器、规则引擎服务等。这些本地客户端通常需要根据检查的数据通过Command微服务控制传感器/设备,它们是通过Export Facility接收数据。

网关外的客户端(Clients off-gateway)通常是经典企业云系统或网关聚合系统。这些系统通常提供历史数据和更深层次数据分析能力。

client registration微服务提供REST API,使客户端能够对Core Data建立新请求、更新现有请求以及删除请求。虽然没有与此服务直接关联的用户界面,但UI控制台和其他系统管理系统可以使用提供的API提供此功能。

2. Data Model

3. Data Dictionary

This Data Dictionary has the same content as the Data Dictionary for Export Services–Distribution.

4. High Level Interaction Diagram

5. Client Registration Details

客户注册服务使客户能够提供有关他们想要数据的“what”、“how”和“where”的若干详细信息。

“What” Data

“what”指定数据的过滤器:过滤并仅向客户端发送感兴趣的数据。默认情况下,网关收集的所有通过Core Data的数据都会发送到每个客户端。但是,目前客户端可以建立两种过滤器。

  • 按Device ID或Device Name过滤。客户端注册时,指定的设备ID或设备名称的集合,使客户端只能从这些设备和传感器获取数据。
  • 按Value Descriptor ID或Value Descriptor Name过滤。值描述符描述数据的类型和内容。例如,名为“温度”的值描述符将描述恒温器或其他温度读数数据。通过客户端注册指定的值描述符ID或名称的集合使客户端能够获取仅使用这些值描述符标记的数据。

如果没有为注册提供过滤器,则所有数据都将转发到客户端。提供注册一个或两个过滤器,将发送到客户端的数据限制为:与数据的设备分区或值描述符标记匹配的数据。

“how” it is to be Formatted

如何将数据传递给客户端也取决于客户端注册。客户端可以请求以特定格式发送数据,对数据进行加密,压缩或加密和压缩。

  • Format - Json / XML (2 options are avaliable)
  • Encryption - no encryption / AES (2 options are avaliable)
  • Compression - no compression / GZIP / ZIP (3 options are avaliable)
“where” it is to be Delivered

EdgeX Foundry客户端可以要求将数据推送到他们选择的端点。注册时需要提供有关端点(URL,credentials等)的详细信息。EdgeX Foundry支持两种类型的目标:push to a REST endpoint ;publish to a designated MQTT broker’s topic。

REST端点交付必须提供其客户端注册信息:

  • REST address (URL and port)
  • REST path
  • POST HTTP method is assumed
  • No reply is expected by the EdgeX Foundry services

MQTT端点交付必须提供其客户端注册信息:

  • Broker address (URL and port)
  • Client ID
  • Username and password
  • Destination topic
  • QOS is assumed to be 0 and keepAlive time is assumed to be 60 seconds.

数据也可以通过ZeroMQ发送到选择的ZeroMQ端点,但通常用于本地客户端接收器,例如本地规则引擎服务,而不是外部客户端。

参考文献
ExportServices-ClientRegistration


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK