Concurrent Data Processing in Elixir: Fast, Resilient Applications with Otp, Genstage, Flow, and 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 呢?也許你需要背壓,但是 GenStage、Flow 或 Broadway 哪個更好?你將學到一切需要知道的知識,以回答這些問題,並在短時間內開始建立高度並行的應用程式,撰寫不僅快速而且具有容錯能力且易於擴展的程式碼。

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

了解任務、監督樹和可用的不同類型的 Supervisor。了解為什麼進程和進程連結是 Elixir 中並行性的基石。熟悉 OTP,並使用 GenServer 行為來維護長時間運行工作的進程狀態。使用註冊表輕鬆擴展運行進程的數量。使用 GenStage 處理大量資料和流量峰值,並利用背壓優勢。使用生產者、消費者和生產者-消費者階段創建第一個多階段資料處理流程。使用 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的共同創辦人和首席技術官,Heresy是一個針對銷售的工作流程和分析平台,他從一開始就採用了Elixir,並且從未回頭。他喜歡開發產品、寫作、參與開源項目,並且樂於幫助他人。

最後瀏覽商品 (1)