点击选择搜索分类
首页 - 社会学- 正文
☆☆☆☆☆
||
[美] 托马什·勒克威茨本·克斯藤森 著
出版社: 东南大学出版社 ISBN:9787564173708 版次:1 商品编码:12253966 包装:平装 开本:16开 出版时间:2017-10-01 用纸:胶版纸 页数:345 正文语种:英文
作者Tomasz Nurkiewicz(托马什·勒克威茨)和Ben Christensen(本·克斯藤森)引入了使用RxJava库的具体例子,解决安卓设备和服务端上的真实性能问题。你会学到RxJava如何利用并行和并发来帮助我们解决今天的问题。
《RxJava反应式编程(影印版 英文版)》同时也提供了即将发布的2.0版本的预览。
Introduction
1. Reactive Programming with RxJava
Reactive Programming and RxJava
When You Need Reactive Programming
How RxJava Works
Push versus Pull
Async versus Sync
Concurrency and Parallelism
Lazy versus Eager
Duality
Cardinality
Mechanical Sympathy: Blocking versus Nonblocking I/O
Reactive Abstraction
2. Reactive Extensions
Anatomy of rx.Observable
Subscribing to Notifications from Observable
Capturing All Notifications by Using Observer
Controlling Listeners by Using Subscription and Subscriber
Creating Observables
Mastering Observable.create0
Infinite Streams
Timing: timer() and interval()
Hot and Cold Observables
Use Case: From Callback API to Observable Stream
Manually Managing Subscribers
rx.subjects.Subject
ConnectableObservable
Single Subscription with publishO.refCountO
ConnectableObservable Lifecycle
Summary
3. Operators and Transformations
Core Operators: Mapping and Filtering
1-to-1 Transformations Using map()
Wrapping Up Using flatMap0
Postponing Events Using the delay() Operator
Order of Events After flatMap0
Preserving Order Using concatMap0
More Than One Observable
Treating Several Observables as One Using merge()
Pairwise Composing Using zip() and zipWith()
When Streams Are Not Synchronized with One Another: combineLatest(),
withLatestFrom(), and amb()
Advanced Operators: collect(), reduce(), scan(), distinct(), and groupBy()
Scanning Through the Sequence with Scan and Reduce
Reduction with Mutable Accumulator: collect()
Asserting Observable Has Exactly One Item Using single()
Dropping Duplicates Using distinct() and distinctUntilChanged()
Slicing and Dicing Using skip(), takeWhile(), and Others
Ways of Combining Streams: concat(), merge(), and switchOnNext()
Criteria-Based Splitting of Stream Using groupBy0
Where to Go from Here?
Writing Customer Operators
Reusing Operators Using compose()
Implementing Advanced Operators Using lift()
Summary
4. Applying Reactive Programming to Existing Applications
From Collections to Observables
BlockingObservable: Exiting the Reactive World
Embracing Laziness
Composing Observables
Lazy paging and concatenation
Imperative Concurrency
flatMap0 as Asynchronous Chaining Operator
Replacing Callbacks with Streams
Polling Periodically for Changes
Multithreading in RxJava
What Is a Scheduler?
Declarative Subscription with subscribeOn()
subscribeOn0 Concurrency and Behavior
Batching Requests Using groupBy()
Declarative Concurrency with observeOn()
Other Uses for Schedulers
Summary
5. Reactive from Top to Bottom
Beating the C1Ok Problem
Traditional Thread-Based HTTP Servers
Nonblocking HTTP Server with Netty and RxNetty
Benchmarking Blocking versus Reactive Server
Reactive HTTP Servers Tour
HTTP Client Code
Nonblocking HTTP Client with RxNetty
Relational Database Access
NOTIFY AND LISTEN on PostgreSQL Case Study
CompletableFuture and Streams
A Short Introduction to CompletableFuture
Interoperability with CompletableFuture
Observable versus Single
Creating and Consuming Single
Combining Responses Using zip, merge, and concat
Interoperability with Observable and CompletableFuture
When to Use Single?
Summary
6. Flow Control and Backpressure
Flow Control
Taking Periodic Samples and Throttling
Buffering Events to a List
Moving window
Skipping Stale Events by Using debounce()
Backpressure
Backpressure in RxJava
Built-in Backpressure
Producers and Missing Backpressure
Honoring the Requested Amount of Data
Summary
7. Testing and Troubleshooting
Error Handling
Where Are My Exceptions?
Declarative try-catch Replacement
Timing Out When Events Do Not Occur
Retrying After Failures
Testing and Debugging
Virtual Time
Schedulers in Unit Testing
Unit Testing
Monitoring and Debugging
doOn...() Callbacks
Measuring and Monitoring
Summary
8. Case Studies
Android Development with RxJava
Avoiding Memory Leaks in Activities
Retrofit with Native RxJava Support
Schedulers in Android
UI Events as Streams
Managing Failures with Hystrix
The First Steps with Hystrix
Nonblocking Commands with HystrixObservableCommand
Bulkhead Pattern and Fail-Fast
Batching and Collapsing Commands
Monitoring and Dashboards
Querying NoSQL Databases
Couchbase Client API
MongoDB Client API
Camel Integration
Consuming Files with Camel
Receiving Messages from Kafka
Java 8 Streams and CompletableFuture
Usefulness of Parallel Streams
Choosing the Appropriate Concurrency Abstraction
When to Choose Observable?
Memory Consumption and Leaks
Operators Consuming Uncontrolled Amounts of Memory
Summary
9. Future Directions
Reactive Streams
Observable and Flowable
Performance
Migration
A. More HTTP Server Examples
B. A Decision Tree of Observable Operators
Index
You will not see similar low-level implementations outside of the university, but itworks.For each request we ignore whatever was sent to us and return 2000Kresponses.Opening localhost:8080 in the browser succeeds with an OK text reply.The class is named SingleThread for a reason.Serversocket.accept() blocks untilany client establishes a connection with us.Then, it returns a client Socket.While weinteract with that Socket (read and write to it), we still listen for incoming connec-tions but no one picks them up because our thread is busy handling first client.It islike at the doctor's office: one patient goes in and everyone else must wait in a queue.Did you notice the extra 100 parameter after 8080 (listening port)? This value (thedefault is 50) caps the maximum number of pending connections that can wait in aqueue.Above that number, they are rejected.To make matters worse, we pretend toimplement HTTP/1.1 which uses persistent connections by default.Until the clientdisconnects we keep the TCP/IP connection open just in case, blocking new clients.
……
RxJava反应式编程(影印版 英文版) 电子书 下载 mobi epub pdf txt
RxJava反应式编程(影印版 英文版)-so88
RxJava反应式编程(影印版 英文版) pdf epub mobi txt 电子书 下载 2022
图书介绍
☆☆☆☆☆
||
[美] 托马什·勒克威茨本·克斯藤森 著
出版社: 东南大学出版社 ISBN:9787564173708 版次:1 商品编码:12253966 包装:平装 开本:16开 出版时间:2017-10-01 用纸:胶版纸 页数:345 正文语种:英文
内容简介
在今天这个手机APP驱动的时代,程序的异步性和响应性至关重要,响应式编程能帮助你编写更可靠、更易伸缩且性能更好的代码。在《RxJava反应式编程(影印版 英文版)》这本务实的书中,Java开发者首先会学习到如何用反应式视角看待问题,然后再借助这一令人兴奋的全新编程范式所提供的优秀特性构建应用程序。作者Tomasz Nurkiewicz(托马什·勒克威茨)和Ben Christensen(本·克斯藤森)引入了使用RxJava库的具体例子,解决安卓设备和服务端上的真实性能问题。你会学到RxJava如何利用并行和并发来帮助我们解决今天的问题。
《RxJava反应式编程(影印版 英文版)》同时也提供了即将发布的2.0版本的预览。
目录
ForewordIntroduction
1. Reactive Programming with RxJava
Reactive Programming and RxJava
When You Need Reactive Programming
How RxJava Works
Push versus Pull
Async versus Sync
Concurrency and Parallelism
Lazy versus Eager
Duality
Cardinality
Mechanical Sympathy: Blocking versus Nonblocking I/O
Reactive Abstraction
2. Reactive Extensions
Anatomy of rx.Observable
Subscribing to Notifications from Observable
Capturing All Notifications by Using Observer
Controlling Listeners by Using Subscription and Subscriber
Creating Observables
Mastering Observable.create0
Infinite Streams
Timing: timer() and interval()
Hot and Cold Observables
Use Case: From Callback API to Observable Stream
Manually Managing Subscribers
rx.subjects.Subject
ConnectableObservable
Single Subscription with publishO.refCountO
ConnectableObservable Lifecycle
Summary
3. Operators and Transformations
Core Operators: Mapping and Filtering
1-to-1 Transformations Using map()
Wrapping Up Using flatMap0
Postponing Events Using the delay() Operator
Order of Events After flatMap0
Preserving Order Using concatMap0
More Than One Observable
Treating Several Observables as One Using merge()
Pairwise Composing Using zip() and zipWith()
When Streams Are Not Synchronized with One Another: combineLatest(),
withLatestFrom(), and amb()
Advanced Operators: collect(), reduce(), scan(), distinct(), and groupBy()
Scanning Through the Sequence with Scan and Reduce
Reduction with Mutable Accumulator: collect()
Asserting Observable Has Exactly One Item Using single()
Dropping Duplicates Using distinct() and distinctUntilChanged()
Slicing and Dicing Using skip(), takeWhile(), and Others
Ways of Combining Streams: concat(), merge(), and switchOnNext()
Criteria-Based Splitting of Stream Using groupBy0
Where to Go from Here?
Writing Customer Operators
Reusing Operators Using compose()
Implementing Advanced Operators Using lift()
Summary
4. Applying Reactive Programming to Existing Applications
From Collections to Observables
BlockingObservable: Exiting the Reactive World
Embracing Laziness
Composing Observables
Lazy paging and concatenation
Imperative Concurrency
flatMap0 as Asynchronous Chaining Operator
Replacing Callbacks with Streams
Polling Periodically for Changes
Multithreading in RxJava
What Is a Scheduler?
Declarative Subscription with subscribeOn()
subscribeOn0 Concurrency and Behavior
Batching Requests Using groupBy()
Declarative Concurrency with observeOn()
Other Uses for Schedulers
Summary
5. Reactive from Top to Bottom
Beating the C1Ok Problem
Traditional Thread-Based HTTP Servers
Nonblocking HTTP Server with Netty and RxNetty
Benchmarking Blocking versus Reactive Server
Reactive HTTP Servers Tour
HTTP Client Code
Nonblocking HTTP Client with RxNetty
Relational Database Access
NOTIFY AND LISTEN on PostgreSQL Case Study
CompletableFuture and Streams
A Short Introduction to CompletableFuture
Interoperability with CompletableFuture
Observable versus Single
Creating and Consuming Single
Combining Responses Using zip, merge, and concat
Interoperability with Observable and CompletableFuture
When to Use Single?
Summary
6. Flow Control and Backpressure
Flow Control
Taking Periodic Samples and Throttling
Buffering Events to a List
Moving window
Skipping Stale Events by Using debounce()
Backpressure
Backpressure in RxJava
Built-in Backpressure
Producers and Missing Backpressure
Honoring the Requested Amount of Data
Summary
7. Testing and Troubleshooting
Error Handling
Where Are My Exceptions?
Declarative try-catch Replacement
Timing Out When Events Do Not Occur
Retrying After Failures
Testing and Debugging
Virtual Time
Schedulers in Unit Testing
Unit Testing
Monitoring and Debugging
doOn...() Callbacks
Measuring and Monitoring
Summary
8. Case Studies
Android Development with RxJava
Avoiding Memory Leaks in Activities
Retrofit with Native RxJava Support
Schedulers in Android
UI Events as Streams
Managing Failures with Hystrix
The First Steps with Hystrix
Nonblocking Commands with HystrixObservableCommand
Bulkhead Pattern and Fail-Fast
Batching and Collapsing Commands
Monitoring and Dashboards
Querying NoSQL Databases
Couchbase Client API
MongoDB Client API
Camel Integration
Consuming Files with Camel
Receiving Messages from Kafka
Java 8 Streams and CompletableFuture
Usefulness of Parallel Streams
Choosing the Appropriate Concurrency Abstraction
When to Choose Observable?
Memory Consumption and Leaks
Operators Consuming Uncontrolled Amounts of Memory
Summary
9. Future Directions
Reactive Streams
Observable and Flowable
Performance
Migration
A. More HTTP Server Examples
B. A Decision Tree of Observable Operators
Index
精彩书摘
《RxJava反应式编程(影印版 英文版)》:You will not see similar low-level implementations outside of the university, but itworks.For each request we ignore whatever was sent to us and return 2000Kresponses.Opening localhost:8080 in the browser succeeds with an OK text reply.The class is named SingleThread for a reason.Serversocket.accept() blocks untilany client establishes a connection with us.Then, it returns a client Socket.While weinteract with that Socket (read and write to it), we still listen for incoming connec-tions but no one picks them up because our thread is busy handling first client.It islike at the doctor's office: one patient goes in and everyone else must wait in a queue.Did you notice the extra 100 parameter after 8080 (listening port)? This value (thedefault is 50) caps the maximum number of pending connections that can wait in aqueue.Above that number, they are rejected.To make matters worse, we pretend toimplement HTTP/1.1 which uses persistent connections by default.Until the clientdisconnects we keep the TCP/IP connection open just in case, blocking new clients.
……
RxJava反应式编程(影印版 英文版) 电子书 下载 mobi epub pdf txt
电子书下载地址:
相关电子书推荐:
- 文件名
- 探秘死亡的真相 《科学传奇——探索人体的奥秘》编委会著
- 配电网运维规程 9787512378438
- 探秘百科 无限探索版:神勇战士
- 润滑油配方与制备300例(李东光) 李东光 化学工业出版社
- WL-美国国家地理知识小百科:岩石和矿物-[美] 史蒂夫·托米塞克,[德] 卡斯滕·彼得,
- 行业节能减排先进适用技术评价方法及应用 温宗国 等 科学出版社
- BF-物种起源-附<<进化论的十大猜想>>-彩图珍藏版-[英] 达尔文 北京大学出版社 9
- GB/T 23776-2018 茶叶感官审评方法
- 法布尔昆虫记
- 机械零件常识(日本经典技能系列丛书)
- 寻觅本草——一本中医人的中药鉴定手记 张宇静
- 3本 复合调味料生产技术与配方+复合食品添加剂+食品配方设计7步 食品加工技术书籍 香辛料
- 古埃及:每天30秒探索令人心驰向往的50个古埃及传奇
- 内燃机设计 爱都瓦尔多·科勒尔 机械工业出版社
- (青少年“海洋梦”系列丛书)北海浩歌——海洋生态与文明 9787565024153