LoginSignup
18
2

More than 1 year has passed since last update.

[翻訳] ③Web3+DID+エッジコンピューティング:Brooklyn Zelenka and The Exciting World of Edge Computing

Last updated at Posted at 2022-02-15

piacere です、ご覧いただいてありがとございます :bow:
I'm piacere, the 4 Elixir communities founder/organizer, thank you for reading! :bow:

前回に続きBrooklyn ZelenkaのElixirエッジコンピューティングPodcast「Brooklyn Zelenka and The Exciting World of Edge Computing」の翻訳をお届けしますのPodcast翻訳をお届けします(下図は来年開催のCODE BEAM EUROPE 2022登壇告知より、4名のOUR SPEAKERSの1人です)
image.png

このPodcast翻訳シリーズの目次は下記です

[翻訳] ①Brooklyn Zelenka and The Exciting World of Edge Computing
|> [翻訳] ②Brooklyn Zelenka and The Exciting World of Edge Computing
|> [翻訳] ③Brooklyn Zelenka and The Exciting World of Edge Computing
|> [翻訳] ④Brooklyn Zelenka and The Exciting World of Edge Computing

:xmas-tree::xmas-tree: There are 16 Elixir Advent Calendar, making for a hot winter! :xmas-tree::xmas-tree:

We are experiencing an unprecedented level of excitement ... Please support/subscribe :bow:

https://qiita.com/advent-calendar/2022/elixir
image.png

技術的な公平性をエッジコンピューティングで築く

AH: Something that really struck me about the talk that you gave at ElixirConf in Austin. You had this graphic that had circles around, where cloud infrastructure is, but where people are, and makes me think a lot about tech equity, which is something that is always continuously a problem. How do you think that we as engineers, really anybody in technology can work to create more tech equity, I guess, make it more accessible?

BZ: Yeah. It's a big problem, right? It's hard.

AH: Yeah.

BZ: Sometimes things get solved at different layers. Then whatever any particular teams working on, but the core problem is, if you look at, and I'll just pick on AWS, because they're the biggest, about half, maybe more than half of their Data Centers are in North America and Europe, right? There's one AWS Data Center in Africa, for all of Africa, right? Which is about one and a half billion people and a massively growing market for technologies, smartphones, all that stuff, right? The leapfrogging effects as well, of not having to go through dial up modems, right?

It's like suddenly, everybody's online, all of a sudden, and they have one Data Center, which will take billions of dollars to build a new one, right? only if there's demand for it, right? Like economic demand for hosting things there. What ends up happening is people end up with really terrible service with hundreds of milliseconds of latency at best, with really awful video call quality and really expensive resources, right? You want to store something in, the one server they have in Africa is in Cape Town, right?

There's only so much storage there and it's not, each region has different pricing. That is not the cheapest region. Not that it's secure all, right? But Edge computing has the advantage where you can spread out your resources across geography much more easily. Take it again, right down to the single device, have an ISP put in roughly the size of a fridge, and top with a little bit of storage and a little bit of compute on it, where you can send jobs or a little bit of storage too, which is really close to people and where we're trying to get to. So this is a little bit further out, is in the same way that we've had open source where you can look at other people's code. We want to have open infrastructure, right? What's sometimes called Commons Networks.

Why can't I, when my laptop is sitting idle, provide Compute and Storage for other people? Why can't I just buy or use my old desktop PC and just let it sit there and be connected to think of it almost a data center equivalent of BitTorrent? Where we spread this out across all of our idle devices, that's not 2022 thing, right? That's a little bit further out. But these are all things that we can do to make access to tech more equitable.

AH:オースティンで開催されたElixirConfでの講演で、とても印象的だったことがあります。クラウドインフラがある場所と、人がいる場所を円で囲んだグラフィックがありましたが、技術的公平性について色々と考えさせられました。エンジニアとして、またテクノロジーに携わる誰もが、技術的公平性を高めるために、つまり、よりアクセスしやすくするために、どのように取り組むことができると思いますか?

BZ:はい。これは大きな問題ですね? 難しいです

AH:えぇ

