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

.NET Conf 2024 Taiwan 初探 Drasi:微軟開源的 Data Chang...

Alan Tsai
December 15, 2024

.NET Conf 2024 Taiwan 初探 Drasi:微軟開源的 Data Change Processing platform

在現代化的系統架構中,微服務化(Microservices)已成為趨勢。
然而,隨之而來的一個常見問題就是:資料共享該如何處理?
過去,當所有系統都集中在同一個地方時,直接存取資料是理所當然的選擇。
但在微服務架構中,我們是否還應該這樣做?如果不應該,那有哪些建議的做法?

Drasi 的誕生正是為了解決這些挑戰。
讓我們一起探索 Drasi,了解何為一個資料變更處理平台,以及帶來什麼好處。

Alan Tsai

December 15, 2024
Tweet

More Decks by Alan Tsai

Other Decks in Technology

Transcript

  1. Alan Tsai 蔡孟玹 • 後端工程師 - .NET 技術為主 • 喜歡學習不同東西

    • Azure • Data Science、Chatbot • Container、DevOps • 加强開發的Tools、架構 • 翻譯文章/軟體 • 兩本翻譯書 • 三門線上課程 • 看小說、玩手游
  2. 喜歡技術分享 2024 11 月 GDG 小聚 探索 GitHub Copilot 的新功能讓我們的應用程式開發更快一步

    2024 08 月 TSMC IT Community Meetup 聊聊生成式 AI 衝擊下工程師可以做好什麼準備 2024 06 月 Global DevOps Experience Day 2023 .NET Conf Taiwan 探索 API 開發的挑戰與解決之道 從 GitHub Copilot 到 Enterprise Copilot:打造符合企業需求的智能開發助手之路 2023 10 月 GDG 小聚 開始邁上你的 Azure 成本管控大師之路 2022 .NET Conf Taiwan 談 Event Driven Architecture 之前是不是該把 Event 規格搞定? CloudEvents 是什麼? | 邁上 Cloud Native App 之路
  3. 喜歡技術分享 Tibame AZ-900、AZ-104、AZ-204 GitHub Copilot 企業導入,在製造業、金融業、服務業,已培訓近 2000+ 人次 Trainocate AZ-104、AZ-204、AZ-400、DP-200、DP-201、PL-900、DA-100

    台灣智慧自動化與機器人協會 運用Python進行大數據分析、機器學習基礎理論課程及人工智慧 – ML.NET 中華電信學院 DevOps與CI/CD實務研習班 Windows Container 技術實務班 使用Azure AI打造有人工智能的Line聊天機器人
  4. What is Death Star Architecture and why you should care

    1.Take the cheaper faster option. 2.Take the cheaper faster option. 3.Goto 1.
  5. 改 A 壞 B => 有程式碼品質問題 Gate Keepers 變成英雄 為了加速開發,我們導入

    “敏捷” 專注在 Process, Documentation, Planning 整個糾結在一起,value stream 散落在各個解決方案 開始有很多分支 (但是 DB 是同一座…) 商業需求不會因為開發變慢而停下 各個部門解決自己的問題,而沒有思考整體公司。沒 有一致步調前進
  6. Organizations often need to take some action when data stored

    in a database changes, or, conversely, when it doesn’t change as expected
  7. •Azure Cosmos DB Gremlin API •PostgreSQL •Event Hubs •Microsoft SQL

    Server •Microsoft Dataverse •Kubernetes Source Connection of data
  8. Continuous Queries Cypher query •Real-Time Data Updates: •Continuously incorporate changes

    from the source database. •Maintain accurate, up-to-date query results. •Flexible Query Capabilities: •Use Cypher Query Language for detailed change detection. •Rich query logic for properties and relationships. •Multi-Source Integration: •Queries span multiple data sources without complex joins. •Integrates relational and graph data seamlessly.
  9. Incident Alert Detection MATCH (e:Employee)-[:ASSIGNED_TO]->(t:Team), (m:Employee)-[:MANAGES]->(t:Team), (e:Employee)-[:LOCATED_IN]->(:Building)-[:LOCATED_IN]->(r:Region), (i:Incident {type:'environmental'})-[:OCCURS_IN]->(r:Region) WHERE

    elementId(e) <> elementId(m) AND i.severity IN [‘critical’, ‘extreme’] AND i.endTimeMs IS NULL RETURN m.name AS ManagerName, m.email AS ManagerEmail, e.name AS EmployeeName, e.email AS EmployeeEmail, r.name AS RegionName, elementId(i) AS IncidentId, i.severity AS IncavidentSeverity, i.description AS IncidentDescription Employees located in Buildings within Regions where there are active Incidents of type ’environmental’ that have a severity level of ‘critical’ or ‘extreme’ The name and email address of the at risk employee and their manage
  10. Incident Alert Detection MATCH (e:Employee)-[:ASSIGNED_TO]->(t:Team), (m:Employee)-[:MANAGES]->(t:Team), (e:Employee)-[:LOCATED_IN]->(:Building)-[:LOCATED_IN]->(r:Region), (i:Incident {type:'environmental'})-[:OCCURS_IN]->(r:Region) WHERE

    elementId(e) <> elementId(m) AND i.severity IN [‘critical’, ‘extreme’] AND i.endTimeMs IS NULL RETURN m.name AS ManagerName, m.email AS ManagerEmail, e.name AS EmployeeName, e.email AS EmployeeEmail, r.name AS RegionName, elementId(i) AS IncidentId, i.severity AS IncavidentSeverity, i.description AS IncidentDescription { “added”: [ { “ManagerName”: “Allen”, “ManagerEmail”: “allen@contos “Southern California”, “IncidentId”: “in1000”, “IncidentSeverit { “ManagerName”: “Allen”, “ManagerEmail”: “allen@contos “Southern California”, “IncidentId”: “in1000”, “IncidentSeverit ], “updated”: [], “deleted”: [] }
  11. Incident Alert Detection { “added”: [], “updated”: [], “deleted”: [

    { “ManagerName”: “Allen”, “ManagerEmail”: “[email protected]”, “EmployeeName”: “Bob…” } ] } If Bob Change Location If severity change { “added”: [], “updated”: [ { “before”: { “Manager “after”: { “ManagerName” “deleted”: [] }
  12. Install on AKS 1. Connect to AKS 2. Download drasi

    cli 3. Call drasi init az aks get-credentials --resource-group <group> --name <name> curl -fsSL https://raw.githubusercontent.com/drasi- project/drasi- platform/main/cli/installers/install-drasi- cli.sh | /bin/bash https://drasi.io/how-to-guides/installation/install-on-
  13. Solution Architecture 1.Which people have sent the message “Hello World”?

    2.How many times has the same message been sent? 3.Which people haven’t sent a message in the last 20 seconds?
  14. Insert Hello World INSERT INTO public."Message" VALUES (5, 'Allen', 'Hello

    World’); INSERT INTO public."Message" VALUES (5, 'Allen', 'Hello World'); Which people have sent the message “Hello World”? How many times has the same message been sent?
  15. Observing Changes, Entity CRUD Observing Conditions, an Incident becomes critical.

    an Order becomes ready for pickup. a Room’s temperature exceeds 80 degrees. the occupancy of a Store exceeds 100 people. Observing Collections There are new customer orders. These need to be picked from stock. Once picked, orders need to be packed and prepared for dispatch. Once prepared, the orders need to be dispatched through various delivery options. Once dispatched, the orders need to be tracked until delivery. Once the Order is delivered, it is complete, unless the customer has an issue, in which case a customer support process is initiated… Solution Design How to Design Solutions with Drasi Solution for Down Stream Application
  16. What is it not good for has a mature change

    notification capability Continuous Query includes data types for which there is a lot of data stream analytics or streaming data transformation over high volume data streams 02 01 03
  17. 1. Drasi: Microsoft’s newest open-source project simplifies change detection and

    reaction in complex systems 2. Detect and react intelligently to changes in data with Drasi 3. Drasi.io 4. Learning Reference