Not
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# Serverless all star共同筆記 ###### tags: `Azure` ## DevOps & Serverless 陳正瑋 / 得寬科技DevOps Engineer 社群廣告 https://devopstw.club/ devopsdays 廣告 https://devopsdays.tw/ ### serverless是否真的less * Dev 要注意debug和monitoring的問題 * Ops 要注意latency問題 * Sec 要注意pipeline傳輸安全問題 * Boss 要注意是否真的能省的錢 組織是否適合 康威定律  ## 極速 IT 架構新趨勢:Serverless 王宏仁 / iThome電腦報周刊副總編輯 ### Ithome2018 it趨勢 * Web assembly 主流瀏覽器開始支援 * Kubernets container的管理工具 * 金融Open api 歐洲 開放銀行 * Chatbot 自然語言理解技術成熟 NB iot三大電信業推電信物聯網 KFC ok google廣告 已經改掉了 可口可樂 販賣機  維修 拍照 影像辨識 Vr ar 可口可樂販賣機 販售地點是變動的,可以用手機行動付款,需要計算扣款,於是把計算的function放在serverless,一個月大概3000萬次4500美金,這個量算少的話還算便宜,如果有8000萬次以上,自己架vm或實體server才會便宜,所以後期就不會用了(變貴了) ### 無人機 Serverless skyline * 資安自動化 * 居家安全 * 無人機巡視四周 需要Server影像分析 追蹤都是丟serverless ### 穿戴裝置Abillisense 分辨環境聲音預警,丟serverless運算 * 偵測槍聲 * 呼救聲 Serverless計算iot裝置成本,可以想像bom表中有一個虛擬雲端零件,方便業務人員算成本 ## 設計、開發及部署跨平台的Serverless應用 上官林傑 / 台灣微軟技術傳教士 ### Serverless重點 * 伺服器抽象化 * 事件驅動立即延展 * 錙銖必較 ### 常見的Serveless架構情境 * 即時串流服務 iot senser data * 週期性工作 每15分鐘清除無效資料 * 程式後端服務 使用頻率無法估計 * 對談機器人 使用頻率無法估計 Gartner 2018 top strategic technology trends:event driven ### Azure不限公有雲,可以買一體機裝在私有機 [微軟與在地電信商合作,Azure 公有雲下凡提供在地服務](http://technews.tw/2017/08/30/microsoft-azure-public-cloud-is-on-the-ground-with-the-help-from-local-telecomm/ "Permalink to 微軟與在地電信商合作,Azure 公有雲下凡提供在地服務") ### Serverless 運算的建議 * Function 專注做一件事 * Function 應該冪等 Idempotent * Function 應該儘早結束 [https://Functions.azure.com/try](https://functions.azure.com/try) 沒辦法參加臉部辨識Lab的話可以從這個網址自己體驗 ## Serverless 網站監控 ### 104 呂昭寬 資深架構師 ### Serverless有分成兩大類 * Paas or baas * Function as a serverless ### 專注於業務邏輯 Iaas:Hypervisor和硬體可以透過ec2託管,但還是要管作業系統 ### Serverless取捨 學習成本 * 取代管理成本 * 黑箱和地雷  * 限制 * 最多3分鐘不然會timeout * cpu memory storage * 程式語言的問題 (java要先開jvm之類的,不太適合) ### 第三方工具 更多學習成本,限制,黑箱和地雷 ### Faas的強項 目標選擇 * 可靠性很高,透過internet運行 * 適合中低負載 * 適合排程運行 例如可以用Aws lambda發出請求給網站,網站回200 404 timeout,送給Cloudwatch整理成報表 也可以進一步檢查Domain name解析時間,等候請求時間,tcptls hand shake連線等等 ### Integration test用於監控 如果是本機測試Mocha,就不要啟動server,可以降低成本 ### Puppeteer lambda 使用Serverless啟動瀏覽器的情形 * 堅持不做Server rendwr的spa * 複雜用戶互動 * 依賴於瀏覽器的Api * Test framework 依賴瀏覽器互動 但是Google出了headless chrome,所以puppeteer 2018三月開始不開發了,正在轉移中 ### Take home message * Aws lambda的運行與計費適合用於網站監控 * 四種監控常見的Pattern * 程式 * 命令列 * 測試工具 * 瀏覽器 ## | 13:00 ~ 14:00 | Microsoft & Serverless | ### 早上的架構 手機 > 照片上傳到儲存體 > blob storage (trigger) > 發event給function > function執行 > 呼叫vision(給圖片,回對應的屬性) > 回傳給function > 寫入到storage的table 修正早上的bug,同時有兩張臉的時候,用時間欄位當戳記會fail, 如果需要的運算效能較大,後端會自動auto scale ### AWS alexa架構 用AWS的alexa服務,走aws lambda或https指到某個服務,並把服務傳回的內容唸出來 可以裝 microsoft/azure-functions-runtime 如果有docker或container,微軟也有做img可以把runtime佈署到runtime上 ### nanoserver 可以想像成是輕量級的web server ### stretch iot的server ### azure function 用nodejs開發,可以在本地端debug,做完後再丟到雲端服務上 visual studio code可以有終端機做node.js的debug 測試的話可以用ngrok暫時開一個http/https服務當作endpoint 範例:ngrok https 7071 以前可能叫printf大法、log大法,沒有好的工具的話,在雲端開發可能只能寫一堆log來看,在本地端開發就可以設中斷點檢查問題 ### 鼎新電腦的例子 新使用者註冊> AzureWebAPP(網頁) > 資料進Storage > Azure function >寄信給使用者說收到了 > 同時發slack > 後端人員收到訊息 AzureFunctions和WebAPP包在github自動發布 ### 勤葳國際科技股份有限公司的例子 #### 車聯網 1. 車子的偵測器把RawData送給IoTHub 2. 訊號送給串流分析(stream analytics) 1. 發現異常(例如車主辨識沒通過),就會透過Function即時把車上鎖 2. 依資料類型塞到storage,SQL DB,DocumentDB 3. WebApp再去撈上述的DB,把結果呈現到End-user的手機上 ### Hands-on Lab 之前和其他廠商討論臉部辨識門禁系統,但只停留在PoC (概念性驗證),識別刷卡的人和辨識的人是不是相同的人 會用這個是因為刷卡機不是公司自己開發的(外包廠商開發),如果找外包廠商改又要錢,所以公司內用serverless來做驗證 #### 訓練過程 1. 上傳照片到blob storage 2. APP送出描述資訊給Queue Service (工作排程) 3. Queue有收到新東西,才驅動funtcion做事 4. Function 呼叫Face API 回傳辨識結果 5. Function 收到辨識結果,儲存meta data #### 刷卡門禁系統 1. 上傳照片 2. 驅動 Function 3. Function 呼叫Face API,回傳 4. 儲存辨識結果 #### 常見問題 如果髮型有變、眼鏡、修圖等等容易讓辨識失敗 ## 臉部辨識Lab 教學文件都會放在 https://github.com/ericsk/azure-serverless-hol/blob/master/Labs/FaceIdentificationLab.md 在做debug的時候可以裝一個Postman當作輔助工具 ### 每當有一張新的照片,如何送出去做辨識 identfy 扔一張照片讓他辨識有人 verfy 扔一張照片請他判斷是誰 先上Azure註冊帳號 建立以下資源 * Face API * blob Storage (放照片用) * Cosmos DB * Function APP 今天的案例選windows 或是 linux 沒差 不過目前的linux只有依app service付費 如果要用多少付多少,要選Consumption plan (依使用情況付費),比較省錢 這邊的Storage是用來存程式碼的,建議另外開不要用前面開的(前面的是用來放照片的) ### 資源群組 可以類似資料夾那樣,把所有資源放在同一個群組,做群組權限管理,或是要刪除的時候直接刪除整個群組 ![選資料處理](https://i.imgur.com/EOsPhfX.png) 貼了function.json後,connection要改,但是可以透過function圖形介面 > 整合 去改azure 輸入 輸出,就會連動function自動修改 然後從github上copy index.js的code貼上去 ### 因為index.js有需要用到request 可以用app service 編輯器,開npm去裝 ![開app service的console介面](https://i.imgur.com/60leG5r.png) 範例照片 https://bit.ly/2GnDrPC 人臉識別API參數調整辨識條件 如果常常辨識不到人臉,可能是信心指數調太高 此時可以增加以下參數(選擇性填寫): confidenceThreshold,可以設小一點 0.5 ## OpenFaaS - 快速打造你的 Serverless 平台 王偉任(Weithenn) / 東森購物架構師 實作容器部署 Play with Docker:https://labs.play-with-docker.com/ Play with Kubernetes:https://labs.play-with-k8s.com/ ## Ops as Code using Serverless 黃冠元(Rick) / 91APP技術經理 ### serverless = ops+code ### code * 開發容易 * 架構簡單 * 軟體工程 * 持續部屬 ### ops * 容易配置 * 高可用性 * 可維護 * 低成本 * 安全性 ### 目的:隨時知道服務(系統)的狀況 * 實作:CloudWatch Event Role+Lambda+Slack * 部屬流程:配置JSON,Git版控 * 不用養機器,成本極低 ### 不斷重複使用 1. CloudWatch(Event Source,Scheduler/Config) 2. Lambda(Ops Code) 3. Slack(Receiver) ### 標準化開發流程、工程方法 * Design First 透過討論流程設計,讓Dev和Ops一起開發討論 * 開發 * Lambda容易開發 (自帶版控功能) * 可以Unit Test,使用Docker * Configurable * JSON資料結構,可以人工或是透過程式產生配置檔 * 可以版控,容易交接 * 部屬 * 透過AWS CLI做部屬 * 容易設計與開發 ### Dev & Ops 的協作 * 複雜的邏輯 * Ops開需求 Dev實作 * 走標準化開發流程及需求 * 互動 * Ops懂AWS / Infra * Dev熟悉Programming Language * Dev 收到自 Ops的回饋 ### 新時代技術-Serverless * 沒server須要維護了 * 自然而然就HA了 * Security是天然的 * AWS的Action都可以自動化(as code),像是CloudWatch的配置 * 透過Event-Driven整合AWS其他服務,像是監控Log分析.etc ### 需要面對的問題 * Function相容性、同步與非同步,Exception Handler(DLQ) * 分散式架構,黑盒子 * 如何有效的Trace&Debug,蒐集log,監控 * 怎麼測試? * Config/Key/Credential放哪? * 團隊知道要做這些事?敏捷? * 主管知道這些事情的價值?老闆知道? * 怎麼找到會這些東西的人? ## Angular+Firebase:快速建立最小可行性產品 林承翰(JB) / 華立企業權任課長 //待補完 ## 秒發百萬推播 范建銘 / 工程師 //待補完

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully