Concurrent Data Processing in Elixir: Fast, Resilient Applications with Otp, Genstage, Flow, and Broadway
暫譯: Elixir中的併發資料處理:使用Otp、Genstage、Flow和Broadway構建快速且具韌性的應用程式

Gospodinov, Svilen

  • 出版商: Pragmatic Bookshelf
  • 出版日期: 2021-08-31
  • 售價: $1,650
  • 貴賓價: 9.5$1,568
  • 語言: 英文
  • 頁數: 170
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1680508199
  • ISBN-13: 9781680508192
  • 相關分類: Functional-programming
  • 立即出貨 (庫存=1)

相關主題

商品描述

Learn different ways of writing concurrent code in Elixir and increase your application's performance, without sacrificing scalability or fault-tolerance. Most projects benefit from running background tasks and processing data concurrently, but the world of OTP and various libraries can be challenging. Which Supervisor and what strategy to use? What about GenServer? Maybe you need back-pressure, but is GenStage, Flow, or Broadway a better choice? You will learn everything you need to know to answer these questions, start building highly concurrent applications in no time, and write code that's not only fast, but also resilient to errors and easy to scale.

Whether you are building a high-frequency stock trading application or a consumer web app, you need to know how to leverage concurrency to build applications that are fast and efficient. Elixir and the OTP offer a range of powerful tools, and this guide will show you how to choose the best tool for each job, and use it effectively to quickly start building highly concurrent applications.

Learn about Tasks, supervision trees, and the different types of Supervisors available to you. Understand why processes and process linking are the building blocks of concurrency in Elixir. Get comfortable with the OTP and use the GenServer behaviour to maintain process state for long-running jobs. Easily scale the number of running processes using the Registry. Handle large volumes of data and traffic spikes with GenStage, using back-pressure to your advantage. Create your first multi-stage data processing pipeline using producer, consumer, and producer-consumer stages. Process large collections with Flow, using MapReduce and more in parallel. Thanks to Broadway, you will see how easy it is to integrate with popular message broker systems, or even existing GenStage producers.

Start building the high-performance and fault-tolerant applications Elixir is famous for today.

What You Need:

You'll need Elixir 1.9+ and Erlang/OTP 22+ installed on a Mac OS X, Linux, or Windows machine.

商品描述(中文翻譯)

學習在 Elixir 中撰寫並發程式碼的不同方法,提升應用程式的性能,而不犧牲可擴展性或容錯性。大多數專案都能從執行背景任務和並行處理數據中受益,但 OTP 和各種庫的世界可能會很具挑戰性。應該使用哪種 Supervisor 和什麼策略?那 GenServer 呢?也許你需要反壓(back-pressure),但 GenStage、Flow 還是 Broadway 是更好的選擇?你將學到回答這些問題所需的所有知識,迅速開始構建高度並發的應用程式,並撰寫不僅快速而且對錯誤具有韌性且易於擴展的程式碼。

無論你是在構建高頻交易應用程式還是消費者網頁應用程式,你都需要知道如何利用並發來構建快速且高效的應用程式。Elixir 和 OTP 提供了一系列強大的工具,本指南將向你展示如何為每個任務選擇最佳工具,並有效地使用它們,快速開始構建高度並發的應用程式。

了解 Tasks、監督樹(supervision trees)以及可用的不同類型的 Supervisors。理解為什麼進程和進程連結是 Elixir 中並發的基石。熟悉 OTP,並使用 GenServer 行為來維護長時間運行任務的進程狀態。輕鬆使用 Registry 擴展運行進程的數量。利用 GenStage 處理大量數據和流量高峰,並利用反壓來獲得優勢。使用生產者(producer)、消費者(consumer)和生產者-消費者(producer-consumer)階段創建你的第一個多階段數據處理管道。使用 Flow 並行處理大型集合,利用 MapReduce 等技術。感謝 Broadway,你將看到如何輕鬆地與流行的消息代理系統集成,甚至與現有的 GenStage 生產者集成。

今天就開始構建 Elixir 所以著名的高性能和容錯應用程式吧。

你需要的條件:

你需要在 Mac OS X、Linux 或 Windows 機器上安裝 Elixir 1.9+ 和 Erlang/OTP 22+。

作者簡介

Svilen Gospodinov is a software engineer with a technical leadership and entrepreneurship background. As co-founder and CTO at Heresy, a workflow and analytics platform for Sales, he adopted Elixir from the very beginning and never looked back. He likes building products, writing, working on open source, and helping others.

作者簡介(中文翻譯)

Svilen Gospodinov 是一位擁有技術領導和創業背景的軟體工程師。作為 Heresy 的共同創辦人及首席技術官,他從一開始就採用了 Elixir,並且從未回頭。他喜歡建立產品、寫作、參與開源項目以及幫助他人。