Go Time: Golang, Software Engineering - Asim Aslam谈Micro:Go微服务工具包 封面

Asim Aslam谈Micro:Go微服务工具包

Asim Aslam on Micro, the Go Microservice Toolkit

本集简介

阿西姆·阿斯拉姆做客节目,与我们探讨了Micro——一个基于RPC的可插拔库,它为用Go编写微服务提供了基础构建模块。我们还讨论了开源可持续性、微服务和无服务器架构。 参与讨论 Changelog++会员支持我们的工作,更贴近技术本质,并享受无广告体验。立即加入! 赞助商: Linode——我们首选的云服务器。每月仅需5美元即可获得最快速高效的SSD云服务器。使用优惠码changelog2017可享4个月免费服务! Fastly——我们的带宽合作伙伴。Fastly为快速、安全且可扩展的数字体验提供动力。超越传统内容分发网络,体验其强大的边缘云平台。 嘉宾: 阿西姆·阿斯拉姆——GitHub、LinkedIn 埃里克·圣马丁——GitHub、X 卡莉西娅·汤普森——GitHub、LinkedIn、X 布莱恩·凯特尔森——GitHub、X 节目笔记: Micro 博客文章:《使用Go Micro编写微服务》 Micro Slack社区 什么是无服务器计算?(Quora) Serverless Framework——使用AWS Lambda、Azure Functions、Google CloudFunctions等无服务器架构构建Web、移动和物联网应用! Apex——无服务器架构 IBM Bluemix OpenWhisk的源代码 项目与新闻 Go 1.7发布说明 子测试与子基准测试 Go 1.7中的Context Torus:CoreOS专为Kubernetes设计的分布式存储系统 Tom Maiaroto开发的基于AWS服务的分布式无服务器配置工具 自由软件星期五 布莱恩推荐——CoreOS 卡莉西娅推荐——Luis Vinicius Pacheco开发的受Redux启发的Go状态管理库 阿西姆推荐——Postfix 埃里克推荐——VLC 发现遗漏或错误?欢迎提交PR!

双语字幕

仅展示文本字幕,不包含中文音频;想边听边看,请使用 Bayt 播客 App。

Speaker 0

我是阿西姆·阿斯兰,欢迎收听Go Time。

I'm Asim Aslan, and this is Go Time.

Speaker 1

Go Time是一档每周播出的播客,我们将讨论围绕Go编程语言、社区以及其间所有话题的有趣内容。

It's Go Time, a weekly podcast where we discuss interesting topics around the Go programming language, the community, and everything in between.

Speaker 1

如果你目前正在使用Go,或者希望学习Go,那么这档节目非常适合你。

If you currently write Go or aspire to, this is the show for you.

Speaker 1

好了,各位。

Alright, everybody.

Speaker 1

欢迎各位再次收听Go Time的另一期节目。

Welcome back for another episode of Go Time.

Speaker 1

这是第八期节目。

This is episode number eight.

Speaker 1

今天我们有一位特别嘉宾阿西姆·阿斯兰,他将和我们讨论这个框架。

We have a special guest with us today, Asim Aslam, and he's going to talk to us about the framework.

Speaker 1

我们还一如既往地连线了布莱恩·凯特尔森。

And we also have Brian Kettleson on the line, as always.

Speaker 1

你好。

Hello.

Speaker 1

我们还有精彩的卡尔丽萨·卡马斯也在连线中。

And then we have the wonderful Carlissa Campos also on the line.

Speaker 2

很高兴能来这里。

Glad to be here.

Speaker 2

你好。

Hello.

Speaker 1

让我们大家给奥斯汀热烈的欢迎。

And let's give everybody have everybody give Austin a warm welcome.

Speaker 1

如果你愿意,可以先做个简短的自我介绍,讲讲你的背景,然后我们再进入微框架的话题。

And if you could, go ahead and give us a brief introduction, a little bit of history about yourself, and then we'll kind of roll into the whole micro framework.

Speaker 0

当然。

Sure.

Speaker 0

谢谢你们邀请我参加这个节目。

So thanks for having me on the show.

Speaker 0

我非常感激。

I really appreciate it.

Speaker 0

我的背景是,过去十年左右我在伦敦从事各种系统管理员和SRE工程相关的工作。

Basically, my background is I've spent the last kind of ten years in London doing various kind of sysadmin, SRE engineering kind of roles.

Speaker 0

我曾在一家初创公司工作,后来这家公司被谷歌收购,我在谷歌待了一段时间,学习了如何构建大规模系统,从内部见证这一切非常令人兴奋。

Worked at a startup, which later got acquired by Google, spent a bit of time at Google learning how to build systems at scale, which was really exciting to see from the inside.

Speaker 0

那时谷歌云还处于测试阶段。

This was when Google Cloud was still actually in beta.

Speaker 0

然后我在Halo工作,于2013年帮助构建了一个全球微服务平台。

And then I went to work at Halo and help build a global microservices platform back in 2013.

Speaker 0

那时候,这根本还不是什么热门话题。

When, you know, it wasn't really much of a thing.

Speaker 0

当时只有Netflix在谈论这个概念。

Think Netflix was the only one talking about it.

Speaker 0

现在我正在从事一个叫作micro的项目。

And now I'm working on this thing called micro.

Speaker 0

你知道吗,我意识到各家公司内部其实都在做着相同的事情。

You know, I realized everyone was really doing the same thing internally at companies.

Speaker 0

而且,如果有一个社区项目能做同样的事,让我们都能参与贡献、学习和从中受益,那就太好了。

And, you know, it would be nice if there was a community project that was doing the same where we could all contribute and kind of learn and benefit from it.

Speaker 0

基本上,就是做这件事:简化分布式系统的构建与管理。

And basically do this thing of, you know, simplifying, building and managing distributed systems.

Speaker 0

而目前我就在做这个,正在构建它,希望有人愿意使用它。

And, you know, that's really where I am at the moment, just kind of building that and hoping people will want to use it.

Speaker 3

所以当我第一次看到 Micro 时,我觉得最让我印象深刻的是——那是二月,已经过去很久了。

So when I first saw Micro, I think the thing that impressed me most, and this was February, it's been quite a while.

Speaker 3

但最让我印象深刻的是,你所做的设计决策似乎抓住了完成工作所需的一切关键要素。

But the thing that impressed me most was, the design decisions that you've made seem to be, what's the word I'm trying to think of, it encapsulates almost everything you need to get the job done.

Speaker 3

它更像是一个完整的框架,而不仅仅是一个工具包;用 Go 术语来说,Gorilla 工具包是一堆你可以用来构建网站的组件。

And it's more of a full framework than a toolkit And to use frequent go terminology, whereas the Gorilla Toolkit is a bunch of things you can use to build websites.

Speaker 3

但 Micro 相对来说是高度自包含的。

But micro is pretty relatively self contained.

Speaker 3

我真的很喜欢这一点。

And I really enjoy that.

Speaker 3

我认为在微服务中拥有这样一个立场鲜明的框架很不错。

I think it's nice to have a strongly opinionated framework like that in the microservices.

Speaker 0

谢谢。

Thanks.

Speaker 0

我的意思是,措辞总是很难把握。

I mean, I guess the wording is always hard.

Speaker 0

你知道,你可以反复斟酌它应该是什么样子。

Know, you can kind of go back and forth on what it should be.

Speaker 0

但你知道,从在公司内部构建东西的经验来看,一个库是不够的,一个工具包也是不够的。

But, you know, learning from the experiences of building something within a company, a library does not suffice, a toolkit does not suffice.

Speaker 0

我们本质上为公司构建了一个平台即服务或微服务平台即服务。

We essentially built platform as a service or microservices platform as a service for the company.

Speaker 0

这意味着为开发者——我们的客户——提供一切,让他们能够专注于自己需要专注的事情。

That meant providing everything to the developers who are our customers and letting them kind of focus on what they need to focus on.

Speaker 0

所以当我构建这个时,我认真思考了什么是基本的构建模块?

So when I built this, I really thought about what are the fundamental building blocks?

Speaker 0

如果你先以开源的方式构建,你会怎么做?

How would you do it if you built it open source first?

Speaker 0

所以它必须是可插拔的。

So it needs to be pluggable.

Speaker 0

而且,它慢慢演变成了现在这样。

And, you know, it slowly evolved.

Speaker 0

我的意思是,它最初只是 go micro,那个核心项目。

I mean, started as just go micro, the kind of core project.

Speaker 0

而现在它变成了一个更大的东西。

And now it's this bigger thing.

Speaker 0

我现在称之为一个生态系统,试图进一步扩展它,满足每一个需求。

And I'm kind of, I'm calling it an ecosystem and trying to build it really further out and address every requirement.

Speaker 0

但同时也想说,看,它是可插拔的,我们把复杂的事情交给那些专注于这些事情的人和工具。

But also kind of saying, look, it's pluggable, we offload the hard things to, you know, to the people and the tools that are really focused on those things.

Speaker 0

所以服务发现有一个对应的接口。

So service discovery, there's an interface for it.

Speaker 0

但如果你想要一个一致且分布式的解决方案,你可以使用 Consul、etcd 或其他类似工具。

But if you want something that is consistent and distributed, you know, you can use console or etcd or anything like that.

Speaker 0

对于其中的其他所有包也是如此。

It's the same for all the other kind of packages within there.

Speaker 0

之前

Before

Speaker 2

在我们深入讨论 micro 之前,Sam,看起来你一直在专注于 micro。

we geek out on micro, Sam, it seems that you're working exclusively on micro.

Speaker 2

这是真的吗?

Is that true?

Speaker 2

如果是的话,这个项目以及你个人的财务可持续性计划是什么?

And if so, what is the financial sustainability plan for the project and for yourself?

Speaker 0

当然。

Sure.

Speaker 0

没错。

So, that's right.

Speaker 0

我全职做这个。

I'm working on it full time.

Speaker 0

我大概一年前辞去了在Halo的工作,因为我对这个项目非常有信心,想把它做出来。

I basically I quit my job at Halo over a year ago, because I felt so strongly about this and I wanted to build this.

Speaker 0

当时的想法是,去和一些风险投资人谈谈。

And at the time, had the plan was, was talking to some venture capitalists.

Speaker 0

计划是:我要筹集资金,组建团队,然后按照硅谷的方式去干。

The plan was, hey, I'm going to raise this money, build this team, and we're going to go off and do this, you know, the Silicon Valley way.

Speaker 0

但实际上,我们在伦敦,所以没办法那样做。

And actually, were, you know, we were in London, so no, we couldn't do it that way.

Speaker 0

最后,我只好独自一人干。

And I ended up kind of going it alone.

Speaker 0

幸运的是,我有些积蓄,所以能继续坚持下去。

And luckily, had some savings, so I kept going.

Speaker 0

后来,我一位朋友,他以前在Halo工作,现在去了第六租车公司,去那里搭建平台时看到了我在做的事,我们于是达成了一项协议。

