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
250
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
95
Fuzz Testing and go-fuzz
poga
0
310
everything is log
poga
12
1.8k
g0v intro
poga
0
81
新聞產生器
poga
0
590
RESTful API @ Front-End Developers Taiwan 2014-04-23
poga
3
140
Dependency Management in Go
poga
4
600
Redis: based on real story
poga
16
1.3k
Other Decks in Technology
See All in Technology
スタートアップ1人目QAエンジニアが QAチームを立ち上げ、“個”からチーム、 そして“組織”に成長するまで / How to set up QA team at reiwatravel
mii3king
2
1.5k
SA Night #2 FinatextのSA思想/SA Night #2 Finatext session
satoshiimai
1
140
人はなぜISUCONに夢中になるのか
kakehashi
PRO
6
1.7k
30分でわかる『アジャイルデータモデリング』
hanon52_
9
2.7k
Oracle Cloud Infrastructure:2025年2月度サービス・アップデート
oracle4engineer
PRO
1
210
2/18/25: Java meets AI: Build LLM-Powered Apps with LangChain4j
edeandrea
PRO
0
120
技術的負債解消の取り組みと専門チームのお話 #技術的負債_Findy
bengo4com
1
1.3k
利用終了したドメイン名の最強終活〜観測環境を育てて、分析・供養している件〜 / The Ultimate End-of-Life Preparation for Discontinued Domain Names
nttcom
2
190
表現を育てる
kiyou77
1
210
Goで作って学ぶWebSocket
ryuichi1208
0
630
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
6
57k
なぜ私は自分が使わないサービスを作るのか? / Why would I create a service that I would not use?
aiandrox
0
740
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
30
4.6k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
114
50k
The Cult of Friendly URLs
andyhume
78
6.2k
Raft: Consensus for Rubyists
vanstee
137
6.8k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
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