Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Integrating Containers Into JavaScript
Search
Lucas Santos
May 14, 2021
Technology
0
52
Integrating Containers Into JavaScript
Lucas Santos
May 14, 2021
Tweet
Share
More Decks by Lucas Santos
See All by Lucas Santos
The Hitchhiker's Guide for an Amazing API with TypeScript
khaosdoctor
0
74
Escalando globalmente com TypeScript e JavaScript na Klarna
khaosdoctor
0
180
The future of JavaScript
khaosdoctor
0
48
TypeScript tips that could save your life
khaosdoctor
0
150
É hora de falar sobre Deno
khaosdoctor
0
63
JS Software testing for beginners
khaosdoctor
0
54
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
33
The Dark Side of JavaScript
khaosdoctor
0
64
Entendendo o ecossistema de containers
khaosdoctor
1
840
Other Decks in Technology
See All in Technology
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
10XにおけるData Contractの導入について: Data Contract事例共有会
10xinc
7
690
AGIについてChatGPTに聞いてみた
blueb
0
130
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
10
1.3k
DynamoDB でスロットリングが発生したとき_大盛りver/when_throttling_occurs_in_dynamodb_long
emiki
1
450
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.6k
Zennのパフォーマンスモニタリングでやっていること
ryosukeigarashi
0
210
SRE×AIOpsを始めよう!GuardDutyによるお手軽脅威検出
amixedcolor
0
200
マルチプロダクトな開発組織で 「開発生産性」に向き合うために試みたこと / Improving Multi-Product Dev Productivity
sugamasao
1
310
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
160
SDNという名のデータプレーンプログラミングの歴史
ebiken
PRO
2
100
TypeScriptの次なる大進化なるか!? 条件型を返り値とする関数の型推論
uhyo
2
1.7k
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Practical Orchestrator
shlominoach
186
10k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Code Review Best Practice
trishagee
64
17k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
Being A Developer After 40
akosma
87
590k
Making Projects Easy
brettharned
115
5.9k
10 Git Anti Patterns You Should be Aware of
lemiorhan
655
59k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
4 Signs Your Business is Dying
shpigford
180
21k
Transcript
Integrating containers in JavaScript the good, the bad, and the
ugly
cloud advocate_ who am I_
[email protected]
{twitter, facebook, linkedin…}.lsantos.dev
containers are a thing_
it’s easy to control them
if you are human_
what if you’re not?
then we use containerd - High-level runtime (runtime manager) created
by the Open Container Initiative - Powers Docker - Created to be manipulated through code
not so easy for JS devs
Golang predominance
Then I came across this article_
What if I did this using Node.js?
The first attempt sometimes good, mostly bad, but always ugly
use child-process
pros - Super easy - Takes advantage of ctr’s built
in features - Faster implementation - Can be integrated with any external API
so easy that I built this
to the code
cons - heavily dependent on environment - no complete control
over the process - Limited to parsing the string outputs - Error handling is poor - Needs sudo - Input sanitizing
conclusion: we can integrate containers into JS
but I wanted a real integration
The second attempt mostly good, sometimes bad, kinda pretty
containerd was meant to be extended
but you need to know how to do it
None
None
but it is possible
to the code
pros - Proper error handling - Proper return codes -
Allows you full control of the pipeline - Does not need to be in the same machine - Does not require sudo - Native (gRPC module)
cons - Requires a LOT of knowledge in containers -
Sparse documentation both for gRPC and containerd - Harder - Might be a problem to connect to external servers - CRT certificates and so on
Next steps what can we do next?
let’s make this a good tool
Let’s add more knowledge to the Web!
refs_ - github.lsantos.dev/containerd-integration-example - github.lsantos.dev/js-containerd-example - github.lsantos.dev/containerd-js - Mark’s article
bit.ly/containerd-grpc-web These Slides: - slides.lsantos.dev/integrating-containers-into-javascript
thank you_ info.lsantos.dev