And eventually, a friend of mine who, you know, a friend of mine who was at Halo, who's now at sixth, the car rental company, he went there to build a platform and he saw what I was doing and, and we kind of, you know, worked out a deal.

Speaker 0

这家公司实际上在资助这个项目,让我能继续全职投入,这真是太好了。

And, there that company is essentially sponsoring the project so that I can continue to work on this full time, which is really great.

Speaker 2

太酷了。

Very cool.

Speaker 1

是啊。

Yeah.

Speaker 1

我总是很喜欢听到这样的项目:人们能被赞助全职做自己热爱的事,因为我知道很多人对开源项目充满热情。

I always love to hear projects that work that way where people get sponsored to work on them full time because I know a lot of people get really passionate about their open source projects.

Speaker 1

但很多时候,当他们换到新公司,不再获得支持时,这些项目就变成了废弃软件。

And a lot of times they become abandonware when they move on to new places that no longer sponsor.

Speaker 0

这真的很难。

It's really tough.

Speaker 0

我觉得自己非常幸运,因为这位我曾密切合作的朋友去了这家大型企业,他能看清其中的价值,完全理解我的计划,并愿意以这种方式帮助我。

I think I got very, very lucky in the sense that, you know, this friend of mine who I'd worked with closely was going to this large enterprise company and, you know, he could see the value and he knew exactly what I was planning to do and was willing to kind of help out in that way.

Speaker 0

许多构建开源项目的人,尤其是那些大型开源项目,并没有获得同样的好处。

Many people who build open source projects, very, very large open source projects don't get that same benefit.

Speaker 0

看到这种情况真的很难受。

And it's really tough to see that.

Speaker 0

我知道有很多人正在努力解决这个问题,但我们也必须在这方面做得更好。

And I know that there's a lot of people kind of working on ways to fix that, but we definitely need to do better work there as well.

Speaker 3

那么我们来谈谈采用情况。

So let's talk about, adoption.

Speaker 3

你对使用 Micro 部署服务的公司数量或规模有什么了解吗?

Do you have any sense of the, the numbers or scale of companies that have deployed services with Micro?

Speaker 0

我设置了一个用户页面,上面列出了大约四家公司,其中有几家已经上线生产。

So there's I set up a users page, there's about four companies listed there, a couple of which have gone to production.

Speaker 0

你可以在主仓库的维基页面上找到这些信息。

You can find that in the main repository in the wiki.

Speaker 0

还有大约五到六家公司完成了调查,表示他们在未来三到四个月内将进入生产阶段,但我仍在跟进他们,看他们是否愿意公开自己的名称等信息。

There's maybe about five or six other companies who did a survey and said they would be on the way to production in the next three or four months, but I'm still chasing them up to see if they want to publicly name themselves and whatnot.

Speaker 0

所以增长是缓慢而稳健的。

So the growth is slow and nice.

Speaker 0

有趣的是,有一个Slack群组,所有人都加入其中,新的公司或个人会来分享他们的使用经验,而人们在使用它时甚至都不需要我知情。

Think the nice thing is there's this Slack where everyone joins and new companies or individuals from companies come along and, kind of talk about their uses and people are using it without me even knowing.

Speaker 0

不知为何,它在中国发展得特别快,这真的非常令人欣慰。

For some reason, it's really taking off, in China, which is really, really nice to see.

Speaker 0

有人甚至把整个博客翻译成了中文,这真的很酷。

And someone even translated the entire blog into into Chinese, which is really cool.

Speaker 0

在这里,伦敦,我刚会见了一家叫Kazzoop的公司。

And, here in London, I just met with a company called Kazzoop.

Speaker 0

他们基本上发布了第一个包含Micro的职位招聘信息。

And they, have essentially, you know, they've posted the first job listing, including micro.

Speaker 0

对我来说,这非常有意义,有人如此重视它,以至于愿意把它写进招聘启事,说:‘我们正在转向这个框架。’

And that's, you know, for me, that's really profound that someone thinks so much of it, they want to put it in a job listing and kind of say, Hey, we're, we're moving over to this framework.

Speaker 0

而且还会注明我们愿意为做这件事的人支付多少薪酬。

And here's what we're going to pay for someone to do it.

Speaker 0

这真的很酷。

So that's pretty cool.

Speaker 3

他们是在找有十年经验的开发者吗?

Are they looking for a developer with ten years of experience?

Speaker 0

不,他们想找的是懂Go语言、想构建微服务并能做这类事情的人。

No, they're looking for someone who knows Go and wants to build microservices and can kind of do this stuff.

Speaker 0

我觉得微服务最棒的地方在于,这些服务的代码量可能不到一千行。

Think the awesome thing about microservices in general is really you know, these things are maybe less than a thousand lines of code.

Speaker 0

你所构建的东西是非常领域特定的。

It's very domain specific what you're building.

Speaker 0

因此,构建这些东西并不像你想象的那样需要那么多东西,这意味着拥有六个月或一年经验的人完全可以胜任,刚接触Go语言的学习者也可能做到,因为归根结底真正重要的是API,也就是你与该应用程序交互的接口,代码本身并不重要,因为未来你随时可以重写它。

So it doesn't require as much as you think to kind of build that stuff, which means people with, you know, six months experience, a year's experience could really do this stuff, help people learning go for the first time could probably do this, because what really matters is the API at the end of the day, the you know, the interface to that application that you're communicating with, code is irrelevant because you could rewrite that anytime in the future.

Speaker 3

这引出一个有趣的问题。

Well, brings up an interesting question.

Speaker 3

从哲学上讲,你觉得微服务和比微服务更大的系统之间的分界点在哪里?

What do you feel philosophically is the delineation point between a microservice and something that's bigger than a microservice?

Speaker 0

这很难说。

That's a tough one.

Speaker 0

对我来说,我发现,只要我能轻松地记在脑子里,感觉还比较简单,那就是了。

For me, what I've found is, it's whatever I can kind of keep in my head and still feels fairly simple.

Speaker 0

在过去三四年里,我写了大量Go代码,还实际构建过一个微服务平台,我认为对于Go来说,很多时候它确实会落在1000到2000行代码的范围内,你知道,每种语言都有不同的语法,因此最终会对应到一定的行数。

And having written a lot of Go in the last three or four years and actually having built a microservices platform, I'd say a lot of the time it does fall into a 1,000 to 2,000 lines of code thing for Go specifically, you know, every language has a has a different kind of, syntax, therefore it's going to, you know, come down to a certain number of lines.

Speaker 0

对于Go来说,它就是自然地感觉像这样。

For Go, it just, you know, it feels naturally like that.

Speaker 0

但很多时候,你其实心里有数,因为这是一种理念,你一看代码就知道,如果做一件事要花超过一周时间,那它可能就太大了。

But it's, you kind of, you kind of know a lot of the time, because this is a philosophy, you just know from looking at the code, if it takes longer than a week to do something, then you know, it's probably too big.

Speaker 0

如果你在修改某个东西时,需要花很多精力去构建这个心理模型,那你也知道它太大了。

And if, you know, it takes you a lot of work to build that mental model as you're trying to change something, then you also know it's too big.

Speaker 2

这是一个有趣的衡量标准。

That's an interesting measure.

Speaker 2

因为我在想,当你刚开始设计某个东西时,也许你指的就是设计阶段、创建阶段,你能把多少东西记在脑子里。

Because I think, I'm thinking at the beginning when you're designing something, and maybe that's what you mean, like at design time, at the creation time, how much you can hold it in your head.

Speaker 2

因为对我来说,随着时间推移,我越来越熟悉一个代码库——比如我连续两年都在维护这个代码库,我能记住的东西远比前两个月多得多。

Because for me, as time goes by, more and more, and I'm working with a code base, I mean, two years that I work with a code base, I can hold a ton more than what I could in the first two months.

Speaker 0

是的,这确实是个有趣的观点,我认为你说得对,时间越长,你就越能记住更多内容,并在脑海中构建出模型。

Yeah, it's an interesting one of, I think, I mean, I agree in that the longer you go, the more you can kind of remember about it and kind of model in your head.

Speaker 0

但与此同时,如果你暂时离开项目,再回来时,需要多长时间才能重新构建起这个模型呢?

But at the same time, if you leave the project for a little while and come back, how long does it take you to kind of build that model again?

Speaker 0

对我来说,关键在于我是否能将整个模型都保留在脑海中。

For me, it's the case of, kind of, can I hold the entire model in my head?

Speaker 0

我能否非常轻松地在脑海中修改这个模型,然后迅速地将其转化为代码?

Can I make changes to that model in my head in a very, very easy manner, and then put it down in code very, very quickly?

Speaker 0

很多时候,我确实可以,你通常能大致感觉到什么时候它行不通。

A lot of the time, I can, you know, you can kind of generally get a feel for when it's not working.

Speaker 0

我认为,从MVC背景过来的人,比如熟悉Rails之类的人,会习惯这种模块化结构。

I think people coming from an MVC background, you know, rails and whatnot, you get used to the modularity.

Speaker 0

所以你会遇到百万行代码的代码库,但你依然能找到方法在模块化的空间里编写代码。

So you'd have code bases that are a million lines code, and you'd somehow figure out how to code in the modular space.

Speaker 0

但在微服务世界中,我认为你必须完全掌握服务本身的全部范围。

But in the microservices world, I just think you kind of need to have full scope of the service itself.

Speaker 0

很多时候,我们在一两天内就快速开发出服务并将其部署到生产环境,至少我在Halo工作时是这样。

And a lot of the time, you know, we're hacking out services in the space of one or two days and shipping them to production, at least when I was at Halo.

Speaker 0

我认为这没有对错之分,对每个人来说,情况都不同。

And, I would say there's no right or wrong, you know, I think for everyone, it's a different thing.

Speaker 0

你真的得选择适合自己的方式。

And you kind of, you really have to go with what works for you.

Speaker 0

我喜欢这种理念,因为它非常注重权衡。

And that's what I like about the philosophy because it's a lot about trade offs.

Speaker 0

所以,当一个团队聚在一起时,他们会逐渐找到适合彼此的工作方式,以及适合他们的服务数量和代码库规模。

So, you know, I think when a team comes together, there's certain, you know, they kind of figure how they all work and what number of services work for them and what code bases, sizes of code bases work for them.

Speaker 2

我同意。

I agree.

Speaker 2

我觉得你说得非常对。

I think you have a very good point.

Speaker 2

我喜欢这种思维方式。

I like that way of thinking.

Speaker 2

你可能不会在整个团队中完全采用这种方式,这取决于你的团队构成,但你绝对可以把它作为一种补充。

You might not even use exclusively on a team depending on how your team is made up, but you can definitely use it as a compliment.

Speaker 0

是的,对我来说,我现在更关心的问题是,我们已经看到这些现象在组织中上演。

Yeah, I think for me now that the question I'm thinking more about is, you know, we've seen all this kind of stuff play out in organizations.

Speaker 0

我想看看它在开放开发者世界中是如何运作的。

