作者:毕玄
文章来源:微信公众号HelloJava
"We believe the main reason for the success of low-level virtual machines was that in the early days of cloud computing users wanted to recreate the same computing environment in the cloud that they had on their local computers to simplify porting their workloads to the cloud. That practical need, sensibly enough, took priority over writing new programs solely for the cloud, especially as it was unclear how successful the cloud would be."
这段在讲他们认为为什么在云计算的开始,AWS选择重点推EC2,Google选择重点推GAE,结果最后是AWS大获全胜的原因,GAE的思想从技术上来说确实是很赞的,但从落地路径来看,就像上面这段说的,EC2会是更好的一个落地策略,这个非常值得所有希望推进技术演进的同学们学习。
"In our definition, for a service to be considered serverless, it must scale automatically with no need for explicit provisioning, and be billed based on usage."
这段在讲他们认为能称为serverless的service,必须是自动伸缩的,并且是按实际的使用量来计费的,serverless由于目前就是个思想,关于定义确实一直就很含糊,这个定义是这篇文章里用来评判一个service是不是serverless的标准。
“In the Cloud context, serverful computing is like programming in low-level assembly language whereas serverless computing is like programming in a higher-level language such as Python.”
为了更好的区分serverless和现在的computing,把现在的computing定义为了serverful computing,由于serverful computing需要自己去管理机器资源的各种情况,因此这段形象的在讲serverful computing就像是用low-level的语言写代码,而serverless computing则像用高级语言写,这深刻的揭示了serverless computing在效率层面带来的巨大变化。
"Automated memory management relieves programmers from managing memory resources, whereas serverless computing relieves programmers from managing server resources."
这段和前面讲的low-level语言和higher-level是类似的意思,他们认为serverless computing最重要的把程序员从管理机器资源上解脱出来了,所以可以看到他们认为serverless最重要的还是在机器资源的自动管理上。
"We believe serverless computing represents significant innovation over PaaS and other previous models."
我在Serverless:云时代的软件架构核心思想里的观点同样,serverless思想我觉得是革命性的进步。
"but because VM Provisioning can take many seconds serverless computing providers use elaborate techniques to speed up the creation of function execution environments."
这里讲到了我一直认为IaaS层演进的重点动力,在回顾过去看IaaS的Next这篇文章里写到了,就是serverless使得在vm类型的启动速度上有了更高的要求,这导致了现有的虚拟化技术需要革命性的演进,当然,也就意味着这一层迎来了一轮新的创新机会。
"The resource lifecycle management and multi-tenant bin packing necessary to achieve high utilization are key technical enablers of serverless computing. We note that several recent proposals aim to reduce the overhead of providing multi-tenant isolation by leveraging containers, unikernels, library OSes, or language VMs. For example, Google gVisor, Amazon Firecracker, CloudFlare Workers serverless platform".
这段就是讲上面的虚拟机技术的演进,有基于容器、或unikernels、或library OSes、或语言级VM的各种方案的尝试,Google、Amazon都发布了自己的开源版本的方案,之前业界也还有像Kata等等,这个方向现在这么乱,其实对大家都是好机会,想想当年的vmware。
"Unlike serverless computing, kubernetes is a technology that simplifies management of serverful computing."
这在讲k8s并不是用来实现serverless的,我觉得更准确的应该说serverless的实现会在k8s这种之上再进行封装,使得对上层用户不可见而已。
"One key difference between hosted K8S services and serverless computing is the billing model."
这里在讲他们认为现在一些托管的k8s服务并不能算是serverless computing,原因就是计费模式不一样,这个和这篇文章最开始对serverless computing的定义相关。
"For cloud providers serverless computing promotes business growth, as making the cloud easier to program helps draw in new customers and helps exsiting customers make more use of cloud offerings."
云厂商为什么如此积极的推进serverless computing,这段说的在理。
"Customers benefit from increased programming productivity."
"Cloud users like serverless computing because novices can deploy functions without any understanding of the cloud infrastructure and because experts save development time and stay focused on problems unique to their applications."
如果只是对云厂商有益,显然很难推进,这段在讲对客户和用户的好处,这个观点和前面讲的higher-level语言是一个意思。
后面的篇章中讲到了很多他们认为的serverless computing现在为什么还没有完全流行起来的几个原因(基于的是Real-time video compression, MapReduce, Linear algebra, ML pipelines, Databases这几个场景分析):
- Inadequate storage for fine-grained operations
- Lack of fine-grained cooradination
- Poor performance for standard communication patterns
- Predictable performance
这几个原因的核心重点在讲目前的serverless computing的实现、交互对于状态主要依赖于远程盘的读写等,而这个造成了对performance的各种伤害。
接下去的篇章讲到了他们认为这几个挑战的解法的方向,这个我就不在这里摘取了。
最后摘取下总结里的两小段:
"We expect serverless computing to become simpler to program securely than serverful computing, benefiting from the high level of programming abstraction and the fine-grained isolation of cloud functions."
"Serverless computing will become the default computing paradigm of the Cloud Era, largely replacing serverful computing and thereby bringing closure to the Client-Server Era."
非常赞同这两段总结,尤其是最后的关于Serverless Computing将会成为云时代的默认,在目前如此混乱的情况下,我认为谁能占领这个理念,谁将能在后面几年的云计算战争中取得非常有利的位置。
关于这篇文章总结下我的看法
这篇文章的好处是更清晰的描述了serverless computing,serverless computing的价值我是无比认可的,不过我认为价值绝对不仅仅是这篇文章里说的机器资源自动管理和计费切换为按使用计费而已,我还是之前我自己写的那篇serverless文章里的观点,serverless computing我认为是推进现在PaaS层+IaaS层演进的一个革命性的思想和抓手,但serverless computing要成为主流,一定是因为在线业务的架构可以基于serverless computing来设计,而不仅仅是这篇文章里围绕的类似大数据计算的场景而已,也许是因为Berkeley的几个实验室主要都是在围绕大数据case吧,所以我觉得意义更大的可能是来一篇论文,来写写为什么现在在线业务的架构还不能基于serverless computing,这个对推进ServerlessComputing的发展估计更有帮助。