Skip to Content
Data Mesh
book

Data Mesh

by Zhamak Dehghani
May 2025
Intermediate to advanced
386 pages
4h 14m
Chinese
O'Reilly Media, Inc.
Content preview from Data Mesh

第 12 章 设计 设计消耗、转换和提供数据

本作品已使用人工智能进行翻译。欢迎您提供反馈和意见:translation-feedback@oreilly.com

数据产品的主要工作是使用其输入数据端口从上游来源获取数据,对数据进行转换,并通过其输出数据端口将转换结果作为可永久访问的数据提供给用户。

在本章中,我将介绍所有数据产品都要实现的这三个基本功能的设计特点:消费数据"Consume Data")转换数据"Transform Data")服务数据"Serve Data")

让我们先来看看对 Data Mesh 方法来说最具独特属性的一种。

服务数据

数据产品向各种分析消费者提供面向领域的数据。它通过第 9 章介绍的输出数据端口(接口)来实现这一目的。输出数据端口有明确定义的合约API

当考虑到 "提供领域驱动数据 "这一看似简单的功能与生态系统中的代理及其能力和需求之间的关系时,它就具有了有趣的特性。

让我们来看看数据产品与其数据用户之间的关系。

数据用户的需求

图 12-1显示了数据用户的需求 以及数据产品如何为用户提供服务。

图 12-1. 服务数据属性,满足数据用户及其需求

数据用户提出的要求对数据产品如何为其数据服务提出了一系列设计方面的考虑:

分析数据用户的情况多种多样

数据 用户--访问和读取数据的客户--属于各种角色和应用类型:如数据分析师、数据科学家和数据驱动的应用开发人员;以及报表、可视化、统计模型和机器学习模型等系统。回顾第 3 章,数据产品提供数据的方式要让这些不同的角色感觉是原生的。我们把数据产品的这一基本可用性特征称为原生可访问性。

这一要求的设计含义是以多模式访问方式提供数据--以不同的格式和访问模式提供相同的数据语义。

分析数据用户需要纵向数据

Data Mesh 可以纵向查看数据的全局状态,完全用于分析用例,最重要的是无需网外数据湖、仓库或任何外部系统来维护全局状态。

这种持续变化的全局数据状态由数据产品的连接图来存储和维护,而没有其他架构元素。这就是架构去中心化的含义。

无论是回顾性洞察还是未来性洞察,只有考虑到时间的推移,才能发挥最大的威力。只有通过访问随时间不断变化的数据,我们才能形成趋势、做出预测,并发现跨多个领域的不同事件之间的相关性。Data Mesh 假设时间是呈现和查询数据时始终存在的参数。

要访问纵向数据,即表示事件和状态随时间变化的数据,设计上的要求是每个数据量提供位时数据。

分析数据用户需要在一个时间点上对多个域进行一致的查看

大多数分析用例都处理来自多个数据产品的数据。这些用例在一致的时间点关联多个数据产品。例如,当 Daff 在 2021-07-01 日训练一个机器学习模型来预测下个月的用户增长时,它是基于过去三年的数据来预测的,而这些数据是在 2021-07-01 日由多个数据产品已知处理的

为了支持在 2021-07-21 日处理的这一版本增长模型的可重复性,Data Mesh 在 2021-07-21 日保持多个数据产品的数据状态不变。

在多个数据产品中提供时间点一致的数据,并对数据进行版本控制以实现可重复性,这就为数据服务引入了多个设计考虑因素:位时性、不变性和只读访问 。

服务数据设计属性

让我们 ,在我们之前发现的每一个特性中再深入一些: ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Data Mesh

Data Mesh

Zhamak Dehghani
Data Mesh

Data Mesh

Zhamak Dehghani
Foundations of Data Mesh

Foundations of Data Mesh

Chris Ford, Arne Lapõnin

Publisher Resources

ISBN: 9798341656864