What I want to see is how this works in the open developer world.

Speaker 0

如果我们作为普通开发者协作构建整个产品,使用微服务,这可行吗?我们能在多大程度上实现这一点?

If we were to collaboratively build entire products with microservices just as general developers, would that work and at what scale could we actually achieve that?

Speaker 3

这是一个有趣的概念。

That's an interesting concept.

Speaker 3

我从未想过微服务可以存在于企业之外的场景。

I hadn't thought of microservices outside of something that looks like an enterprise.

Speaker 0

这正是我整个微服务理念的真正方向。

That's where I'm really going with this whole micro thing.

Speaker 0

我长期从事组织方面的工作。

I've done the organization thing for a long time.

Speaker 0

我认为我所开发的工具对组织会有用,但同时,我更感兴趣的是我们开发者群体能共同做些什么。

I think the tools that I build will be relevant to organizations, but at the same time, I'm more interested in what we can collaboratively do as a developer community.

Speaker 0

你知道,GitHub 就是我们共同协作开发库和其他类似项目的绝佳例子。

You know, GitHub is a great example of us collaborating on libraries and things like that.

Speaker 0

但如果我们协作开发微服务呢?

But what if we collaborate on microservices?

Speaker 0

比如,一个人或两个人编写一个微服务,然后另一个人使用它的 API,接着又有人构建另一个微服务,我们就这样持续下去。

So a person, two people write a microservice, then someone else consumes the API, then someone else builds another one and we kind of keep going like that.

Speaker 0

我们到底能构建出什么?

What could we actually build?

Speaker 0

如果我们这样做,就能停止重复构建过去那些老东西,转而开始构建全新的东西,对吧?

And if we do that, then we stop rebuilding the things that we used to build and we can start building new things, right?

Speaker 0

这样,我们就彻底推动了软件开发的进步。

So we kind of shift software development forward entirely.

Speaker 0

我觉得这对我来说非常吸引人。

And I think that's really intriguing to me.

Speaker 1

所以我认为,你想象的更像是Linux的生态,对吧?

So I think, so you're imagining this more like the Linux landscape, right?

Speaker 1

那里有很多小型工具,可以轻松组合在一起。

Where there's lots of small tools that can be combined easily.

Speaker 1

没有人会每次都重新编写这些组件,对吧?

Nobody kind of rewrites each of those pieces every time, right?

Speaker 1

他们只是——

They just-

Speaker 0

没错,正是如此。

Yeah, exactly.

Speaker 0

上一次有人重写grep、ls或cat之类的东西是什么时候?

Like when's the last time someone rewrote grep or LS or cat or something like that.

Speaker 0

一旦它们被构建出来,就永远定型了。

It's like once they're built, they're built.

Speaker 1

不,我觉得这个想法很有趣,但从运维的角度来看,这会是什么样子呢?

No, I think that's an interesting thought, but how does that look from, kind of the operations perspective?

Speaker 1

那么,谁来负责所有这些组件呢?

Like, who's responsible for all of those?

Speaker 1

这些是运行在某个地方、你可以直接使用的微服务,还是你需要下载这些版本并安装到自己系统里的微服务?它们具体是怎么运作的?

Are these microservices that are running out somewhere that you you leverage or are these microservices that you're downloading these versions of and installing How's within your own that look?

Speaker 0

所以,假设我们所有参加通话的人正在共同合作某个项目。

So think, so say all of us here on the call, we were all collaborating on some project.

Speaker 0

如果我们是在做一个个人项目,很多时候人们会去找个托管服务,然后在那里运行一些东西。

Now, how would we do it, If we're building a side project, a lot of the time people will go find some hosting and start running some stuff there.

Speaker 0

但如果我们能把各自不同的 DigitalOcean 资源串联起来,构建一个网络,然后集体在里面运行微服务,会怎么样呢?

But what if we kind of, what if we could string together our disparate digital ocean kind of resources, create a network and then run microservices in there collectively?

Speaker 0

这正是我真正想的。

That's what I'm really thinking.

Speaker 0

我认为这应该是实际为网络做贡献的人们共同承担的责任。

I think it'd be kind of a shared responsibility between the people actually contributing to the network itself.

Speaker 0

我长期以来一直在构建平台即服务,我认为自动化在这方面起着关键作用。

Then I've built platform as a service for a very long time, I think the part of automation really plays in.

Speaker 0

你必须构建自愈的自动化系统,能够应对这类故障。

You have to build you know, self healing, automated systems that can kind of deal with this sort of failure.

Speaker 0

我的意思是,我们讨论的是分布式系统,对吧?

I mean, we're talking about distributed systems, right?

Speaker 0

所以它们必须具备容错性。

So they have to be fault tolerant.

Speaker 0

我认为这与此密切相关,当你启动平台后,所有东西都以服务的形式编写,甚至管理基础设施的服务也是微服务,这非常有趣。

So I think that kind of plays into it and it's really fun and kind of interesting when you get to a point where you bootstrap the platform and then everything is written as a service and even services that manage the kind of the infrastructure are microservices.

Speaker 0

所以我认为,你可以达到这样一个状态:没有任何个人,没有任何真实的人在管理其中任何一部分。

So I think you can kind of get to a place where no individual, no actual human being is managing any of it.

Speaker 0

它实际上是完全自动化的。

It's actually completely automated.

Speaker 3

你有着宏大的梦想。

You've got big dreams.

Speaker 0

我有非常远大的梦想,但我也拥有实现它们的时间。

I have very big dreams, but I also have, you know, the time to do it.

Speaker 0

这就是时间的奢侈。

And that's the luxury of time.

Speaker 0

所以这相当不错。

So that's quite nice.

Speaker 3

从技术角度来看,我欣赏微框架的一点是,你可以通过多种不同的媒介与框架交互。

So from a technical perspective, one of the things I appreciate about the micro framework, is that you can interact with the framework from multiple different media.

Speaker 3

例如,命令行工具、机器人和API本身。

For example, the command line tool, the bot, the API itself.

Speaker 3

设计这样的系统时,背后有哪些考虑?

Designing that, what went into that?

Speaker 3

你们是如何设计服务的,才能让它们如此容易地通过多种不同媒介进行交互?

How did you design the services in a way that made it really easy to interact from so many different media?

Speaker 0

所以我在这一点上有点取巧了,你知道,在Halo,我们已经有了很多这些东西。

So I sort of cheated a little in that, you know, at Halo, we had a lot of these things.

Speaker 0

你知道,我们有一个将HTTP转换为RPC的API。

You know, we had the API that would convert HTTP to RPC.

Speaker 0

我们还有作为微服务的Web应用程序。

We we had, you know, web applications as microservices.

Speaker 0

我们在HipChat中使用了Hubot,这正是我萌生机器人想法的地方。

We had Hubot in HipChat, which is where I kind of got the idea for the bot.

Speaker 0

此外,我们还有一个shell或命令行界面。

And then we also had a shell or a CLI.

Speaker 0

于是我将所有这些想法整合在一起。

And so I just took all those ideas in it.

Speaker 0

我知道,当你在构建这些东西时,必须能够与之交互。

And I kind of knew that, you know, when you're building this stuff, you need to be able to interact with it.

Speaker 0

你还需要从遗留系统的角度能够与之交互。

And you also need to be able to interact with it from a legacy standpoint.

Speaker 0

从可用性的角度来看,如果我有一个命令行界面,就能轻松查看情况并查询信息。

And just a usability standpoint of, Hey, if I have a CLI, it's really easy for me to see what's going on and query things.

Speaker 0

如果我有一个提供HTTP服务的API,那么通过浏览器、curl或其他任何工具与这些服务交互就会变得非常简单。

If I have an API that serves HTTP, it makes it very simple to talk to these things via a browser or curl or anything else.

Speaker 0

当你提供面向公众的API时,显然每个人都希望使用REST或未来类似的协议。

When you're serving public facing APIs, obviously everyone wants rest or something similar in the future.

Speaker 0

我认为一切都应该转向RPC。

Think I want everything to move to RPC.

Speaker 0

我认为这也是gRPC真正的愿景。

And I think that's the really the dream of gRPC as well.

Speaker 0

我认为他们谈论的是移动优先并这样做,但这一切并没有同时发生。

I think they're talking about mobile first and doing that, but it was just that it didn't all happen at once either.

Speaker 0

要知道,它始于命令行,然后是API,接着是Web界面,如此类推。

Know, it started with the command line, then it was the API, then it was the web UI and so on and so forth.

Speaker 0

在进行这类开发时,这一点是需要记住的,对吧?

And that's the thing to remember with any of any of this kind of development, right?

Speaker 0

这是一个缓慢而渐进的过程。

It's a slow kind of progressive thing.

Speaker 0

你不可能一开始就弄清楚所有事情,但这也是一种分层架构,因为你最初只构建所需的核心功能。

You're not going to have everything figured out, but it's also a layered architecture in the sense that you build exactly what you need at first.

Speaker 0

然后不要混淆这个核心部分,而是在其周围构建,并持续在其周围和之上不断扩展。

Then rather than conflating that core thing, build around it and continue to build around it and on top of it.

Speaker 1

现在我们稍微回退一下,谈谈这个框架到底是什么,我觉得我们还没真正梳理过这个框架的功能,比如它为你抽象了哪些东西。

And now backing up a little about what the framework actually is, I don't think we've actually kind of stepped through kind of what the framework does, like what it's abstracting from you.

Speaker 1

我们之前谈到了可插拔组件,但或许我们应该花点时间说明一下这些组件具体是什么,尤其是对那些可能不熟悉分布式系统各个部分的人。

Kind of we talked about pluggable components, but we we should probably take a second to talk about what those pieces are, especially for people who might not be familiar with kind of all the pieces of of of part of a distributed system.

Speaker 0

当然。

Sure.

Speaker 0

这是个很好的观点。

So that's a good point.

Speaker 0

谢谢你提出这一点。

Thanks for raising that.

Speaker 0

所以我先从 micro 开始,它首先是一个工具包,旨在让构建和管理微服务变得更加容易。

So I'll start with micro, the kind of first thing, it's a toolkit that kind of makes it easier to build and manage microservices.

Speaker 0

核心是一个名为 GoMicro 的库,这是一个可插拔的 RPC 框架。

At the core, there's this library called GoMicro, which is a pluggable RPC framework.

Speaker 0

这个核心库为你构建微服务提供了基本功能。

And the idea is that that core library provides you the fundamentals for building microservices.

Speaker 0

当你想到微服务时,它是一种面向服务的架构。

So when you think about microservices, it's this, you know, service oriented architecture kind of thing.

Speaker 0

你会想,那里需要什么?

You think, what do I need there?

Speaker 0

需要某种通信方式。

Need some sort of communication.

Speaker 0

我需要消息编码。

I need message encoding.

Speaker 0

通信可能是同步的,也可能是异步的。

Communication might actually be synchronous and asynchronous.

Speaker 0

我需要能够处理请求。

I need to be able to serve requests.

Speaker 0

