00 | 为什么下一个开源项目可能仅是一个接口

We are likely to see more open interfaces and metaframeworks emerge, but they have their drawbacks.

我们也许会看到更多开放接口和原框架出现,但是他们都有各自的缺点。

What do deep learning, serverless functions, and stream processing all have in common? Outside of being big trends in computing, the open source projects backing these movements are being built in a new, and perhaps unique, way. In each domain, an API-only open source interface has emerged that must be used alongside one of many supported separate back ends. The pattern may be a boon to the industry by promising less rewrite, easy adoption, performance improvements, and profitable companies. I’ll describe this pattern, offer first-hand accounts of how it emerged, discuss what it means for open source, and explore how we should nurture it.

深度学习,无服务器功能和流处理有什么共同之处呢?它们除了成为计算领域大趋势之外,支持它们的开源项目也正以一种新的或者是独特的方式被构建。在每一个领域,当一个仅支持API方式的开源接口出现,它就必须伴随着众多受支持的独立后端之一进行使用。这种模式可能会给行业带来好处,因为其承诺较少的重写,易采用,提升性能和公司盈利。我将描述一下这种模式,提供它是怎样出现的第一手资料,讨论它对于开源有怎样的意义,并探索我们该如何去培育它。

Typically, a new open source project provides both a new execution technology and an API that users program against. API definition is, in part, a creative activity, which has historically drawn on analogies (like Storm’s spouts and bolts or Kubernetes’ pods) to help users quickly understand how to wield the new thing. The API is specific to a project’s execution engine; together they make a single stand-alone whole. Users read the project’s documentation to install the software, interact with the interface, and benefit from the execution engine.

通常,一个新的开源项目既提供了一种新的执行技术,也提供了用户编程时所使用的API。API的定义在某种程度上是一个创造性活动,它在历史中借鉴了类似的概念(像Storm的spouts,bolts和Kubernetes的pods)去帮助用户快速的理解怎样去使用新的事物。对于一个项目执行引擎,API是特定的;它们一起就构成了一个单独的整体。用户阅读项目的文档去安装软件,与接口进行交互,并从执行引擎中获利。 [这里的against不知该怎么翻译呢?]

Several important new projects are structured differently. They don’t have an execution engine; instead, they are metaframeworks that provide a common interface to several different execution engines. Keras, the second-most popular deep learning framework, is an example of this trend. As creator François Chollet recently tried to explain, “Keras is meant as an interface rather than as an end-to-end framework.” Similarly, Apache Beam, a large-scale data processing framework, is a self-described “programming model.” What does this mean? What can you do with a programing model on its own? Nothing really. Both of these projects require external back ends. In the case of Beam, users write pipelines that can execute on eight different “runners,” including six open source systems (five from Apache), and three proprietary vender systems. Similarly, Keras touts support for TensorFlowMicrosoft’s Cognitive Toolkit (CNTK)TheanoApache MxNet, and others. Chollet provides a succinct description of this approach in a recent exchange on GitHub: “In fact, we will even expand the multi-back-end aspect of Keras in the future. ... Keras is a front end for deep learning, not a front end for TensorFlow.”

有些重要的新项目结构是不同的。它们没有执行引擎,取而代之的是元框架,元框架为一些不同的执行引擎提供了一个通用的接口。Keras ,第二大流行的深度学习框架,就是这种趋势的一个例子。正如其创建者 François Chollet 最近试图解释的那样,“Keras是一个接口而非端到端的框架。” 与此类似的是,Apache Beam,一个大规模的数据处理框架,自我描述为“编程模型”。这是什么意思呢?你能用它自身的编程模型做什么呢?事实上并不能做些什么。所有这些项目,都必须要求有一个外部的后端。Apache Beam,用户编写的管道可以在8个不同的运行器上执行,包括6个开源系统(5个来自Apache)和3个专有的供应商系统。类似的,Keras 也支持 TensorFlow、微软认知工具包(Microsoft’s Cognitive Toolkit,CNTK)、Theano、Apache MxNet 等。Chollet 在 GitHub 最近的一次交流中简要描述了这种方法:“事实上,我们将来甚至会扩展 Keras 的多后端的方面。…Keras 是深度学习的前端,而不是 TensorFlow 的前端。”

扫描二维码关注公众号,回复: 6278607 查看本文章

The similarities don’t end there. Both Beam and Keras were originally created by Googlers at the same time (2015) and in related fields (data processing and machine learning). Yet, it appears the two groups arrived at this model independently. How did this happen, and what does that mean for this model?

 相似之处不止于此。Beam 和 Keras 最初都是由 Google 员工在同一时间(2015 年)以及相关领域(数据处理和机器学习)创建的。然而,看上去这两个小组都独立地得到了这个模型。这究竟是怎么发生的?这对于这个模型意味着什么呢?

附原文链接:

Why your next open source project may only be an interface

https://www.scalevp.com/blog/why-your-next-open-source-project-may-only-be-an-interface

附InfoQ翻译链接:

https://www.infoq.cn/article/WRpx0w-clwPg6DEtvjyZ

猜你喜欢

转载自www.cnblogs.com/hututu77/p/10928311.html
00