conduit

未来已来:云原生(二)

谁说胖子不能爱 提交于 2019-11-29 21:35:16
上回书说到后端架构发展历程,还回顾完云计算的历史 本回将继续梳理云原生实现方案 Service Mesh 的发展历程,介绍 Service Mesh 的代表 Istio 的亮眼功能。 什么是原生 Native 在回顾完云计算的历史之后,我们对 Cloud 有更深的认识,接着继续看一下:什么是 Native? 字典的解释是:与生俱来的。 那 Cloud 和 native 和在一起,又该如何理解? 这里我们抛出一个我们自己的理解:云原生代表着原生为云设计。 详细的解释是:应用原生被设计为在云上以最佳方式运行,充分发挥云的优势。 这个理解有点空泛,但是考虑到云原生的定义和特征在这些年间不停的变化,以及完全可以预料到的在未来的必然变化,我们觉得,对云原生的理解似乎也只能回到云原生的出发点,而不是如何具体实现。 Cloud Native 是道,Service Mesh 是术 那在这么一个云原生理解的背景下,我们再来介绍一下对云原生应用的设想,也就是云原生应用应该是什么样子。 在云原生之前,底层平台负责向上提供基本运行资源。而应用需要满足业务需求和非业务需求,为了更好的代码复用,通用型好的非业务需求的实现往往会以类库和开发框架的方式提供,另外在 SOA/ 微服务时代部分功能会以后端服务的方式存在,这样在应用中就被简化为对其客户端的调用代码。 然后应用将这些功能,连同自身的业务实现代码,一起打包

Fusing conduits with multiple inputs

╄→尐↘猪︶ㄣ 提交于 2019-11-29 19:38:46
问题 I am trying to create a conduit that can consume multiple input streams. I need to be able to await on one or the other of the input streams in no particular order (e.g., not alternating) making zip useless. There is nothing parallel or non-deterministic going on here: I await on one stream or the other. I want to be able to write code similar to the following (where awaitA and awaitB await on the first or second input stream respectively): do _ <- awaitA x <- awaitA y <- awaitB yield (x,y) _

What are the pros and cons of Enumerators vs. Conduits vs. Pipes?

╄→尐↘猪︶ㄣ 提交于 2019-11-28 16:06:05
I'd like to hear from someone with a deeper understanding than myself what the fundamental differences are between Enumerators , Conduits , and Pipes as well as the key benefits and drawbacks. Some discussion's already ongoing but it'd be nice to have a high-level overview. Philip JF Enumerators/Iteratees as an abstraction were invented by Oleg Kiselyov. They provide a clean way of doing IO with predictable (low) resource requirements. The current Enumerators package is pretty close to Oleg's original work. Conduits were created for the Yesod web framework. My understanding is that they were