我需要能够发出请求。

I need to be able to make requests.

Speaker 0

这些核心功能都得到了解决,除此之外没有别的。

So those things are really addressed at the core and nothing else.

Speaker 0

它只关注这些基本需求,因为其他你可能想到的东西,比如监控、分布式追踪等,其实并不一定是在构建微服务时必需的。

It only addresses those fundamentals because the other things that you think about off monitoring, distribute tracing and things like those, you don't necessarily need those to just build microservices.

Speaker 0

因此,这门课程的重点就是帮助你构建微服务。

So that was really the focus of the course of helping you build microservices.

Speaker 0

然后,正如布莱恩提到的,工具包的外层是入口点。

Then the kind of outer layer of the toolkit, as Brian mentioned, is the entry points.

Speaker 0

有一个命令行界面、一个API、一个网页界面,还有一个提供HTTP接口的边车,它具备Go Micro的所有功能。

There's a CLI, an API, there's a web UI, there's sidecar that provides a HTTP interface that has all the features of Go Micro.

Speaker 0

所以,如果你不想用Go语言编写,而是想用Python、Ruby、JavaScript等语言,你只需通过HTTP接口与之交互,就可以这样使用。

So if you want to write stuff not in Go, like if you want to write in Python, Ruby, JavaScript, whatever, you can just interact with the HTTP interface and kind of use it that way.

Speaker 0

这类似于Netflix的边车工具,他们称之为Prana。

It's similar to Netflix has something called Prana, which is their sidecar.

Speaker 0

Buoyant 有一个名为 Linkerd 的工具。

Buoyant has something called Linkerd.

Speaker 0

所以这些都相当突出。

So these are kind of prominent.

Speaker 0

但没错,核心理念其实是为你提供编写微服务所需的基本要素。

But yeah, the idea is really, you know, providing you the fundamentals for actually writing microservices.

Speaker 0

我认为许多人目前正专注于这一运行时层面。

I think many people are currently addressing that kind of runtime aspect.

Speaker 0

他们说,这是如何运行微服务的。

They're saying, here's how you run microservices.

Speaker 0

这是基础设施方面你需要的工具。

Here's the tools that you need in the infrastructure side.

Speaker 0

但我认为人们仍然在苦苦思索:我究竟该如何编写微服务?

But I think people are still really struggling with, well, how do I actually write microservices?

Speaker 0

比如,有哪些工具支持这一点?

Like where are the tools for those?

Speaker 0

我认为目前在这方面真正可用的工具非常少。

And I think there's very few tools actually around for that.

Speaker 0

我知道Netflix有一套非常优秀的Java工具来实现这一点,但我们在Go语言中却缺少这样的工具。

I know Netflix has a very, very good suite of tools to do it in Java, but we were sort of missing these tools in Go.

Speaker 0

要感谢彼得·博根,他一年前或更早就开始开发GoKit了。

And, credit to Peter Borgen who, you know, a year, or more ago, started work on GoKit.

Speaker 0

大约在同一时间,我也开始开发Go Micro。

And around the same time, I I started work on, Go Micro as well.

Speaker 0

因此,现在开始出现一些有助于解决这个问题的工具。

And so there's some tools now kind of surfacing to help with this.

Speaker 0

但我觉得我们目前主要关注的是开发层面,而其他大公司则更关注如何运行这些服务。

But I think we're really focusing on the development side and companies at large at the moment are, other companies are focusing on how do we run them.

Speaker 1

好的,这实际上引出了一个很有价值的问题,我们Slack频道里有一些人也在问同样的问题。

Okay, so that actually brings up a valid point, and we have some people in the Slack channel who are kind of asking the same thing.

Speaker 1

你会如何比较和对比Micro和GoKit呢?

How would you compare and contrast kind of micro versus GoKit?

Speaker 1

比如,你觉得它们的目标人群是一样的吗?

Like, do you see them targeting different groups of people the same?

Speaker 0

我认为,总的来说,整个社区是一样的,对吧?

I think, you know, I think the community at large is the same, right?

Speaker 0

那些想要用 Go 写东西的人。

People who want to write stuff with Go.

Speaker 0

但与此同时,这也关乎你偏爱哪种方式来构建应用程序。

But at the same time, it's the thing of like, you have a preference to the way in which you're going to build applications.

Speaker 0

所以每个人都会去看各种库和服务,然后想:我喜欢这个,或者我不喜欢这个。

So everyone's going to kind of look at libraries and services and things and go, I like this or I don't like this.

Speaker 0

就像以前该选 MySQL 还是 Postgres 一样,现在也是同样的问题:该选这个库还是那个库?

So in the days of like, should I pick MySQL or Postgres, it's the same kind of thing of like, should I pick this library or that one?

Speaker 0

据我所见,GoKit 的标语是面向微服务或分布式系统的标准库。

And I think GoKit is, from what I see the tagline, it's a standard library for microservices or distribute systems.

Speaker 0

它正在解决许多非常扎实的问题,并且目前有大量开源贡献。

And it's addressing quite a lot of very, very solid things and has huge kind of OSS contributions going on at the moment.

Speaker 0

所以这真的很棒。

So that's really, great.

Speaker 0

从微观层面来看,它解决的同样是那些基础问题,但对我来说,我是基于自己的经验来构建的。

From the micro side, you know, it's addressing the same kind of things, the fundamentals, but for me, I'm building based on my experiences.

Speaker 0

我构建了我在生态系统中没怎么看到的工具。

I'm building the tools that I didn't really see in the ecosystem.

Speaker 0

我喜欢非常简洁的接口。

And I I like very simple, interfaces.

Speaker 0

我喜欢低门槛。

I like a low barrier to entry.

Speaker 0

当我实际编写服务时,我不想关心细节,我希望尽量少的样板代码。

I don't want to care about the details when I'm actually writing services, I want very little boilerplate.

Speaker 0

我需要我所需的所有工具,当我开发微服务时,我希望一切都能齐全。

And I need the entire toolkit I need like, I need, I want everything, you know, when it comes to right running, writing microservices.

Speaker 0

所以我认为它们略有不同,你必须自己去审视它们,看看它们对你有什么好处,因为确实有很多人使用GoKit,他们非常喜欢它,喜欢那些抽象层。

And so I think they kind of differ a little bit and you have to, you know, I think everyone has to look at them themselves and kind of see where the benefits are for them because there are lots of people using GoKit, you know, they really like it, they like those abstractions.

Speaker 0

这确实是一件很棒的事。

And that is, a really great thing.

Speaker 0

选择非常重要。

Think choice is very, very important.

Speaker 1

是的,我觉得你提出了一个很有道理的观点。

Yeah, and I think you bring up a valid point too.

Speaker 1

布赖恩和我在之前的一家雇主公司有过类似的经历,那就是我们实际相识的地方。

Brian and I had kind of a similar situation at a prior employer that both of us worked at, the one we actually met at.

Speaker 1

有很多人热衷于构建这些分布式框架,实现通信、容错和服务发现。

So you have a lot of people who are interested in building these distributed frameworks and making the communication happen and making things fault tolerant and service discovery.

Speaker 1

而另一些人则只是专注于业务相关的功能。

And then you have a lot of people who just work on business related features.

Speaker 1

所以根据我对这两个项目的理解,你的项目似乎更侧重于让开发者只需编写服务,而无需操心让服务之间相互通信的所有细节,从而能够专注于业务逻辑。

So at least from my understanding of the two projects, it seems like yours more targets being able to just write the service and not have to think about all the bits that make the services communicate between each other and allow you to just kind of focus on the business logic.

Speaker 0

你说得非常准确。

I mean, you're dead on.

Speaker 0

你说得对。

You're dead on.

Speaker 0

这正是我们在Halo构建平台时的核心理念,当时每个人都会提到,整个平台团队以及构建这个系统的人的目标是:我们不希望任何人去思考分布式系统。

This was the really, when we built the platform at Halo, the, the thing that everyone would say, and the goal from the entire kind of platform team and those who are building this thing was, we don't want anyone to have to think about distributed systems.

Speaker 0

我们希望他们能够利用这些系统。

We want them to be able to leverage them.

Speaker 0

但你知道,我们毕竟在经营一家公司,对吧?

But you know, everyone is, I mean, we're building a business, right?

Speaker 0

我们需要为业务开发服务,而并不真正关心那些其他的技术细节。

And we need to write services for the business and we don't really care about that kind of other stuff.

Speaker 0

在这里,微服务的目标也是如此。

And in the same way here, micro, that's the goal.

Speaker 0

就像,我不想操心所有那些细节。

Like, you know, I don't, I don't want to have to care about all those details.

Speaker 0

我为什么要去操心呢?我只想写软件。

Why should I, like, I just want to write software.

Speaker 0

我想构建我的服务。

I want to build my services.

Speaker 0

即使如此,当我构建这些东西时,我会想,也许这些内容中的一些东西太底层了。

And even then, like, I think about, you know, as I'm building this stuff, I'm thinking about like, maybe even these things, some of these things are too low level.

Speaker 0

也许我们需要找到一种更上层的方法。

Like maybe we need to find a way to go higher up.

Speaker 0

我认为随着时间的推移,我们会做到的;目前的情况是,当你编写微服务代码时,你最终会关注于:我要调用这个服务,调用那个服务,获取这些数据,进行转换,然后返回。

I think, over time we will, you know, I think at the moment is the thing of, you know, when you're writing code, microservices code, you end up kind of focusing on, well, I'm going to call this service and I'm going to call this service and I'm going to take this data and I'm going to transform it and return it.

Speaker 0

到了某个阶段,你会意识到,我真正关心的是信息本身。

And at a certain point you think, well, what I really care about is like the information.

Speaker 0

我并不真的在意它在哪里,但我需要的是:嘿,给我这个用户的全部地理位置信息。

I don't really care where it is, but I need, it's kind of like, hey, give me all the geolocation information for this user.

Speaker 0

我不关心这些信息分布在多少个不同的服务里,只要把它们给我就行。

I don't care how many different services it's in, just give it to me.

Speaker 0

然后我会把这些信息收集起来,进行转换,再返回给用户。

And then I'll gather this and I'll transform it and pass it back to the user.

Speaker 0

这有点像,如果你想想杰夫·迪恩和桑贾伊·格玛瓦特在谷歌早期开发MapReduce时的做法,对吧?

It's kind of, if you think about what Jeff Dean and Sanjay Gammawat did with kind of MapReduce at Google in the early days, right?

Speaker 0

本质上是一样的。

It's the same thing.

Speaker 0

就是减少你获取真正关心的数据所需做的工作量。

It's like reducing the amount of work you have to do to get that data you really care about.

Speaker 0

所以我认为这就是我们未来的方向。

So I think that's where we're going.

Speaker 1

是的。

Yeah.

Speaker 1

我看过几次文档。

I've looked through the docs a couple of times.

Speaker 1

不幸的是,我还没实际用微服务做过项目,但我觉得它似乎相当包容。

