Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MOPCON 2016- 從 Side project 到 Product

MOPCON 2016- 從 Side project 到 Product

講述一下天眼通到目前為止的演進過程,
以及技術 stack 的選擇。

Tsung Chen Ku

November 07, 2016
Tweet

Other Decks in Programming

Transcript

  1. Side Project • Deadline -> No • Quality -> Depends

    on developer • Business Model -> ֦藨፥牫
  2. Resource Check • Conclusion: • Front-end物螡殼ಋጱ • Back-end • 蟂ᗟ墋㻌

    • 犋አ藲Ӟञ config牏捝Ӟञ෈կ • ग़狶ग़梊 -> 墋㻌梊藮咳ኞጱ秚䨝
  3. Http End Point AWS API Gateway • Create custom api

    on your own • Cache ҁᛔ癲 cloud front҂ • Easy to integrate with AWS lambda
  4. 褖ګ • AWS API Gateway ҁ吚碻҂ጱ Cache 秚ګ犋䄪肦 ก •

    戔ਧ Dynamodb ጱ write牏read capacity • Auto Scaling -> No (ݢ犥蝚螂Ӟ犚॰ದ窸ૣ戔 ਧ҂ • ᰁӞ粁悳牧疰篂蕈
  5. 螂Ⴡ薹ဩ物Disqus • Pros • ౮๜ᘍᰁ • ䷱磪 Scaling 㺔氂 •

    Cons • 虻碘ਂ硯ጱ瑿ො讔簡 • 玞ݷጱۑ胼᩻櫞አ • 蝡ฎ feature 物Disqus ๜蛪ᴠफ Spam ጱ秚ګ
  6. Option 1物Serverless • Pros • 狶螂Ӟ稞 • 奲ݳ磧覄ၚ • We

    Made the Whole Company “Serverless” • ࢴਧ౮๜磧犵
  7. Option 1物Serverless • Cons • 礓犚஠ᥝጱ氃क़戔ਧ盄讔簡ҁWAF 牏獋㮆 Cloud Front ҂

    • Log (Cloud Watch) • Serverless framework 硬粚 • Platform lock-in
  8. Option 2物Firebase • Pros • Config 磧墋㻌 • Tutorial ᩻捷

    • Youtube • ᑏ旉ک Mobile App 墋㻌 • 犋梊ጱ dashboard • ᛔդ殷ᶎ host ๐率
  9. Option 2物Firebase • Cons • Platform lock-in : ۯ盛 Parse

    • 獊෈䲒ᔱ᩻讔簡 • 藯፥ጱ牧Ջ讕眐丆ӥ䨝襑ᥝ Realtime database 牫
  10. Option 3物Golang + Heroku • Golang • Heroku • PaaS

    • git push heroku master 疰蟂ᗟਠ౮
  11. Golang -> Web service • Go is design for building

    modern web. • It’s true, you don’t need framework. • But Ոኞ者磪皃㮆 But
  12. Go: Packages • Routing: github.com/gorilla/mux • Database migration: github.com/mattes/migrate •

    User Identity: golang.org/x/oauth2 • Package Management: govendor • Since Heroku doesn’t support glide
  13. Go: Packages - Issue • Doc: 盄托奞牧֕౯㮉襑ᥝమమ Philosophy • 承ဩӤ犋

    Surprise • 承఺Ӥ Surprise ֦ -> 蕦褾ଶਝ盱ਧ஌
  14. Go: Asset • 蚤 Webpack牏React ጱ碉ݳ物 https://github.com/olebedev/go-starter-kit • Asset Pipeline

    (rails) in Go https://github.com/shaoshing/train • Issue物doc牏customize
  15. Go: Template Ӟ㮆অጱ Template = (፡蚏㬵猟ܻ๜ጱ承ဩ or ፡蚏㬵猟蜍ڊ盅ጱ承ဩ) => (

    Looks like Go or Looks like HTML ) => ( Looks like Go ) Go template ก氥膏 HTML 癩吖ፘ吚य़
  16. Go: Template • `define` -> DSL -> ᩻犋 Go •

    {{.}} -> .? • ℂmapӾᥝ玲独犋ฎፗ矑 someMap["key"] ᘒฎ `index map “key”` ౯፡ׯ磪讨猟 Lisp
  17. Heroku • Why not IaaS ? • 犋మᓕ秚瑊 • Monitor

    • add ons • Scale out • Load balancer • Cache • …
  18. Heroku: Cons • No HTTP/2 • ᥝ傶 Idle time ՞桽

    • 薹ဩ物Lambda + Heroku API • add on 螡䢔ᵑ繸 • 䌘ෝ Ruby 犥क़ጱඪൔ癩䔶Ո఺ • one-off dyno: Database migrate
  19. Option 4物MeteorJS • React + (Redux) • No worry about

    back-end (at least recently) • Deployment + Scaling + : Galaxy • Security: Subs & Pubs