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
Spacer - iThome Serverless All-Star
Search
Poga Po
March 29, 2018
Technology
2
270
Spacer - iThome Serverless All-Star
Poga Po
March 29, 2018
Tweet
Share
More Decks by Poga Po
See All by Poga Po
civic-notebook
poga
0
100
Fuzz Testing and go-fuzz
poga
0
340
everything is log
poga
12
1.8k
g0v intro
poga
0
89
新聞產生器
poga
0
620
RESTful API @ Front-End Developers Taiwan 2014-04-23
poga
3
150
Dependency Management in Go
poga
4
620
Redis: based on real story
poga
16
1.3k
Other Decks in Technology
See All in Technology
毎晩の 負荷試験自動実行による効果
recruitengineers
PRO
5
200
20250718_ITSurf_“Bet AI”を支える文化とコストマネジメント
helosshi
1
170
Deep Security Conference 2025:生成AI時代のセキュリティ監視 /dsc2025-genai-secmon
mizutani
5
3.7k
データ駆動経営の道しるべ:プロダクト開発指標の戦略的活用法
ham0215
2
210
How to Quickly Call American Airlines®️ U.S. Customer Care : Full Guide
flyaahelpguide
0
240
Maintainer Meetupで「生の声」を聞く ~講演だけじゃないKubeCon
logica0419
0
140
ゼロから始めるSREの事業貢献 - 生成AI時代のSRE成長戦略と実践 / Starting SRE from Day One
shinyorke
PRO
0
200
Talk to Someone At Delta Airlines™️ USA Contact Numbers
travelcarecenter
0
170
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
2.7k
20150719_Amazon Nova Canvas Virtual try-onアプリ 作成裏話
riz3f7
0
110
エンジニアリングマネージャー“お悩み相談”パネルセッション
ar_tama
1
500
Transformerを用いたアイテム間の 相互影響を考慮したレコメンドリスト生成
recruitengineers
PRO
2
590
Featured
See All Featured
Music & Morning Musume
bryan
46
6.7k
What's in a price? How to price your products and services
michaelherold
246
12k
Being A Developer After 40
akosma
90
590k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Thoughts on Productivity
jonyablonski
69
4.7k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
108
19k
GitHub's CSS Performance
jonrohan
1031
460k
Why Our Code Smells
bkeepers
PRO
337
57k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
A Tale of Four Properties
chriscoyier
160
23k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.4k
Transcript
Poga. 2018.03.29
Serverless • 以 function 為執行單位 • 按照每個 function 使用的資 源量計費
Hello World (Lua) function (args) return "Hello from Spacer!" end
Code
Calling Other Functions -- by name local flow = require
"flow" flow.call("foo") Code
Calling Other Functions -- by require local foo = require
"foo" foo() Code
Expose Function as Public JSON API with Lua local Gateway
= { -- HTTP Method, Path, Function {"GET", "/hello", "hello"} } Code
Spacer • 流暢的開發體驗:Optimized for programmer happiness • 極低的架設門檻:不依賴 kubernetes、container、VM ◦
Minimal Dependency: nginx & PostgreSQL • Why? Nginx & Lua Code
Serverless is Hard Architecture
“Just a function” - Container • Programming languages • Sandbox
• Performance ◦ Inter-function communication、RPC ◦ Cold Start Architecture
“Just a function” - Scheduling • Manage container images •
Load/Unload containers • Event-Trigger • Kubernetes? Architecture
How Spacer Work • Lua • Nginx (openresty) • Kappa
Architecture Architecture
• Since 1993 • Embeddable Script Language • Lightweight Sandboxed
Lua VM • High-performance (LuaJIT): ◦ Game Engine ◦ CDN ◦ CERN ◦ Super Computers Architecture
• Common Gateway Interface (1993) • Openresty ◦ (nginx +
LuaJIT) ◦ Schedule Lua VM with nginx workers Architecture
Kappa Architecture “Where everything is a stream” • A software
architecture pattern • Append-only immutable event log • Real-time, Streaming Architecture
Spacer: Simple, Solid, Proven Technologies Serverless frameworks Spacer Sandbox/Package Container
Lua Scheduling Kubernetes nginx(openresty) Event ? Kappa architecture Architecture
Spacer is Platform Agnostic Architecture
But Why Serverless? philosophy
「好程式」 • 容易擴充、容易維護的架構 • 永遠是第一個被犧牲 • 「我們另外安排時間重構」- 主管,永遠不會實現 • 開發越來越慢、開發者心情越來越差、產品更新速度大減
◦ 最後失敗 philosophy
「好程式」 • 軟體架構的價值太難量化 • 對非專業人士來說太難理解 philosophy
「好程式」in serverless • 軟體架構 = 營運成本 • 重構 = Cost
Down • 開發者得到更多優化的空間 philosophy
看不懂軟體架構,也看的懂帳單的金額 philosophy
「好產品」 • 軟體開發: ◦ 定 Spec、定時程 ◦ 難以專注在用戶需求上 • 「從一條
SQL 到上線的距離有多遠?」 philosophy
「好產品」in Serverless • 不用分心在架構與技術細節上 ◦ 產品上線速度更快 • 更精細的產品分析: ◦ 一個
User 進來後,平均搜尋了幾次,花了多少成本? ◦ 一個 User 平均帶來的收入是? ◦ 優化: ▪ 流量? ▪ Function 效能? ▪ 轉換率? philosophy
「開發費用」 • 報價 10 萬跟 100 萬的差別在哪? • 維護費? •
Serverless ◦ 成本透明,按照用量收費 ◦ 開發者與客戶目標一致:提高產品價值 philosophy
Spacer: Simplified Serverless philosophy
Serverless: From Engineering to Utility philosophy
Thanks! github.com/poga/spacer