Unfortunately, I haven't actually built anything with micro, but I mean, seemed pretty inclusive.

Speaker 1

我喜欢这样的理念:你可以替换你的消息代理,也可以替换你的服务发现机制。

Like I liked the idea that you could change out your messaging brokers, you could change out your service discovery mechanisms.

Speaker 1

这些都是痛点。

And these are all pain points.

Speaker 1

我们许多构建分布式系统的人,都经历过这样的困扰:比如,我喜欢Zookeeper做这件事,但对另一件事却很讨厌。

Many of us who have built distributed systems have suffered through, like, oh, well, I like Zookeeper for this, but hate it for something else.

Speaker 1

你会经历一系列迭代,不断更换组件,而能够轻松替换这些组件并尝试不同方案,确实很好。

And you kind of go through these iterations where you switch out, And it it's nice to just be able to swap those components out and try different things.

Speaker 1

而且,你知道,你的团队里可能有人擅长支持ActiveMQ之类的,而不是ZeroMQ之类的工具。

And, you know, maybe maybe people on your team know how to support, you know, ActiveMQ or something versus ZeroMQ and things like that.

Speaker 0

是的,我觉得这正是关键所在。

Yeah, I think that was totally the point.

Speaker 0

我想第一个原因是,我们在Halo开发这些内容时,因为赶工期,把所有东西都内置进去了。

I think the first reason was when we built the stuff at Halo, we kind of baked everything in because we're on a deadline.

Speaker 0

当我们考虑开源时,才发现所有东西都被硬编码了,很难剥离出来,而且任何本地开发都需要运行十个不同的服务及其所有依赖才能正常工作。

And then when we thought about open sourcing it, we realized that everything is, you know, kind of hard coded in a way that it makes it difficult to strip it all out and, and doing any kind of local development meant you had to run 10 different things and all their dependencies to make it work.

Speaker 0

我们想开始构建这些东西。

Want to start to build this stuff.

Speaker 0

我知道,我希望它能够插件化。

I knew that, you know, I want it to be pluggable.

Speaker 0

我希望尽量减少启动所需的依赖项数量。

I want it, to minimize the number of dependencies that you needed to get started.

Speaker 0

说到你的观点,每个人都有不同的技能。

And on your point, you know, everyone has different skills.

Speaker 0

每个人喜欢不同的工具,我认为在同时保持相同的软件构建方式的前提下,支持这种多样性很重要。

Everyone, likes different tools, I think it's important to be able to support that while at the same time, you know, kind of using the same way of building software.

Speaker 0

在未来,比如五年后,当我们使用不同的后端技术时,你也希望能够轻松替换这些组件。

And then in the future, you know, in five years from now, when we're using different kind of backend technologies, then you want to be able to swap those out as well.

Speaker 0

最糟糕的情况是,你已经构建了所有这些内容,却依赖于某个服务,然后不得不到处重写代码来实现变更。

The worst thing is when, you know, you've kind of built all these things and you're dependent upon, you know, some service, and then you have to go rewrite your code everywhere to make it happen.

Speaker 0

而使用微插件架构的理念是,你只需要更改插件,在命令行上切换一下,就完成了,你已经替换了整个组件。

And with micro, the idea is all you have to do is change the plugin, switch out on the command line, and that's it, you know, you're kind of done and you've swapped out this entire thing.

Speaker 0

是的,我对此进行了深思熟虑。

And, yeah, you know, I was really thoughtful about it.

Speaker 0

我希望其他人也能对这个做出回应。

And hopefully, my hope is that other people kind of respond to this.

Speaker 0

而且他们也会编写插件,对吧?

And, and they write plugins as well, right?

Speaker 0

所以我希望看到社区贡献一些东西。

So I hope to see some stuff contributed from the community.

Speaker 3

我们的一个听众提了一个问题,这个问题几乎与此相关。

So one of our listeners has a question and it almost relates to that.

Speaker 3

关于你的插件,有多少可以作为组件用于其他可能与微服务无关的项目中?

In terms of your plugins, how many of those can be used as components in other projects that maybe aren't even microservice related?

Speaker 3

你能在无关的项目中重用日志包、服务发现之类的组件吗?

Could you reuse the log package or service discovery or something like that in an unrelated project?

Speaker 0

你完全可以这么做。

You could totally do that.

Speaker 0

它们都是独立的包。

You know, they're all kind of independent packages.

Speaker 0

我认为每个包都可以独立使用。

I think so each package can kind of be used independently.

Speaker 0

在GoMicro的顶层,唯一的问题是有一个引用服务,将所有内容组合在一起。

There's only the thing of kind of at the top level within GoMicro, have this reference to a service that combines everything.

Speaker 0

大部分情况下,如果你想要使用各个独立的部分,是可以的。

For the most part, if you want to use the individual things you can.

Speaker 0

而且我认为这也是一个很大的优势。

And I think that's, you know, great benefit there as well.

Speaker 0

我实际上看到一些人开始使用Go平台的一些组件,也就是更高层次的工具。

I've actually seen some people, you know, kind of start to use pieces of the Go platform, which is the higher level tooling.

Speaker 0

他们正在使用日志指标包或键值存储之类的组件。

And, and, know, they're using the log metrics package or the key value stuff.

Speaker 0

这真的很酷。

It's pretty cool.

Speaker 1

很好。

Great.

Speaker 2

在我们继续之前,我想问问你,阿西姆,人们在哪里可以了解更多关于如何入门的信息?

Before we move on, I wanted to ask you, Asim, where can people find out more in how to get started?

Speaker 2

有教程吗?

Are there tutorials?

Speaker 2

他们去哪里提问?

Where can they go to ask questions?

Speaker 2

你们在Go的Slack上有没有频道?

Do you have a channel here on Go for Slack?

Speaker 2

换句话说,告诉我们人们如何开始并熟练使用Micro。

In other words, tell us how people can get started and get proficient using Micro.

Speaker 0

当然,谢谢你的提问。

Sure, thanks for asking.

Speaker 0

你可以访问网站micro.mu,它会带你到你需要的地方。

So I have, you can go to the website micro.mu, and that'll kind of take you to where you need to go.

Speaker 0

网站上有一个博客,包含入门介绍和如何编写Go微服务的入门指南。

So there's a blog which has, the introduction, it has a getting started guide on how to write Go microservices.

Speaker 0

你可以访问 GitHub 仓库,那里有一个维基,每个包都有文档,解释了各项功能的工作原理。

You can go to the GitHub repository and there's a wiki and there's documents in every single kind of package that explains how things work.

Speaker 0

每个包的 README 都包含一个入门指南,告诉你如何开始使用。

Each of them in the README have a kind of getting started kind of guide and how to start with that.

Speaker 0

我们还有一个专门讨论微服务和分布式系统的 Slack 频道。

And we also have a Slack channel dedicated to kind of microservices and distribute systems in general.

Speaker 0

任何人都可以自行邀请加入,讨论这些内容。

Everyone can kind of self invite and come join that and talk about this stuff.

Speaker 0

我没有在 Gopher 频道中设立一个独立频道的原因是,我知道从长远来看,这不会仅仅局限于 Go 语言。

The reason I didn't actually set up one in the Gopher channel was because I knew that longer term this wasn't going to be solely Go focused.

Speaker 0

我们正处在支持多语言的边缘。

We're actually on the cusp of kind of having multi language support.

Speaker 0

因此,SIX 和其他一些公司已经开发了 Java 和 Scala 的库。

So SIX and some other companies have developed libraries in Java, Scala.

Speaker 0

还有其他人正在独立开发 Rust 版本,我也希望看到 JavaScript 的实现。

Someone else is independently working on Rust, I'm hoping for a JavaScript implementation as well.

展开剩余字幕(还有 278 条)
Speaker 0

我们的目标是将这些项目开源,真正成为一个多语言社区,专注于构建微服务。

The hope is we open source these and we actually become a multi language community and the focus is just on building microservices.

Speaker 1

哦,这太棒了。

Oh, that's great.

Speaker 1

所以我想我们大概还剩十五到二十分钟。

So I think we have probably like fifteen, twenty minutes left.

Speaker 1

我们喜欢邀请嘉宾进行一种轻松的对话,聊聊你们感兴趣的一些有趣项目、新闻和其他话题。

So one of the things we like to do with our guests is just kind of have like a fireside chat where we kind of talk about interesting kind of projects and news and other things that kind of you have an interest in.

Speaker 1

我知道无服务器架构是个大热门,我们之前也稍微提到了一点。

And I know serverless is a big thing, and we kind of touched a little bit on that earlier.

Speaker 3

史上最差的名字。

Worst name ever.

Speaker 1

绝对是。

Ever.

Speaker 2

我完全同意。

I totally agree.

Speaker 1

这比云还糟吗?

Is it worse than the cloud?

Speaker 3

是的。

Yes.

Speaker 3

这比云糟糕得多。

It's far worse than the cloud.

Speaker 3

至少在云的情况下,你知道 somewhere 有东西存在。

At least with the cloud, you know, you've got some concept that there's something somewhere.

Speaker 3

服务器无架构这名字真是该有人为此被枪毙。

Serverless is just somebody should be shot for coming up with that.

Speaker 3

抱歉。

I'm sorry.

Speaker 2

是的。

Yes.

Speaker 2

这完全具有误导性。

It's completely misleading.

Speaker 0

这就是我们要说的地方,我的意思是,这个术语确实有点糟糕。

This is this is where we're gonna I mean, so on the term, yeah, it's kind of the term sucks a little bit.

Speaker 0

我认为你必须超越这个名字和炒作,真正看到它的实际价值,也就是他们想告诉你的东西。

I think you have to look beyond the name and the hype and actually see what the real value is there, like what they're saying to you.

Speaker 0

他们真正想告诉你的意思是:嘿,这是平台即服务的第二次崛起,你不需要再处理基础设施。

What they're really saying to you is, hey, this is the second coming of platform as a service where you don't have to deal with infrastructure.

Speaker 0

而且,只有在需要运行时,这些服务才会运行。

And also things will only run when they need to be run.

Speaker 0

所以成本要低一个数量级。

So the cost is like order of magnitudes less.

Speaker 3

有没有更短的名字来称呼它?

Is there a shorter name for that?

Speaker 0

无服务器。

Serverless.

Speaker 3

我完全能理解你对它的描述,但‘无服务器’听起来实在太荒谬了。

So I can totally get behind your description of it, but serverless just sounds so ridiculous.

Speaker 0

不。

No.

Speaker 0

我想问题在于你无法选择命名,一旦它流行起来,就无法改变了。

I guess the problem is you can't pick the naming, Once it takes off, it takes off.

Speaker 0

我的意思是,你还记得大数据、云计算、DevOps,甚至微服务吧。

I mean, you remember big data and you remember cloud and you remember DevOps and even microservices.

Speaker 0

一旦它成为流行词,你就无能为力了。

It happens and then it becomes the word and then there's nothing you can do.

Speaker 2