BZ:時には、異なるレイヤーで物事が解決されることもあります。しかし、核となる問題は、AWSを例に挙げると、彼らは最大手なので、データセンターの約半分、おそらく半分以上が北米とヨーロッパにあります。アフリカにはAWSのデータセンターが1つあり、アフリカ全土をカバーしていますね。アフリカの人口は約15億人で、テクノロジーやスマートフォンなどの市場が大きく成長しています。ダイヤルアップモデムを使わなくても良いというリープフロッグ効果(訳注:古い技術を導入すること無く、新技術をいきなり導入することで、既存技術に囚われずスピーディに技術導入できるというプラス効果)もありますよね。

誰もが突然オンラインになったようなものです。そして、データセンターが1つありますが、新しく建てるには何十億ドルもかかりますよね? そこに何かをホスティングしたいという経済的な需要があるような場合のみですけど。結局、数百msecの遅延があるような酷いサービス、酷いビデオ通話品質、高価なリソースが提供されることになるわけです。何かを保存したいと思っても、アフリカにあるサーバは、ケープタウンに1つしか無いんですよね?

そこにあるストレージは限られていますし、地域ごとに価格が異なるのです。そこは一番安い地域ではありません。全てにおいて安全という訳ではないんですね。しかし、エッジコンピューティングには、地理的な制約を受けずにリソースを分散できる利点があります。例えば、ISPが冷蔵庫くらいの大きさのデバイスを設置し、その上に少しのストレージと少しの計算パワーを載せて、そこにジョブやちょっとしたストレージを送ることができます。そしてそのデバイスは利用者の近くにあります。それが私たちが目指しているところです。これは少し先になります。これは、他の人のコードを見ることができるオープンソースと同じやり方です。私たちは、オープンなインフラを持ちたいと考えています。「コモンズ・ネットワーク」と呼ばれることもあります

自分のラップトップがアイドル状態のとき、なぜ他の人にコンピューティングとストレージを提供できないのでしょうか? 古いデスクトップPCを買ったり使ったりして、ただそれに置いておいて、BitTorrentとほぼ同等のデータセンターと考えて接続することはできないのでしょうか? アイドルしてるデバイスの全てに分散させるというのは、2022年のことではないです。それはもう少し先の話です。しかし、これらは全て、技術へのアクセスをより公平にするために、私たちができることなのです

(訳注:下記URLから上記で紹介しているElixirConfの基調講演が見れます)
https://youtu.be/ogOEEKWxevo?t=565
image.png

遠隔手術、自動運転車、機械学習はエッジで動いている

AH: Do you foresee any, I can't think of the word it's not misgivings, hardships, I guess, in gaining the trust of people for something like that? One of the, it's another follow up question. I think, they're related, is like how you gain people's trust for things like you mentioned in your talk, remote surgery or autonomous cars? How do we gain population trust for things that are starting to be created, but are a little faulty and convince them that they are worthy, I guess?

BZ: Yeah, totally. Those are all things that people should be worried about, right? It's very different to have a pair of robotic surgeon hands operating on you from whatever, three to 5000 kilometers away versus somebody in person, right? We've had in person surgeons for a while, right? So this stuff is all quite new, we should be skeptical of things self-driving cars, right? Because there's all kinds of issues with them and not just from the sheer tech side, which there is, but even from the ethical side, and how do we encode trust into those things, right?

So for all of this stuff, we have to get to the point where we've seen it used in practice in small amounts and had it work and then have that expand out. There are some things that I'm skeptical of just in general, there's a lot of attempts right now to do online voting, right? You can see the appeal, it you know, you no longer have to stand on the line. It's much harder to prevent somebody from actually voting, right? The underlying technology totally makes sense, but if there's anything wrong with that, well, right, now we have a really great audit trail with paper and it works.

I don't want to hand over the control of a democracy to something that has a harder way of auditing, right. All of these technologies that are coming up, so keeping it just the edge stuff remote surgery, self-driving cars, a distributed machine learning, right? All of this stuff, local for software, personal data, self-sovereign identity, all of these things, need to be proven out in small, successful applications that then grow. If we can't show them working in on the small scale, then they shouldn't survive, basically or maybe that technology isn't right for that area and maybe it has other uses.

