Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Spacer - iThome Serverless All-Star
Search
Poga Po
March 29, 2018
Technology
320
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Spacer - iThome Serverless All-Star
Poga Po
March 29, 2018
Transcript
27 slides
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
More Decks by Poga Po
See All by Poga Po
civic-notebook
poga
0
130
Fuzz Testing and go-fuzz
poga
0
420
everything is log
poga
12
2k
g0v intro
poga
0
130
新聞產生器
poga
0
750
RESTful API @ Front-End Developers Taiwan 2014-04-23
poga
3
250
Dependency Management in Go
poga
4
690
Redis: based on real story
poga
16
1.4k
Other Decks in Technology
See All in Technology
アラートを見直していたら営業組織への理解にちょっとだけ繋がった話
z63d
1
190
Shared Signals Framework 仕様解説
oidfj
0
420
地域社会の実情からITエンジニアの社会貢献を考える
sms_tech
0
120
E2E Test というハーネス — AI時代の自動テスト民主化
daishukojima
0
250
DevOps Agentにあらゆるセキュリティインシデントのトリアージを任せた件
jirtosterone
1
130
あの日、見つかっていなかったらどうなっていたか
kazzpapa3
2
150
Intro to Kiro (One agent, every surface) | Kiro: Zero to Hero 01
inariku
PRO
2
120
Microsoft Entra Kerberos で実現するクラウド デバイス管理
tamaiyutaro
2
670
Kiro 入門 (1 つのエージェントを、どの画面からでも) | 目指せ Kiro マスター 01
inariku
PRO
6
1.7k
Kiro IDE 入門 (画面の各部から、頼み方、任せ方、戻し方まで) | 目指せ Kiro マスター 02
inariku
PRO
4
220
サボる子はいねぇがー!AgentCoreハーネスの脆弱性に学ぶ、エージェントの入力バリデーション
iwamot
PRO
5
330
高品質と高スピードを支える品質のシフトレフトのアプローチ
goyoki
2
630
Featured
See All Featured
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
660
How to Talk to Developers About Accessibility
jct
2
620
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.3k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.2k
Being A Developer After 40
akosma
PRO
92
590k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
560
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
60k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2.1k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
2
3.8k