所以,阿西姆,你似乎对无服务器这个概念非常精通。

So, Asim, you seem to be very proficient with the concept of serverless.

Speaker 2

你能不能给大家解释一下它到底是什么?

Why don't you tell everybody what it is?

Speaker 2

因为当我们采访特拉维斯·里德时,我不得不去查一下它的定义。

Because when we interviewed Travis Reeder, I had to actually go and look it up.

Speaker 2

我当时觉得要么是我没理解透,要么就是没看出它有什么了不起的,因为在用户和你的代码之间的某个地方,肯定还是有服务器的。

And I didn't feel that I felt that I either wasn't getting it or I didn't see the big deal because there is a server involved somewhere in the diagram between the user and you and your codes.

Speaker 2

那么,这究竟是关于什么的?

So what is it about?

Speaker 2

所以请告诉我们吧。

So please tell us.

Speaker 0

当然。

Sure.

Speaker 0

据我了解,这个概念的核心是事件驱动编程,完全不需要管理服务器,你也不需要自己做任何管理。

So from what I gather, the idea is that it's really about event driven programming and there is no management of servers or anything at all involved and you don't have to manage anything yourself.

Speaker 0

你基本上只需编写一些看起来像函数的代码片段,然后将它们与API网关进行设置和配置。

You basically write snippets of code which look like functions and you set them up and you configure them along with an API gateway.

Speaker 0

API网关会根据发生的事情触发你的函数,或者说是API网关的调用触发了你的函数。

The API gateway essentially triggers your function or the call to the API gateway triggers your function based on something that's happening there.

Speaker 0

然后你的函数会执行,启动一个容器,请求会被传递给你的函数。

Then your function executes, spins up, a container spins up, The request is passed off to your function.

Speaker 0

函数执行完毕后,容器就会关闭,整个过程就结束了。

It executes the container goes away and that's really the end of it.

Speaker 0

而且关键是,你个人不需要运行任何东西。

And the idea is you don't like you personally don't have to run anything.

Speaker 0

这是一个自动化系统,它在某种程度上改变了编程模式,让你更专注于事件驱动编程,而不是其他任何东西。

It's an automated system and it kind of switches the programming model a little bit in the sense that you're focused on event driven programming more so than anything else.

Speaker 0

你可以想象一下,这种模式在数据分析和消费某些类型数据时会很有用。

You can kind of imagine where this would work for analytics and consuming certain kinds of data.

Speaker 0

但人们也在用它来做其他事情,比如,如果你还记得,你有一些个人项目,在运行自己的DigitalOcean节点之类的,每月花20美元,只是为了运行一些网站。

But people are also using it for other things like, so if you recall, if we think about the, you you have side projects and you're running your own digital ocean node or something like that, and you're spending $20 a month on this, and you're only running a bunch of websites.

Speaker 0

他们展示了成本构成,说你可以通过这种无服务器模式将成本降低几个数量级,因为你的容器或代码只有在有人调用时才会执行。

And, they were showing kind of the cost breakdown and they're saying that, you know, you could reduce the cost order orders of magnitude, by using this kind of serverless model so that it's, know, your container or whatever is your code is only executed when someone actually calls it.

Speaker 0

而在其他时候,中间没有任何东西在运行。

Otherwise, there's nothing running in the interim.

Speaker 0

这正是它的核心所在。

And that's really the big thing about it.

Speaker 0

没有任何东西在运行。

There's nothing running.

Speaker 0

只有在被调用时才会运行。

It only runs when something calls it.

Speaker 0

我不确定是否看到它在大规模应用中的情况了。

I'm not sure if I see working at scale yet.

Speaker 0

我的意思是,从组织内部作为整个代码库的全职方案来看,我还没看到一种可行的方式,因为当你为代码编写函数时,可能会陷入一团乱麻。

I mean, in terms of within organizations as a full time thing for their entire code base, yet to see kind of a way of doing that because I think when you're writing, you know, essentially functions for your code, you could end up in a spaghetti mess.

Speaker 0

我认为,各种框架正在涌现,以让这变得简单一些,但到目前为止,它看起来挺有意思的。

And I think, you know, the frameworks are emerging to kind of make this a little bit simpler, but you know, it looks interesting so far.

Speaker 2

所以我在想,从阅读和你所说的来看,我应该把无服务器方法理解为微服务,但不是完整的微服务、API 或应用,而是一个函数。

So I'm thinking, it sounds to me from reading and from what you're saying, that I should be thinking about serverless, the serverless approach as microservices, but instead of full blown microservice, an API or an app, I have a function.

Speaker 2

因此,我需要思考一下:在微服务中,我会如何将我的应用程序拆分为微服务?

So I need to think about, okay, with microservices, would think, how would I split my application into microservices?

Speaker 2

那么现在,我必须思考如何将我的代码拆分成可以以无服务器方式运行的函数?

So now I have to think about how I extract portions of my code into functions that I can then run-in with a serverless approach?

Speaker 0

是的,我的意思是,你应该真正思考的目标是事件驱动架构。

Yeah, I mean, I think the goal is, or the thing you should really think about is it's event driven architectures.

Speaker 0

我认为他们的意思是,一切都是异步的。

I think what they're saying is everything is asynchronous.

Speaker 0

因此,你实际上是在构建基于事件触发的流水线。

And so you're essentially building pipelines where things are triggered based on events.

Speaker 0

而你可能唯一需要同步的操作是在API端,当外部用户通过API网关调用时,流水线才会执行。

And the only synchronous action you may have is on the API side when some outside user is actually calling through an API gateway and then the pipeline kind of executes.

Speaker 0

对我来说,这也是一种构建系统方式上的思维转变。

And is a, even for me personally, it's a shift in thinking in the way of building systems.

Speaker 0

我发现很多前端工程师对这一点非常敏感,因为他们来自JavaScript世界,那里本身就是事件驱动的编程。

I find that a lot of front end engineers are very perceptive to this just because they come from a JavaScript world where it is event driven programming.

Speaker 0

我认为对我们其他人来说,还有很多东西要学习。

I think for the rest of us, have a lot to learn.

Speaker 0

我认为关键是要超越炒作,看到其中确实有一些价值。

I think the thing to take away is to kind of look beyond the hype, see that there is some value there.

Speaker 0

我想说,未来五到六年,70%到80%的前端项目和数据管道都会采用这种模式,仅仅因为其巨大的价值。

I want to say that maybe 70% to 80% of front end projects and data pipelines will be in this kind of model in the next five to six years, just because of the sheer value from it.

Speaker 0

但这还需要一段时间,你知道,亚马逊有自己的版本,谷歌也有自己的版本。

But it's going to be a little while, you know, like Amazon have their own version of this, Google has their own version.

Speaker 0

IBM也有自己的版本。

IBM has their own version.

Speaker 0

所以我们需要一种方法,能够在这所有系统之间协同工作。

So we kind of, we need a way to be able to work across all of these things.

Speaker 1

你觉得这会是开发方式的一次重大转变吗?大多数开发都会采用这种方式吗?

So do you see this as kind of a major shift in development, like most development would be done this way?

Speaker 1

还是你觉得这更多是用于快速原型设计,从商业角度出发,人们只是想尽快把东西上线?

Or do you see this more for almost rapid prototyping, people trying to get things going almost from the business perspective, like you need to get this live?

Speaker 0

我觉得很难说。

I think it's hard to say.

Speaker 0

我的意思是,最初这应该是原型设计,对吧?

I mean, I think initially it's prototyping, right?

Speaker 0

就像大多数新趋势或新系统的出现方式一样。

It's like it's the way most kind of new trends come about or new systems appear.

Speaker 0

首先,你可以用它来做自己的个人项目。

It's the thing of like, firstly use it for your side projects.

Speaker 0

然后当你在公司启动新项目时,就会自然而然地使用它。

And then when you're doing a new project at your company, you kind of use it then.

Speaker 0

其他公司看到这些成功案例后,就会决定全面采用它,或者迁移到它上面。

And then some other companies see these successes and they decide to build everything using it or they move to it.

Speaker 0

我们会看到一些情况,人们将整个架构迁移到它上面;而在其他情况下,它主要应用于前端、API或数据分析,从而与传统的软件开发方式产生分化。

So we'll see some cases where people move their entire architectures over to it and in other cases where it is primarily focused on front end or the API or data analytics, and we'll have kind of a split off from other kinds of ways of developing software.

Speaker 0

我无法确定它是否会成为构建软件的主导方式,因为我喜欢能够编写一定量的代码。

I can't actually say whether it will be the dominant form of how to build software because I like being able to write a certain amount of code.

Speaker 0

我喜欢以某种特定的方式编写代码。

I like being able to write code a certain way.

Speaker 0

但我认为在许多使用场景中,它会非常有用。

But I think for a lot of use cases, will be quite useful.

Speaker 2

你知道有哪些产品可以支持Go开发者或通用开发者进行无服务器应用开发吗?

What do you know of products that are available to drive those serverless application developments for Go developers or developers in general?

Speaker 0

我认为第一个想到的是 serverless.com。

I think the first one that comes to mind is just serverless.com.

Speaker 0

这个 Serverless 项目似乎是存在时间最长的。

That serverless project is the one that's been around the longest it seems.

Speaker 0

它最初是一个名为 JAWS 的项目,现在已经蓬勃发展起来了。

It started out as a project called JAWS, and now it's kind of taken off.

Speaker 0

它在 GitHub 上获得了超过 8,000 个星标。

It has over 8,000 stars on GitHub.

Speaker 0

另一个是 Apex,它表现得非常出色,并支持多种语言,包括 Go。

The other one is Apex, which seems to be doing really well and has multi language support along with Go.

Speaker 0

甚至 IBM 也开源了他们的服务器端项目,叫做 OpenWhisk,你可以在 GitHub 上找到它。

And, and even, and so even IBM open sourced their actual server list kind of project, it's called OpenWisk, you can find it on GitHub.

Speaker 0

这会让你大致了解这些东西是如何工作的。

And that will kind of give you a breakdown of, you know, how this stuff kind of works.

Speaker 0

你甚至可以自己部署运行。

And you could even spin it up yourself.

Speaker 2

谢谢。

Thank you.

Speaker 2

那是一个很棒的列表。

That was, that's a great list.

Speaker 2

似乎

Seems

Speaker 0

我的意思是,有很多人正在迅速转向这个领域。

it's I mean, there's, there's a lot of people moving on this very fast.

Speaker 0

很多大公司也在迅速跟进。

There's a lot of big companies moving on it very fast.

Speaker 0

如果你看一下,AWS有Lambda,Google有Functions,IBM有OpenWhisk。

If you look at it, AWS has Lambda, Google has functions, IBM has OpenWhisk.

Speaker 0

所以你可以看到他们都迅速参与进来,因为他们看到了其中的价值。

So you can see them all very, very quickly getting involved in this because they see the value in it.

Speaker 1

我认为这 definitely 是我想要关注的事情,因为我对它还有一些保留意见。

I think it's definitely something I wanna I wanna keep my eye on because it I have my reservations about it.

Speaker 1

我觉得其中一些想法真的很酷。

I think there's ideas of it that I think are are really cool.

Speaker 1

而且基于我的经验,我对一些开放性问题感到困惑,比如当你没有走通那条‘黄金路径’时,该如何处理这种情况?

And I think there's there's I have some open ended questions just from kind of experience and, you know, how how situations are handled in in the event like the you don't get the golden path, right?

Speaker 1

并不是所有东西都能正常工作。

Everything doesn't work.

Speaker 1

那你要怎么调试这样的问题呢?

Like, how do you debug something like that?

Speaker 1

但话说回来,比我聪明得多的人正在研究这些问题,所以我很好奇它们会如何发展。

But, yeah, I mean, people way smarter than me are working on these things, so I'm interested to see how it progresses.

Speaker 1

所以,我想我们快到时间了。

So I do wanna kind of I think we're we're getting close to time.

Speaker 1

在节目结束前,我想谈一谈1.7测试版的发布。

So one thing I do wanna touch on before we close out the show is the 1.7 beta release.

Speaker 1

如果我们还有几分钟,我想简单聊聊这个版本新增的一些内容,鼓励大家下载测试版,用它来编译代码,并提交bug报告,特别是针对SSA编译器的。

I'd like to, if we have just a couple of minutes, to kind of just chat about some of the stuff that came as part of that, and encourage people to download the beta and start compiling their code against it and submitting bug reports, especially with the SSA compiler.

Speaker 1

现在已经在里面了。

That's now in it.

Speaker 2

我们来吧。

Let's do it.

Speaker 2

好的。

All right.

Speaker 3

我在其中看到的一个非常有趣的功能是,测试包中支持带有相同设置和清理操作的子测试和子基准测试。

So one of the really interesting things I saw in there was the idea of subtests and sub benchmarks with the same setup and teardown for those, testing packages.

Speaker 3

这真的很棒,因为反复编写这些设置和清理代码很烦人,而能够将它们分离出来在测试中非常方便。

That's really nice because, having to write that setup and teardown code over and over is annoying, and being able to get that broken out is really nice in testing.

Speaker 1

我喜欢这个功能。

I like that one.

Speaker 1

是的。

Yeah.

Speaker 1

我觉得层次化的测试和基准测试也是这样的。

Think that hierarchical tests and the benchmarks are that way too.

Speaker 1

我觉得这会非常酷。

I think that's gonna be really cool.

Speaker 1

他们做了一些性能改进。

They did some performance improvements.

Speaker 1

我认为大部分改进与字符串和字符串转换包、加密包有关,我认为SSA是主要的改进来源。

I think mostly related to the strings and, string conversion packages, crypto packages, the SSA I think is where most of it's coming along.

Speaker 1

我认为他们说大部分内容应该都能正常工作,但如果你在代码中遇到随机错误,或者编译器的行为与预期不符,实际上有一个SSA=0的标志,你可以传给编译器来启用旧的非SSA后端,然后提交问题。

I think they said that most of that stuff should work out, but if you see, like, random errors in your code or things that don't work the way you'd expect them to, with the compiler, there actually is a SSA equals zero flag that you can pass into the compiler to get the old non SSA back end and then submit an issue.

Speaker 1

但我认为

But I think

Speaker 3

请说。

go ahead.

Speaker 3

我只是想说,我们忘了Go 1.7最重要的部分,那就是context包被纳入标准库。

I was just gonna say we forgot the most important piece of Go 1.7, which is the context package making it into standard live.

Speaker 3

我认为没有什么比这更重要的新闻了。

I don't think there's any any bigger news than that.

Speaker 1

哈桑,你在 Micro 中使用了上下文包吗?

Are you leveraging that, Hassan, inside Micro, the context package?

Speaker 0

是的。

Yeah.

Speaker 0

我确实用了。

I am, actually.

Speaker 0

我认为它在构建服务时已经成为一种标配。

I think it's kinda become a staple among building services.

Speaker 0

起初,我并不太理解它。

At first, I didn't really understand it.

Speaker 0

但随着时间推移,它变得越来越合理。

And then over time, it started to make more and more sense.

Speaker 0

所以我认为它被纳入标准库是很有道理的。

And so it's, I think it makes a lot of sense that it's not part of the standard library.

Speaker 1

是的。

Yeah.

Speaker 1

布莱恩和我都非常期待看到这个功能的加入。

Brian and I are both really excited about seeing that come in.

Speaker 1

我们已经使用了一段时间了。

We've been we've been using that for a while.

Speaker 1

有一件事我得承认,我还没有深入研究过这个。

And one of the things that and I have to admit, I haven't looked at this too deeply.

Speaker 1

我其实只是在发行说明里看到过。

I actually only saw it in the release notes.

Speaker 1

看起来现在这个上下文关联了HTTP追踪功能。

Is there's it looks like there's HTTP tracing associated with that context now.

Speaker 1

我挺好奇它是如何工作的。

And I'm kind of interested to see how that works.

Speaker 3

今天早上我查阅了这方面的资料。

So I read up on that this morning.

Speaker 3

这挺有意思的,因为它允许你将函数附加到HTTP客户端的事件上。

It's kind of interesting because it allows you to attach functions to events in an HTTP client.

Speaker 3

所以,如果你正在向一个网站发起客户端请求,可以在DNS解析时触发一个函数。

So if you were making a client request out to a site, you can have a function get fired when DNS is resolved, for example.

Speaker 3

这让你能够很好地调试HTTP客户端中的性能瓶颈,或者帮助你找出生产环境中遇到的问题。

And that allows you to do some really nice debugging in terms of where your performance hits are in your HTP client or help you figure out what issues you're running into in production.

Speaker 3

因此,这看起来对于调试和追踪HTTP连接问题非常有用。

So it looks to be very useful for debugging and tracking down problems with HTTP connections.

Speaker 1

所以这是更偏向回调风格的吗?

So this is more callback style?

Speaker 3

没错。

Correct.

Speaker 3

事件,事件。

Event event.

Speaker 3

我不用‘回调’这个词。

I don't use the word callback.

Speaker 3

我们是Go语言程序员。

We're we're Go programmers.

Speaker 3

所以这些都是你可以利用的事件。

So this is this is, it's all events that you can tap into.

Speaker 1

我觉得你是因为讨厌 Node 才有这种偏见。

I think you're tainted from your dislike of Node.

Speaker 1

天啊。

Oh my god.

Speaker 3

别让我开始说这个。

Don't get me started.

Speaker 3

这可是家庭节目,埃里克。

This is a family show, Eric.

Speaker 1

有一次布赖恩特别生我的气,那是怎么回事来着?

Brian got really mad at me one time because what was it?

Speaker 1

比如我让他装了一个叫 JSONLint 之类的命令行工具,结果它附带了 Node。

Like, a JSONLint or some thing that I had him install as a command line tool, and it came with Node.

Speaker 1

他问我:你认真的吗?

I he's like, are you serious?

Speaker 1

你被开除了。

You're fired.

Speaker 1

你被开除了。

You're fired.

Speaker 1

你让我安装了 Node。

You made me put Node.

Speaker 1

把 Js 放到我的电脑上?

Js on my computer?

Speaker 0

我得说,我某种程度上、勉强地同意布莱恩的观点,就使用方面而言。

I have to I mean, I I somewhat I tentatively somewhat agree with Brian just a little bit from from, like, the, you know, use of it.

Speaker 0

但也许这现在是必要的恶。

But maybe it's a necessary evil now.

Speaker 1

是的,从开发的角度来看,我并不认同它。

Yeah, I haven't bought into it from a development perspective.

Speaker 1

我知道人们喜欢它的理由。

I know people have their reasons for liking it.

Speaker 1

我一直努力保持开放的态度,因为每个人都会使用自己觉得舒服的工具。

And I've always tried to be receptive to, you know, everybody uses what they feel comfortable with.

Speaker 1

所以我尽量不去讨厌,但这确实不是我经常使用的平台或框架,除非是某个东西自带的。

So I try not to hate, but it's it's definitely not, a platform or framework that I've used much outside of, like, it came with something.

Speaker 1

在我们结束节目之前,大家还有什么想聊的吗?

So anything else anybody wants to talk about before we close out the show?

Speaker 1

因为我觉得我们的时间差不多快到了。

Because I think we're getting pretty close on time.

Speaker 1

另外,Asin,如果你在微服务或无服务器方面还有什么想总结的,趁我们快结束时说说吧。

And also, Asin, if there's anything else that you would like to close with about micro or serverless before we kind of wrap up the show.

Speaker 0

没有。

No.

Speaker 0

我的意思是,我们可以挑一些清单上的其他话题聊聊。

I I mean, we we can drop in some other topics that are on the list.

Speaker 0

我觉得有趣的是,CoreOS 刚刚推出了一套分布式存储系统,可以快速聊一聊。

I I think the interesting one was CoreOS just came out with a distributed storage system, which would be kind of cool to talk about quickly.

Speaker 1

是的。

Yeah.

Speaker 1

天蝎座,对吧?

Taurus, right?

Speaker 3

是的。

Yeah.

Speaker 3

我对此非常兴奋,因为

I'm super excited about What

Speaker 0

你觉得呢,布莱恩?

do you think, Brian?

Speaker 3

我对此狂热地兴奋。

I'm crazy excited about it.

Speaker 3

我一直以来对任何编排平台——无论是Kubernetes、Mesos还是其他——最大的问题就是存储。

One of the biggest problems I've always had with any of the orchestration platforms, Kubernetes, Mesos, whatever, is storage.

Speaker 3

当你拥有一个相对较小的集群,又没有某种块存储时,尤其是作为一家不运行在云环境中的企业,你仍然需要一种分布式存储,让每个Pod或每个容器都能访问到。

What do you do with storage when you've got a relatively small cluster and you don't have some sort of block storage, especially as an enterprise where you might not be running in a cloud, you still need that distributive storage that each of your pods or each of your containers can get to.

Speaker 3

所以,我认为这将会非常重大。

So this, I think, is gonna be huge.

Speaker 3

这是过去两年里我在容器领域最期待的事情之一。

It's one of the things I'm most excited about just in the last two years in container space.

Speaker 3

它将会带来巨大的改变。

It's gonna make a huge difference.

Speaker 0

是的。

Yeah.

Speaker 0

我很期待看到他们真正着手解决这个问题。

I'm excited to see them actually tackle this.

Speaker 0

我知道这会是一个很难搞定的难题,但看到他们对 ETCD 所做的工作,我相信他们能够做到。

I know it's gonna be a hard one to get right, but having seen the work that they've done on ETCD, I believe they'll be able to do it.

Speaker 0

而且,有那些具备类似经验的人参与其中,将会非常好。

And in time with people who have that kind of experience is going to be really good.

Speaker 0

正如有人提到的,Hacker News 上的评论并不友好。

As someone mentioned, the hacker news comments weren't very kind.

Speaker 0