On the remote surgery, one, which is I think, everyone gets interested in this specific case. There have been this has actually been done in practice, I believe, at least once with a human patient, now in China, where the surgeon was in another city. The advantage, obviously is that you don't need to train as many surgeons and the ones you do have, you don't have to fly them around or you have you don't have to bring patients in, right? You can now serve remote populations and all kinds of stuff, right, this is fantastic.

They did this with a 5G Network. It went through fiber cable, to a station up into the air back down. So very straight lines, right? You're not sneaking through fiber in the ground, very straight lines back down and it was under, I can remember the exact numbers, I think, under 20 milliseconds or something latency. Very, very fast, very responsive, and was success in the one trial case, right. So very promising, but very early and especially something like health care, we need to be very careful with it.

AH: Do you know what the type of surgery was before I let Dan take over for a second?

BZ: I can remember it. They've definitely done literally, a minor brain surgery as one does. Yeah. I'm trying to remember if that was the one that I just described in China or not. They've also done some of these with, I think, the euphemism is animal models as well. Human one, I think, was a brain surgery, but I need to double check.

DI: We can leave that as an exercise to the listener. Take a look up, "Crazy Remote Brain Surgery".

AH:このようなことで人々の信頼を得るのに、言葉が思いつきませんが、不安や苦労ではないですが、何か予見していますか? もう1つ別の質問ですが、講演でおっしゃったような遠隔手術や自律走行車などに対して、人々の信頼を得るにはどうしたらいいのでしょうか? つまり、作り始められているが、少し不完全なものに対して、どのように人々の信頼を得て、価値のあるものだと納得させるのでしょう?

BZ:えぇ、まったく。これらは多くの人々が心配すべきことですね。手術支援ロボットを使って3,000~5,000kmも離れたところから手術するのと、実際に人が手術するのとでは、全く違いますよね? 今までは、外科医と直接会ってましたよね? これは全く新しいものです。車の自動運転にも懐疑的であるべきなんです。技術的な面だけでなく、倫理的な面でも、どのように信頼を組み込むのかなど、様々な問題があるからです

このようなものは全て、実際に少し使ってみて、それが上手くいってから、それを広げていく必要があります。私は懐疑的なのですが、オンライン投票のような試みもありますよね? 魅力的なのは、列に並ぶ必要が無いことです。誰かの投票を阻止するのは、かなり難しいでしょう? 基礎となる技術には、概ね道理にかなっていて、それで何か問題があるとすれば、そうですね、今は紙で本当に素晴らしい監査証跡があり、それが機能していることです

監査が困難なものに民主主義の主導権を渡したくないんです。これから出てくるテクノロジーは、遠隔手術、自動運転車、分散型機械学習など、エッジなものばかりですよね? ソフトウェア、個人データ、自己主権的なアイデンティティなど、こうしたものはすべて、小規模なアプリケーションで実証され、成功した後に成長しなければなりません。もし、小規模で上手くいかないのであれば、基本的に生き残ることはできないし、その技術はその分野には向いておらず、他の用途があるかも知れません

遠隔手術についてですが、1つは、誰もがこの特定のケースに興味を持つことだと思います。少なくとも一度、人間の患者さんで実際に中国で行われたことがあるのですが、外科医は別の都市にいました。利点は、明らかに、多くの外科医を訓練する必要が無いこと、そして、外科医がいても、飛行機で移動したり、患者を呼び寄せたりする必要が無いことですかね? 遠隔地の住民やあらゆるものにサービスを提供ることができます。これは素晴らしいことです

彼らは5Gネットワークでこれを実現しました。光ファイバーケーブルを通ってステーションへ行き、上空へ行き、戻ってきます。かなり直線的でしょう? 地中のファイバーをこっそり通すわけではなく、非常に直線的な導線で、遅延は20 msecか、それ以下だったと思います。かなり高速で、反応も良く、1つの試験ケースで成功しました。このように凄く有望ではありますが、かなり初期の段階であり、特にヘルスケアのような分野では、とても慎重に扱う必要があります

AH:ちょっとDanに代わってもらう前に、手術の種類をご存知ですか?

