arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.13696cs.SE
收藏

微服务 API 模式如何影响可理解性?一项受控实验

How Do Microservice API Patterns Impact Understandability? A Controlled Experiment

Justus Bogner, Pawel Wójcik, Olaf Zimmermann

AI总结:

本文通过 65 名参与者、6 种 MAP 和 24 个等价 API 示例的受控交叉实验,发现 5 种模式显著提升可理解性,但效应多较小,且经验丰富者获益更明显。

摘要:

微服务通过远程应用程序编程接口(API)暴露其功能,例如基于 HTTP 或异步消息传递技术的接口。为了解决该设计领域中反复出现的问题,Microservice API Patterns(MAP,微服务 API 模式)应运而生,用于汇集 API 设计社区的集体经验。目前,这些模式的有效性仍缺乏实证证据,例如它们如何影响可理解性和 API 可用性。因此,我们针对 6 种微服务模式开展了一项受控实验,由 65 名背景多样的参与者评估其对可理解性的影响。此外,我们还希望研究多年专业经验或 MAP 使用经验等人口统计因素如何影响这些模式的效果。对于每种模式,我们构建了两个 API 示例,分别为模式版本“P”和功能等价的非模式版本“N”(共 24 个)。基于交叉设计,参与者需要回答理解性问题,同时我们测量用时。对于 6 种模式中的 5 种,我们发现其对可理解性具有显著正向影响,即参与者在“P”版本下回答得更快和/或更正确。然而,效应量大多较小,只有一种模式表现出中等效应。表现与人口统计因素之间的相关性似乎表明,某些模式可能会引入额外的复杂性;熟悉 MAP 的人将从其效果中获益更多。这对 MAP 及其他模式相关的培训和教育具有重要意义。

英文摘要:

Microservices expose their functionality via remote Application Programming Interfaces (APIs), e.g., based on HTTP or asynchronous messaging technology. To solve recurring problems in this design space, Microservice API Patterns (MAPs) have emerged to capture the collective experience of the API design community. At present, there is a lack of empirical evidence for the effectiveness of these patterns, e.g., how they impact understandability and API usability. We therefore conducted a controlled experiment with 6 microservice patterns to evaluate their impact on understandability with 65 diverse participants. Additionally, we wanted to study how demographics like years of professional experience or experience with MAPs influence the effects of the patterns. Per pattern, we constructed two API examples, each in a pattern version "P" and a functionally equivalent non-pattern version "N" (24 in total). Based on a crossover design, participants had to answer comprehension questions, while we measured the time. For five of the six patterns, we identified a significant positive impact on understandability, i.e., participants answered faster and / or more correctly for "P". However, effect sizes were mostly small, with one pattern showing a medium effect. The correlations between performance and demographics seem to suggest that certain patterns may introduce additional complexity; people experienced with MAPs will profit more from their effects. This has important implications for training and education around MAPs and other patterns.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