我认为我们所有人都需要保持乐观,给予支持。

I think we all kind of, we need to be optimists and we need to be supportive.

Speaker 0

我认为这对整个科技社区来说都是非常有益的。

And I think this is really good for the entire kind of tech community as a whole.

Speaker 0

我觉得每个人都有点想法,嗯,你去写一个分布式存储系统吧。

And I think everyone just, you know, everyone's a little bit like, ah, I want you to write a distributed storage system.

Speaker 0

为什么非得他们来写呢?

Like, why do they have to write it?

Speaker 1

是的。

Yeah.

Speaker 1

我的意思是,每当有这种新东西出现时,人们总会有所抱怨,CoreOS 也常常首当其冲。

I mean, anytime something new like that comes out, people, you know, and CoreOS kinda gets gets a brunt of it too.

Speaker 1

对吧?

Right?

Speaker 1

因为他们正在努力创新,尝试以不同的方式做事。

Because they're they're trying to innovate and they're trying to do things differently.

Speaker 1

而且我觉得他们也因此承受了不少批评,比如那个火箭的事情。

And I think they catch some slack for it too, you know, the whole rocket thing.

Speaker 1

而且,你知道,这些很多东西都非常棒。

And, you know, many of these things are are fantastic.

Speaker 1

他们雇用了许多非常聪明的人。

And they have some really smart people working for them.

Speaker 1

每年他们都在吸纳更多的人才。

It's like every year they're scooping up more people.

Speaker 1

你会觉得,哦,这个人正在做些很酷的事情。

You're like, oh, this person's doing something cool.

Speaker 1

然后你会发现,没错,CoreOS 刚刚把他们挖走了。

And it's like, yep, CoreOS just grabbed them.

Speaker 1

但我很期待看到它的发展如何。

But I'm interested to see how it comes along.

Speaker 1

而且我认为,当人们开始使用它时,他们会逐渐看到它的优势。

And I think that as people start to play with it, I think that they'll start to see kind of its merits.

Speaker 2

我想快速提一件事。

I wanted to mention something super quickly.

Speaker 2

汤姆·梅耶托在Gover的Slack审核频道上请求大家对他的新工具进行评价。

Tom Mayeroto was asking for a review on the reviews channel on Gover's Slack of this tool that he just made.

Speaker 2

这是一个名为DISC FG的年轻项目,其描述称这是一个用于使用AWS服务的分布式无服务器配置工具。

It's a young project called DISC FG, And it's a tool for, the description says, a distributed serverless configuration tool for using AWS services.

Speaker 2

我不会详细讲解,但他README里有一个‘为什么又来一个’的部分,写得非常详尽,你可以在那里了解这个工具的设计初衷,也许大家能帮他审阅一下。

I'm not going to go over it, but he has a Why yet another one section on his README, which is actually quite well documented and you can read there why the reasoning for this tool, and maybe people can help him review it.

Speaker 1

这是开源的,竞争是好事。

It's open source, competition is good.

Speaker 1

这就是原因。

That's why.

Speaker 2

是的。

Yeah.

Speaker 1

好的。

All right.

Speaker 1

还有其他人想谈谈微服务吗?尤其是因为这显然是我们在这里讨论过的最令人兴奋的话题之一。

Did anybody else have anything they want to touch on any closing notes about micro, especially because that's definitely one of the most exciting things we've talked about here.

Speaker 0

我就简单说一句,感谢你邀请我参加这个节目,能够讨论这个话题。

So I'll just say, thanks for having me on the show and being able to talk about this.

Speaker 0

如果你对构建微服务感兴趣,请一定要试试 Micro。

Please do try Micro if you're interested in building microservices.

Speaker 0

欢迎加入我们的 Slack,一起聊聊这个工具。

Come join the Slack and kind of talk about it.

Speaker 0

我正在寻找愿意帮助贡献这个开源项目的人。

And I'm looking for people to help contribute to the OSS kind of project.

Speaker 0

如果你对在 Go 平台上构建更高层次的工具感兴趣,或者想贡献插件,请告诉我。

If you're interested in building the higher level tools in the Go platform, if you want to contribute plugins, let me know.

Speaker 1

现在,我们很高兴你能来到我们的节目。

Right now, we're happy to have you on the show.

Speaker 0

谢谢。

Thanks.

Speaker 1

我们还喜欢做的一件事是简单地进行一次圆桌讨论,轮流谈谈一个我们心怀感激的开源项目,因为我觉得我们都应该更好地表达对开源项目的支持和喜爱。

And one of the things we like to do too is we like to kind of briefly kind of roundtable it and go around and think an open source project we are kind of thankful for just because we need to I think we all need to do a better job showing support and love to open source projects.

Speaker 1

今天,你可以通过提交拉取请求来表达对 Micro 的喜爱。

And today, you get to go show some love to Micro by pull requests.

Speaker 1

对吧?

Right?

Speaker 3

对吧?

Right?

Speaker 3

这是个不错的方式。

That's a good way to go.

Speaker 3

好的。

Alright.

Speaker 3

我先来分享我的免费软件星期五。

I'll I'll start off with my free software Friday.

Speaker 3

谢谢。

Thank you.

Speaker 3

我的感谢对象不仅仅是一个开源项目。

Mine's actually bigger than a single open source project.

Speaker 3

我想感谢CoreOS,感谢他们创新并创造了独特解决方案。

I'd like to thank CoreOS, for innovating and creating really unique solutions.

Speaker 3

特别是CoreOS Linux,可能是我用过的最令人惊叹的Linux发行版之一。

CoreOS Linux specifically is is probably one of the most amazing Linux distributions I've ever played with.

Speaker 3

每次使用它,我都真正享受其中。

And I I truly enjoy using it every time I touch it.

Speaker 3

etcd以及他们做的其他所有项目都非常出色。

Etcd and all of the other projects that they do are fantastic.

Speaker 3

他们的商业模式

And their business model

Speaker 1

面板火箭,没错。

Panel rocket, yeah.

Speaker 3

他们的商业模式在开源方面非常稳健。

Their business model is really solid in terms of open source.

Speaker 3

因此,我非常欣赏这家公司及其在开源方面的理念。

So I appreciate the company and the philosophy behind the company in terms of OSS.

Speaker 3

那你呢,Carlesia?

How about you, Carlesia?

Speaker 2

今天,我们讨论了无状态计算,我的推荐是用于Go的州管理工具,这是一个适用于Go后端应用的工具。

Well, today we talked about stateless computing and my pick is state management for Go, a tool for Go backend applications.

Speaker 2

这是由Luis Venetios开发的一个工具,名为GoDex。

And there's a tool by Luis Venetios, it's called GoDex.

Speaker 2

它也是一个年轻的项目,但前景看起来很有希望。

It's also a young project, but it seems promising.

Speaker 2

如果我需要管理状态,我肯定会使用它。

I would definitely use it if I needed to manage states.

Speaker 1

这很棒。

That's great.

Speaker 1

Assim,你不能作弊,不能说微。

Assim, you can't cheat, you cannot say micro.

Speaker 1

你得用任何人,但别用micro。

You gotta use anybody but micro.

Speaker 0

这不错。

It's good.

Speaker 0

我有一个。

I have one.

Speaker 0

这有点怀旧。

This is a bit of a throwback.

Speaker 0

这要感谢Postfix,这个SMTP服务器。

So this is thanks to Postfix, the SMTP server.

Speaker 0

当年我当系统管理员时,我们经常发批量邮件。

Back in the day when I was a sys admin, we used to do bulk emails.

Speaker 0

我们每小时要发送大约五十万封邮件,我管理过上百个Postfix实例,这使得配置和管理SMTP变得非常容易。

We were sending, you know, half a million emails an hour, and I kind of managed upwards of a 100 instances of post fix and it made it really easy to kind of configure and manage SMTP.

Speaker 0

所以我非常感激这款软件,因为它让我不用使用SendMail。

So I'm really grateful for that piece of software because it meant I didn't have to use SendMail.

Speaker 0

如果有人用过SendMail,你就知道那有多痛苦了。

And if anyone has used SendMail, you know how painful that is.

Speaker 1

SendMail?我从来没用过。

Sendmail, never.

Speaker 1

对我来说,除了VLC之外,我并没有使用什么新的工具,之前已经提到过了。

So for me, I haven't really been using anything new that I haven't already mentioned except VLC.

Speaker 1

我要特别感谢VLC,因为它让我的生活轻松多了。

So I'm gonna I'm gonna give shout out to VLC because that that is making my life easier.

Speaker 1

我绝对不想自己写VLC。

I definitely would not wanna write VLC.

Speaker 1

我觉得我也没那个本事去写它。

I don't think I'm quite qualified for that either.

Speaker 1

好吧。

Alright.

Speaker 1

我想我们已经全部聊完了。

So I think we made it all the way around.

Speaker 1

一定要祝贺各位嘉宾,也非常感谢他们来到节目中,和我们讨论微服务和无服务器架构。

Definitely wanna congratulate the panel, and I definitely ask them for coming on the show and talking to us about micro and serverless.

Speaker 1

时间过得真快。

And time got away really fast.

Speaker 1

真希望我们能有更多时间来讨论这个话题。

Like, I wish we had more time to talk about this.

Speaker 1

我们一定会在节目说明中提供该项目、Slack 以及其他所有能找到 micro 的网络链接。

We will definitely link to the project and the Slack and anywhere else we can find micro on the interwebs for everybody in the show notes.

Speaker 1

它们应该会发布在 Twitter 上。

They should be posted on Twitter.

Speaker 1

如果不是现在,过一会儿就会在 Twitter 上发布,供直播听众和 Slack 频道的用户查看。

If not now, in a little bit, they'll be on Twitter for the live listeners and in the Slack channel.

Speaker 1

欢迎在 Twitter 上关注我们,账号是 Godime FM。

Come find us on Twitter at Godime FM.

Speaker 1

你可以访问 godime.fm 订阅节目,我想第一期节目已经在那儿了。

You can go to godime.fm to subscribe, and I think the first episode is there.

Speaker 1

我们很快会有更多集播出。

We'll have more episodes coming soon.

Speaker 1

我想就这些了。

And I think that's it.

Speaker 1

大家,我有没有漏掉什么?

Am I missing anything, everybody?

Speaker 1

没有?

No?

Speaker 2

你做得很好。

You got it.

Speaker 3

我觉得你做得不错。

I think you did well.

Speaker 0

好的。

Alright.

Speaker 0

太棒了。

That was great.

Speaker 1

谢谢大家。

Thanks, everybody.

Speaker 3

好的。

Alright.

Speaker 3

谢谢大家。

Thanks, everybody.

Speaker 0

这很有趣。

This was fun.

Speaker 0

谢谢。

Thanks.

Speaker 0

谢谢各位。

Thanks, guys.

关于 Bayt 播客

Bayt 提供中文+原文双语音频和字幕,帮助你打破语言障碍,轻松听懂全球优质播客。

继续浏览更多播客