BZ:覚えていますよ。彼らは間違いなく、文字通り、小さな脳外科手術を行っています。それが今説明した中国での手術だったかどうか、思い出そうとしているんです。また、婉曲表現ですが、動物モデル(訳注:ヒトの疾患と同じもしくは似た疾患をもつ動物)でも行われたことがあるようです。人間の場合は、脳の手術だったと思うのですが、もう一度確認する必要があります

DI:それはリスナーの皆さんへの課題として残しておきましょう。「Crazy Remote Brain Surgery」で調べてみてください

(訳注:下記URLが上記で課題とされている事例だと思います)

Haskellについて感じること

DI: So to bring back to some maybe some language specifics, we're curious about Haskell. I think those who know Haskell, seem to love Haskell. Those who don't know, Haskell maybe love the idea of Haskell. How do you feel about Haskell?

BZ: I really like Haskell. I mean, I wrote the Witchcraft suite of libraries in Elixir, which is essentially porting a lot of the ideas from Haskell into Elixir. Our CLI Tool and back-end at Fission are written in Haskell. I'm a fan and I think it has a bit of an aura around it of like, I know, scary monad thing, right? Yeah. There's no way around it. There's a learning curve, that's not actually that different from rust. I've been picking up rust more and more recently. They feel actually shockingly similar as languages. Things that I like about Haskell are it's obviously very, very functional. It has the best concurrency story that I've seen in any language, just blows everything else out of the water. The type system makes it very easy to prototype in and think about things in both small chunks, but also in the large.

So doing refactors, for example, is essentially a non-issue. The type system will lead you around and in the same way that if anybody's had experience with Elm and it can be very helpful in suggesting. This is broken over here, that's broken over there, that's very helpful. There's an old adage about a language that if it compiles, it just works, and that has been my experience, right. Especially very, very early on, when it was just me or me and one other person, it was the secret weapon to stay really just super productive when you're doing a lot of heavy lifting code.

Then all the other stuff that comes nicely with functional programming, right. You get this really nice clear separation of concerns, the type system also makes it very easy to track that separation and how you can then take these separate pieces and snap them back together again. Yeah. But again, it does have this learning curve. The learning resources are getting a lot better. I've had to train a couple people as they've started at Fission, who didn't have the previous background, and they've been successful with it, because the main problem is, historically that there weren't any good books or there was nobody really to ask. That's much easier when you have a guide or nowadays a lot more learning resources online.

DI:さて、言語に関する話に戻りますが、私達はHaskellに興味を持っています。Haskellを知っている人は、Haskellが好きなようですね。Haskellを知らない人は、たぶんHaskellのアイデアが好きなんだと思います。Haskellについてどう感じますか?

BZ:私はHaskellが本当に好きです。私が書いた「Witchcraft」というライブラリ群はElixirで書いたのですが、これは本質的にHaskellのアイデアの多くをElixirに移植したものなんです。Fission のCLIツールやバックエンドはHaskellで書かれています。私はHaskellのファンなんですが、Haskellには「怖いモナド」みたいなオーラがあるじゃないですか? それを回避する方法はありません。学習曲線としては、Rustとそれほど変わりません。私は最近、Rustを手に取ることが多くなっています。言語としてはショッキングなほど似ているように感じます。Haskellの好きなところは、明らかにとても機能的なところです。Haskellは、私がこれまで見たどの言語よりも優れた同時並行性を持っていて、他の全てを圧倒しています。型システムのおかげで、プロトタイプを作成するのがとても簡単で、小さな塊でも、大きな塊でも、どうとでもなります

そのため、たとえばリファクタリングを行うことは基本的に問題ではありません。型システムが導いてくれますし、Elmを使ったことがある方はご存知のようにコードサジェスチョンにとても役立ちます。ここが壊れている、あそこが壊れているなど、非常に参考になります。言語についての古い格言に、「コンパイルが通れば動く」というものがありますが、私の経験もそれでしたね。特に、ごく初期のころ、私ともう一人しかいなかった頃は、重いコードをたくさん書いているときに、凄く生産的な状態を維持するための秘密兵器だったんです

