工商銀行 Serverless 函數計算落地實踐

{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"工行雲平臺從2012年開始建設,基於業界領先雲產品和主流開源技術,結合工行特色實現了金融級的自主定製研發和加固。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2012年:基於服務器虛擬化軟件,自主研發和推廣第一代基礎設施雲"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2015年:率先於同業首家基於開源 Docker 容器技術、微服務,建設應用平臺雲,並在生產運用"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2016年:完成互聯網金融高併發場景的試點並順利支撐快捷支付“雙11”大促、雞年賀歲幣雲上發行"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2017年:基於 OpenStack、Ceph 等業界開源技術,建設新一代基礎設施雲;同時基於 Kubernetes,建設企業級應用平臺雲 PaaS 2.0"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2018年:金融生態雲 SaaS 上線,"},{"type":"text","marks":[{"type":"strong"}],"text":"啓動 Serverless1.0 "},{"type":"text","text":"自研工作"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2020年:建設新一代雲平臺建設,包括分行雲,與此同時也是啓動了 "},{"type":"text","marks":[{"type":"strong"}],"text":"Serverless2.0 "},{"type":"text","text":"相關的規劃研究和建設工作。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"工行雲平臺包含如下四個方面的技術特色:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"引入業界領先的雲產品,結合生產運營運維需求進行客戶化定製,構建新一代"},{"type":"text","marks":[{"type":"strong"}],"text":"基礎設施雲"},{"type":"text","text":"。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"通過引入開源容器技術 Docker、容器集羣調度技術 Kubernetes 等,自主研發建設"},{"type":"text","marks":[{"type":"strong"}],"text":"應用平臺雲"},{"type":"text","text":"。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"基於HAProxy、Dubbo、ElasticSearch等建立負載均衡、微服務、全息監控、日誌中心等"},{"type":"text","marks":[{"type":"strong"}],"text":"配套雲生態"},{"type":"text","text":"。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"基於 Kubernetes Operator 機制提供有狀態應用容器化部署及自動化運維能力,實現基礎技術平臺彈性擴縮,落地 ElasticSearch、Zookeeper 等複雜"},{"type":"text","marks":[{"type":"strong"}],"text":"應用容器化部署場景"},{"type":"text","text":"。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"爲什麼要做 Serverless?"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"\""},{"type":"text","marks":[{"type":"strong"}],"text":"不是說 Serverless 發展好就去做,而是考慮了具體業務場景"},{"type":"text","text":"\",周文澤表示。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"一方面工行已建立了較爲完備的雲計算、分佈式架構體系及容器雲平臺,分佈式服務體系建設成效也比較顯著,包括積累了大量可複用的業務服務資產,同時"},{"type":"text","marks":[{"type":"strong"}],"text":"業務量上漲較快,核心業務平均交易量超5億筆每天,大量的業務往線上走,對業務改造壓力非常大,大量的業務需要快速做線上化的處理,針對手機銀行或者其他的PC端都會面臨這樣的情況"},{"type":"text","text":";另一方面,商業銀行競爭加劇及互聯網企業的跨界滲透,要求銀行信息系統必須滿足快速創新需要。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在這個背景下,工行看到了Serverless 的能力,它可以幫助快速上線服務。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Serverless 函數計算的技術優勢總結下來有以下幾個方面:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"開發"},{"type":"text","text":":無需擔心基礎服務的穩定可靠,無需設計複雜的分佈式架構,無需關心灰度限流日誌方案的實現,只需專注業務代碼開發。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"上線"},{"type":"text","text":":無需像普通容器鏡像一樣對應用進行各種部署配置,只需發佈即可運行。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"運維"},{"type":"text","text":":無需關心擴縮容,無需擔心底層資源問題,無需擔心高故障恢復問題。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"這些優勢對業務開發有非常大的吸引力。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"工行函數計算技術選型"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"如前文所述,工行於2018年啓動了 Serverless 1.0 的設計,下圖就是1.0的技術架構,主要是以 Knative+自研事件驅動框架並存爲核心的一套技術方案,提供了以 FaaS+BaaS模式的函數計算能力和 Serverless container 模式。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.infoq.cn\/resource\/image\/df\/ca\/df9329a9acfc61295dd80a2c10a496ca.png","alt":null,"title":"","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":"","fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":"center","origin":null},"content":[{"type":"text","text":"工行 Serverless 1.0平臺技術架構"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Serverless 1.0平臺在工行內部進行了小規模的落地試點工作,實現了動態伸縮過程中應用實例數0到N,N到0的能力。但隨着一些對請求響應要求較高的應用開始接入,Serverless平臺也逐漸出現一些問題,比如實例冷啓動速度較慢,每次發佈都需要製作新的鏡像等等。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/02\/02b471a275deda2186e0a5b9b5f6bbcc.webp","alt":"圖片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":"center","origin":null},"content":[{"type":"text","text":"工行 Serverless 2.0平臺技術架構"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2020年,基於 Serverless 1.0 平臺的不足,設計了2.0函數計算平臺技術架構。2.0平臺在技術選型上"},{"type":"text","marks":[{"type":"strong"}],"text":"以百度天合Stack的函數計算產品爲核心,並與工行現有的分佈式、雲計算技術平臺做對接"},{"type":"text","text":",爲應用提供完整的函數核心引擎、函數管理能力、開發交付能力。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"具體來講,Serverless 2.0平臺主要提供了以下三個方面的能力:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"函數事件觸發器"},{"type":"text","text":":捕獲外部事件,形成統一的事件規範,並將事件指定給函數核心引擎進行執行。 "}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"函數核心引擎"},{"type":"text","text":":函數控制器實現事件解析和事件轉發並實現函數實例的擴縮容,同時實現與行內各系統模塊對接,實現統一的資源供給、監控、報警、運維等能力。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"函數管理"},{"type":"text","text":":爲應用提供 API 和 WEB 服務實現函數編輯和發佈,對接行內 VCDS 持續交付系統實現函數生產交付。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"綜合上述能力,使用百度私有化 Serverless 函數計算產品對接工行存儲、日誌、監控、持續集成等能力,構建了工行函數計算平臺。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/d8\/d82fd45a614ebe8668e673ec86172463.webp","alt":"圖片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"工行函數計算平臺能力視圖"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"上圖是工行函數計算平臺能力視圖,基本上包含了函數計算該有的標準能力:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"管理平臺"},{"type":"text","text":":面向開發運維人員,提供函數管理、發佈管理和日誌監控功能,覆蓋函數的開發測試、運維監控全鏈路環節。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"事件觸發器"},{"type":"text","text":":目前已支持HTTP觸發器、定時觸發器、Kafka觸發器,並將陸續提供對象存儲觸發器、數據庫觸發器和日誌觸發器。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"Runtime 執行環境"},{"type":"text","text":":支持Java(1.8)、Python(3.6)、Node.js(10)三大行內主流運行時,支持自定義運行時(自定義鏡像)。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"平臺底層支撐"},{"type":"text","text":":下沉日誌、監控、報警等應用基礎支撐能力,降低應用開發成本。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"落地場景介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"周文澤認爲 Serverless 目前更適合作爲微服務的一種補充而存在,多用於相對獨立、架構簡單的業務應用。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"他具體介紹了三個主要場景:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"一個是"},{"type":"text","marks":[{"type":"strong"}],"text":"應用後端服務"},{"type":"text","text":",通過在函數內組合多個API、渲染頁面、直接編寫業務邏輯等方式構建後端服務,主要有BFF接口聚合服務、服務端渲染SSR、靜態資源服務三種主流場景,這個多用於小程序、H5等場景;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第二是"},{"type":"text","marks":[{"type":"strong"}],"text":"批量任務"},{"type":"text","text":",主要是批量運行時間不一定,但是運行的時候佔用大量的資源,平時空閒着,這種時候其實這種技術非常適合它,可以通過在函數內編寫批量處理邏輯,再通過函數工作流實現多個批量邏輯的組合,如文本批量覈對;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第三是"},{"type":"text","marks":[{"type":"strong"}],"text":"模型發佈"},{"type":"text","text":",模型一個是用量不穩定,涉及到AI相關的服務,發佈頻率非常高,將訓練好的模型通過函數計算快速發佈提供服務,如RAS智能基金組合回測模型。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"接下來對具體使用的場景實例進行了展開介紹:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/0f\/0f9ad3e425161dcc0dbecffd34c39cb3.webp","alt":"圖片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"首先是"},{"type":"text","marks":[{"type":"strong"}],"text":"接口聚合"},{"type":"text","text":"的內容,以上是手機銀行和 PC 銀行簡單的示意圖,手機銀行和PC端個人網銀需求變動較多,手機端和 PC 端的背後對接了大量子應用,這些子應用邊界較強,每個渠道都有各自的研發運維團隊,實現需求時需要多個團隊相互配合聯動,導致需求響應可能不夠及時。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"跟團隊溝通後,解決思路是部分業務場景使用 Nodejs 構建 BFF 層,基於 Midway.js 構建前後端一體化框架,業務功能使用函數計算進行開發,前端適配 H5\/RN\/Vue 大前端組件,後端適配原生 Node.js、Egg、Koa 等應用開發框架,以 JS 方法調用替換HTTP 調用開發,實現業務開發前後端技術棧、研發模式統一,這樣在開發的時候響應速度得到明顯提高。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/46\/467dd9ac4ac069225863ef2b86c47401.webp","alt":"圖片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第二個是"},{"type":"text","marks":[{"type":"strong"}],"text":"場景服務端渲染"},{"type":"text","text":",本身是不錯的技術,但是存在一個問題,對現有的應用來說如果做服務端渲染的改造成本非常高,要配置一系列負載均衡實現這個能力,想用但是覺得成本太高還是不用了,通過函數計算把這個服務端渲染整個包裝成一個技術的服務,在上面只需要把邏輯寫完之後把函數發佈出去就可以渲染這個能力,不用部署額外負載均衡的能力,不用關心怎麼部署、怎麼高可用、怎麼監控......一系列不用關心,這樣服務端渲染採用的接受度非常強,這樣做出來的功能比如說針對移動端、PC 端速度有明顯的提高。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/76\/76a8806849ee50c740705010a26a2bcb.webp","alt":"圖片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第三個是"},{"type":"text","marks":[{"type":"strong"}],"text":"批量場景"},{"type":"text","text":",最開始做 Serverless 的原因,是因爲有一個應用的批量任務場景有高可用的要求,在批量文本覈對任務對數據庫進行分庫之後,需要多個節點運行支撐,由於文本覈對任務不定期執行,存在大量空閒時間段資源冗餘問題。這種情況下可以通過函數計算實現文本覈對資源彈性化,抽取共性的數據獲取、數據加工、數據持久化和數據回傳等關鍵文本覈對步驟爲函數,通過函數計算平臺彈性執行;依託函數計算服務,實現定時或kafka消息觸發的方式觸文本覈對任務執行;利用函數工作流機制編排執行函數任務。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/70\/70e13765f4231a2d4a6f59e169170d6c.webp","alt":"圖片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第四個場景是"},{"type":"text","marks":[{"type":"strong"}],"text":"數據庫安裝的場景"},{"type":"text","text":",在 MySQL 數據庫上雲之前,使用部署在每臺宿主機上的 agent 進行數據庫腳本部。MySQL 上雲後,由於數據庫容器未部署 agent ,應用數據庫版本安裝時需申請跳板機進行中轉安裝,目前跳板機節點存在多應用共用、多節點共用時資源無法隔離,跳板機與數據庫關係映射無序,跳板機部署完後資源閒置浪費等問題。這種情況下,使用函數計算運行 agent 直接連接節點進行 DB 更新,並利用 Kafka 觸發器進行事件觸發執行,同時在投產高峯期,可以同時運行更多的 agent 函數實例。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/3b\/3ba1c67f932024c2f2445370aaed63df.webp","alt":"圖片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"最後是"},{"type":"text","marks":[{"type":"strong"}],"text":"模型發佈場景"},{"type":"text","text":",工行的線下投顧業務需要針對客戶出具千人千面的基金組合策略,但是缺乏對基金組合歷史業績及表現的回測展示,需要有在線能力支撐準實時的回測,並需要頻繁且快速地發佈模型,對基金配置模型進行優化與提升,目前發佈機制上不夠靈活,每次新的模型一出來都要去發版是非常繁瑣的事情。 研發思路將基金組合回測遷移到函數計算平臺,採用線上直接發佈模式,快速上線不同種類模型進行計算,快速向用戶展示結果。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"未來規劃"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"最後簡單分享工行對函數計算的下一步發展規劃:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第一,"},{"type":"text","marks":[{"type":"strong"}],"text":"統一 BaaS 服務接口規範"},{"type":"text","text":",通過類似微服務構建框架 Dapr 思路,形成通用接口形式如HTTP API、gRPC API,供函數內部進行調用,加快業務函數構建;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第二,"},{"type":"text","marks":[{"type":"strong"}],"text":"運用雲原生 Java 技術"},{"type":"text","text":",Java 是工行最主要的開發語言,而普通的 Java 存在啓動緩慢,內存佔用大的問題,在 Serverless 場景下的運用會出現啓動緩慢的問題,需要引入 Quarkus、Spring Native 等雲原生Java 框架;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第三,"},{"type":"text","marks":[{"type":"strong"}],"text":"推進 Serverless CloudIDE 建設"},{"type":"text","text":",使用更加強大的 CloudIDE 產品如 JetBrains 的Projector,支付相對複雜的應用程序開發,同時也能最大程度保持現有開發人員使用IDEA 的開發習慣;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第四,"},{"type":"text","marks":[{"type":"strong"}],"text":"構建函數模板中心"},{"type":"text","text":",函數計算整體開發較爲方便,但仍可以進一步抽取通用的函數代碼,形成函數模板,供開發人員進行使用,實現技術資產複用,從而更快實現業務功能開發。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"通過提供以上四種產品能力,從開發、運行層面,爲應用提供更友好的開發體驗,更快的啓動速度,從而增加業務應用的對產品的接受度。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關於百度 Serverless 函數計算產品:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"官網地址:https:\/\/cloud.baidu.com\/product\/cfc.html"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"百度函數計算引擎 EasyFaaS 已開源:"},{"type":"text","marks":[{"type":"strong"}],"text":" "},{"type":"text","text":"github.com\/baidu\/EasyFaaS"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"italic"}],"text":"本文整理自百度雲智峯會上的主題演講《工商銀行 Serverless 函數計算落地實踐》,講師周文澤分享了工行使用百度函數計算產品的落地過程。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"講師簡介"},{"type":"text","text":":"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"周文澤"},{"type":"text","text":",工商銀行軟開雲計算實驗室的高級經理。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"原文鏈接:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"https:\/\/mp.weixin.qq.com\/s\/XaSIS23PWd36QJO5APK-bg"}]}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章