Hands-On Reactive Programming with Clojure: Create asynchronous, event-based, and concurrent applications, 2nd Edition

Konrad Szydlo, Leonardo Borges

  • 出版商: Packt Publishing
  • 出版日期: 2019-01-28
  • 售價: $1,640
  • 貴賓價: 9.5$1,558
  • 語言: 英文
  • 頁數: 298
  • 裝訂: Paperback
  • ISBN: 1789346134
  • ISBN-13: 9781789346138
  • 相關分類: JVM 語言
  • 海外代購書籍(需單獨結帳)

相關主題

商品描述

Learn how to use RxClojure to deal with stateful computations

Key Features

  • Leverage the features of Functional Reactive Programming using Clojure
  • Create dataflow-based systems that are the building blocks of Reactive Programming
  • Use different Functional Reactive Programming frameworks, techniques, and patterns to solve real-world problems

Book Description

Reactive Programming is central to many concurrent systems, and can help make the process of developing highly concurrent, event-driven, and asynchronous applications simpler and less error-prone.

This book will allow you to explore Reactive Programming in Clojure 1.9 and help you get to grips with some of its new features such as transducers, reader conditionals, additional string functions, direct linking, and socket servers. Hands-On Reactive Programming with Clojure starts by introducing you to Functional Reactive Programming (FRP) and its formulations, as well as showing you how it inspired Compositional Event Systems (CES). It then guides you in understanding Reactive Programming as well as learning how to develop your ability to work with time-varying values thanks to examples of reactive applications implemented in different frameworks. You'll also gain insight into some interesting Reactive design patterns such as the simple component, circuit breaker, request-response, and multiple-master replication. Finally, the book introduces microservices-based architecture in Clojure and closes with examples of unit testing frameworks.

By the end of the book, you will have gained all the knowledge you need to create applications using different Reactive Programming approaches.

What you will learn

  • Understand how to think in terms of time-varying values and event streams
  • Create, compose, and transform observable sequences using Reactive extensions
  • Build a CES framework from scratch using core.async as its foundation
  • Develop a simple ClojureScript game using Reagi
  • Integrate Om and RxJS in a web application
  • Implement a reactive API in Amazon Web Services (AWS)
  • Discover helpful approaches to backpressure and error handling
  • Get to grips with futures and their applications

Who this book is for

If you're interested in using Reactive Programming to build asynchronous and concurrent applications, this is the book for you. Basic knowledge of Clojure programming is necessary to understand the concepts covered in this book.

Table of Contents

  1. What is Reactive Programming?
  2. A Look at Reactive Extensions
  3. Asynchronous Programming and Networking
  4. Introduction to core.async
  5. Creating Your Own CES Framework with core.async
  6. Building a simple Clojurescript game with Javelin/Reagi
  7. The UI as a Function
  8. Futures
  9. A Reactive API to Amazon Web Services
  10. Reactive Microservices
  11. Testing Reactive Apps
  12. Concurrency Utilities in Clojure
  13. Appendix: The Algebra of Library Design

商品描述(中文翻譯)

學習如何使用RxClojure處理有狀態的計算

主要特點
- 利用Clojure的功能反應式編程特性
- 建立基於數據流的系統,作為反應式編程的基礎模塊
- 使用不同的功能反應式編程框架、技術和模式來解決現實世界的問題

書籍描述
反應式編程對於許多並發系統至關重要,可以幫助簡化並發、事件驅動和異步應用程序的開發過程,減少錯誤。

本書將讓您探索Clojure 1.9中的反應式編程,並幫助您掌握一些新功能,如轉換器、讀取條件、附加字符串函數、直接鏈接和套接字服務器。《Hands-On Reactive Programming with Clojure》首先介紹了功能反應式編程(FRP)及其公式,並展示了它如何啟發組合事件系統(CES)。然後,它引導您了解反應式編程,並學習如何通過在不同框架中實現反應式應用程序的示例來開發處理時間變化值的能力。您還將深入了解一些有趣的反應式設計模式,如簡單組件、斷路器、請求-響應和多主復制。最後,本書介紹了Clojure中基於微服務架構的應用,並提供了單元測試框架的示例。

通過閱讀本書,您將獲得使用不同反應式編程方法創建應用程序所需的所有知識。

您將學到什麼
- 理解如何以時間變化值和事件流的方式思考
- 使用反應擴展創建、組合和轉換可觀察序列
- 使用core.async從頭開始構建CES框架
- 使用Reagi創建一個簡單的ClojureScript遊戲
- 在Web應用程序中集成Om和RxJS
- 在Amazon Web Services(AWS)中實現反應式API
- 探索有關背壓和錯誤處理的有用方法
- 掌握future及其應用

本書適合對使用反應式編程構建異步和並發應用程序感興趣的讀者。了解Clojure編程的基礎知識對於理解本書中涵蓋的概念是必要的。

目錄
1. 什麼是反應式編程?
2. 反應式擴展概述
3. 異步編程和網絡
4. core.async入門
5. 使用core.async創建自己的CES框架
6. 使用Javelin/Reagi構建簡單的Clojurescript遊戲
7. UI作為函數
8. Futures
9. 面向Amazon Web Services的反應式API
10. 反應式微服務
11. 測試反應式應用程序
12. Clojure中的並發工具
附錄:庫設計的代數