その他にも、関数型プログラミングに付随するさまざまなものがありますね。懸念事項を明確に分離し、型システムによってその分離を追跡するのも非常に簡単で、分離された部分をどのように取り出して再び結合させるか、ということも可能です。ただ、やはり学習曲線があります。学習リソースはかなり改善してきています。Fissionで働き始めたとき、それまでの経歴を持たない人たちをトレーニングしなければなりませんでしたが、彼らは上手くやっています。主な問題は、歴史的に良い本が無かったり、本当に聞ける人がいなかったりすることでした。しかし、ガイドブックがあれば、また、最近ではオンラインで学習できるリソースがたくさんあるのでずっと簡単です

(訳注:下記URLは上記で紹介されているWitchcraftの紹介をしている登壇資料ページです)
https://www.elixir.london/Elixir-LDN-2017/brooklyn-zelenka
image.png

Elixirコミュニティと分散システム、WebAssembly

DI: So the theme for this season is the Impact of Elixir. So as you're working in Haskell or TypeScript for your browser based work, how do you see Elixir influencing what you're doing or is there a place for Elixir in your tech stack currently?

BZ: Yeah. Definitely on the backhand side of things, essentially everyone at Fission, I'm not sure if almost everyone at Fission, when I think about it, has some Elixir background. Again, the distributed systems side of things, there's so many people who are already thinking about, how this works? Thinking about the problems in the right way, realizing that the locality of your data matters and that freeing it from that is very important, and how to keep your data stateless and passed around, right?

One of the things I hope came across in the keynote in Austin, was that, because this community has the experience with distributed systems, that is an excellent fit both the existing packages and the experience that we have. And the way that Elixir makes you think about problems is a really, really nice fit for this area. There's definitely some things that would have made it easier for us to adopt for what we're doing at Fission. So, I know that there's some efforts to having a WebAssembly back end for Elixir.

Doesn't exist yet in a really production form and that might require some changes to Elixir the Language, right? We'll see how that evolves. But there's really nothing putting on my programming straight hat, right? There's really nothing that says that you can't do that, you might lose some of the fault tolerance guarantees, because you're no longer running inside of a single VM. I think, WebAssembly is going to be extremely important in the next five years at minimum, and that, things like that will really, really help with that adoption for those use cases, which is not just WebAssembly, the old saying about this is, is neither web nor assembly, so people are running it on servers, they're running on desktops, right? It's just everywhere and so that would really, really help.

Especially, because the actor model in the way that it looks or thinks is a really nice fit for the web, because the web is a distributed system, Right? Years ago, I used to teach Elixir, like corporate classes for teams that were hoping to adopt it, right. I would often use the analogy of, it's like having each of your processes its own REST server, right? It's now extended to absolutely everything in your language. Thinking about things in that granular way, is super, super helpful when doing things with distributed systems or especially edge in particular.

DI: Yeah.

DI:そうそう、今シーズンのテーマは「Elixirの衝撃」です。HaskellやTypeScriptでブラウザベースの仕事をしている皆さんは、Elixirが自分の仕事にどのような影響を及ぼしているでしょうか?また、現在の技術スタックにElixirの居場所はありますか?

BZ:そうですね。Fissionの社員は全員、いや、ほぼ全員がElixirのバックグラウンドを持っています。繰り返しになりますが、分散システムの分野では、すでに多くの人が「これはどう動くのか」ということを考えていて、データの局所性が重要で、そこから解放することが非常に重要であることを認識し、データをステートレスに保ち、受け渡すか … といった問題を正しい方法で考えていますよね?

オースティンの基調講演で私が感じたことの1つは、このコミュニティは分散システムの経験を持っているので、既存のパッケージと私たちの経験の両方が見事に合致しているということです。また、Elixirの問題解決の手法は、この分野にとてもよくマッチしています。Fissionでやっていることには、もっと簡単に導入できるものがあるはずです。そう、ElixirのバックエンドにWebAssemblyを使おうという動きがあるのは知っています

まだ本当に生産的な形では存在しないので、言語であるElixirを変更する必要があるかもしれませんね? それがどうなるかはこれからです。でも、プログラミングの素養を身に付けることはできないんですよね。でも「できない」ということは無いんです。単一のVM内で実行しなくなったので、フォールトトレランスの保証が無くなるかもしれません。WebAssemblyは、少なくとも今後5年間は、非常に重要になると思いますし、そのようなユースケースへの採用は、WebAssemblyだけでなく昔から言われているようにWebでもアセンブリでも無く、人々はサーバでもデスクトップでも実行しますよね? だから、サーバでもデスクトップでも、あらゆるところで実行されています

