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
38
Integrating Containers Into JavaScript
Lucas Santos
May 14, 2021
Tweet
Share
More Decks by Lucas Santos
See All by Lucas Santos
Escalando globalmente com TypeScript e JavaScript na Klarna
khaosdoctor
0
150
The future of JavaScript
khaosdoctor
0
26
TypeScript tips that could save your life
khaosdoctor
0
84
É hora de falar sobre Deno
khaosdoctor
0
61
JS Software testing for beginners
khaosdoctor
0
34
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
30
The Dark Side of JavaScript
khaosdoctor
0
50
Entendendo o ecossistema de containers
khaosdoctor
1
730
gRPC with Node.js
khaosdoctor
0
640
Other Decks in Technology
See All in Technology
スプリント内で試験を完了させるには?アジャイル・スクラム開発に参加したQAエンジニアの悩みと対策
cybozuinsideout
PRO
1
110
[2024년 3월 세미나] 다른 회사는 퍼널 분석 어떻게 하고 있을까?
datarian
1
1.6k
自己完結な開発者組織を支える プラットフォーム作り
recruitengineers
PRO
2
230
どうやってWebサービスのページ表示速度を1/3にしたか / how-to-reduce-display-speed
pinkumohikan
2
470
AWS IAM の結果整合性を避けるためセッションポリシーを用いてポリシーの動作確認を行う、を解説する
yukihirochiba
0
370
理想の組織も自分たちで作ろう! ―LayerXの「全員採用」を支える文化 / How to create our own ideal team
ar_tama
6
2.1k
Autonomous Database - Dedicated 技術詳細 / adb-d_technical_detail_jp
oracle4engineer
PRO
2
4.9k
Uniting Rust Servers and Clients through OpenAPI
ahl
0
430
App Runnerでパラメーターストアの値を使ってみた
miura55
0
230
layerx-0-to-1-product-development-in-compound-startups
shnjtk
1
510
S3成長記録@Storage-JAWS#3
p0n
0
130
なんでもかんでもコンテナ化すればいいってもんでもないけど なんでもかんでもコンテナ化したらスッキリしました
saramune
1
160
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
14
1.3k
Why Our Code Smells
bkeepers
PRO
330
56k
Typedesign – Prime Four
hannesfritz
36
2k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
11
1.4k
Designing with Data
zakiwarfel
94
4.8k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
319
20k
Code Reviewing Like a Champion
maltzj
512
39k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
24
2.2k
Building a Modern Day E-commerce SEO Strategy
aleyda
15
6.3k
VelocityConf: Rendering Performance Case Studies
addyosmani
319
23k
GitHub's CSS Performance
jonrohan
1023
450k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
101
6.6k
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