特に、アクターモデルの見た目や考え方は、Webにとても適しています。Webは分散システムですからね。数年前、私はElixirを採用しようとしているチームに対して、企業向け研修のような形で教えていたことがありました。そのときによく使ったのが、「各プロセスに専用のRESTサーバを持たせるようなもの」という例えです。それが今、言語内のあらゆるものに拡張されています。このように粒度の細かい視点で物事を考えることは、分散システムや特にエッジを扱う際にとても役に立ちます

DI:なるほど

- Translator's impression : 訳者の感想 -

(English version)

Tele-surgery, self-driving cars, distributed machine learning, etc. are already running on the edge-centered ...

Brooklyn Zelenka warns us that we're on the verge of a world that will soon become uncontrollable if we don't demonstrate it in small-scale applications.

I feel that this is a warning against habituation, a very important caveat that is often overlooked in favor of convenience.

The case of China, where brain surgery was performed remotely through a 5G network, shows the potential for high-tech convenience and low latency to transform work and life in a way that we cannot experience in Japan, but at the same time, I think it is important to take a cautious stance from an ethical perspective as mentioned above.

In particular, we may be too defenseless against a situation where the market capitalization of a company exceeds the national budget of a country, something that happened in science fiction a long time ago.

We also learned about the interface between Elixir and Haskell, Rust, the type system, WebAssembly as a backend for Elixir, and many other fun things for programmers!

By the way, the next article with more programming languages will be release on February 16

PS: I'm talking about Elixir and Haskell at the Functional Programming Conference in Japan 2020, if you'd like to check it out below!

(日本語バージョン)

遠隔手術、自動運転車、分散型機械学習などが、すでにエッジ中心で動いている …

気付けばそういう世の中になっていて、でもそのスタート地点は、小規模なアプリケーションで地道な実証をしなければ、すぐアンコントローラブルに陥る点にBrooklyn Zelenkaは警鐘を鳴らしています

これは、人の「慣れ」に対する戒めでもあり、つい便利だと見逃されてしまう、非常に重要な注意点だと感じます

5Gネットワークを通して、脳外科手術が遠隔で行われたという中国の事例は、日本では体感できないような、ハイテクによる利便性の確立や低レイテンシがもたらす仕事や生活を変貌させる可能性と同時に、上記したような倫理的な観点と慎重なスタンスも大事になってくると思いました

特に、1企業の時価総額が一国の国家予算を超えてくるような、一昔前のSFのような出来事が、目の前で起きている状況に対し、私達は、あまりに無防備なのかも知れません

そして、ElixirとHaskellの接点や、Rustのこと、型システム、ElixirのバックエンドとしてのWebAssembly等、プログラマには楽しい内容も、たくさん出てきましたね

ちなみに、もっとプログラミング言語が飛び交う次回コラムは、2/16に公開です :information_desk_person:

p.s.私もElixirとHaskellについて登壇したスライドがあるので、良ければご覧ください

このPodcast翻訳シリーズ全体は、以下の通りです

[翻訳] ①Brooklyn Zelenka and The Exciting World of Edge Computing
|> [翻訳] ②Brooklyn Zelenka and The Exciting World of Edge Computing
|> [翻訳] ③Brooklyn Zelenka and The Exciting World of Edge Computing
|> [翻訳] ④Brooklyn Zelenka and The Exciting World of Edge Computing

Elixirコミュニティのご紹介

1. ElixirImp : A place to LOVE the buds in Elixir (Elixir実装の芽を愛でる場)
2. fukuoka.ex : Fukuoka local Elixir Community (福岡Elixirコミュニティ)
3. kokura.ex : Kokura local Elixir Community (小倉Elixirコミュニティ)

4. LiveView JP : A place to mob-program in LiveView, LiveBook+Nx+Axon, and elixir-desktop

5. Neos.ex : A place to connecting Elixir and NeosVR to create a new world

p.s.このコラムが、面白かったり、役に立ったら…

image.pngimage.png にて、どうぞ応援よろしくお願いします:bow

18
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
18
2