Reactive Programming with RxJava
Introduction
Chapter1
1.1 Reactive Programming and RxJava
1.2 When You Need Reactive Programming
1.3 How RxJava Works
1.3.1 Push vs Pull (推和拉)
1.3.2 Async versus Sync (异步 vs 同步)
1.3.3 Concurrency and Parallelism
1.3.4 Lazy versus Eager
1.3.5 Duality
1.3.6 Cardinality
Chapter 2 Reactive Extensions
2.1 Anatomy of rx.Observable 剖析Observable
2.2 Subscribing to Notifications from Observable (订阅Observable的通知)
2.2.1 Capturing All Notifications by Using Observer
2.3 Controlling Listeners by Using Subscription and Subscriber
2.4 Creating Observables
2.4.1 Mastering Observable.create()
2.4.2 Infinite Streams(无限流)
2.4.3 Timing: timer() and interval()
2.4.4 Hot and Cold Observables
2.5 Use Case: From Callback API to Observable Stream
2.5.1 Manually Managing Subscribers
2.6 rx.subjects.Subject
2.7 ConnectableObservable
2.7.1 Single Subscription with publish().refCount()
2.7.2 ConnectableObservable Lifecycle
Chapter 3 Operators and Transformations
3.1 Core Operators: Mapping and Filtering
3.1.1 1-to-1 Transformations Using map()
3.1.2 Wrapping Up Using flatMap()
3.1.3 Postponing Events Using the delay() Operator
3.1.4 Order of Events After flatMap()
3.1.5 使用concatMap()保持顺序
3.2 More Than One Observable
3.2.1 Treating Several Observables as One Using merge()
3.2.2 Pairwise Composing Using zip() and zipWith()
3.2.3 When Streams Are Not Synchronized with One Another:combineLatest(), withLatestFrom(), and amb()
3.2.4 withLatestFrom() operator
3.3 Advanced Operators: collect(), reduce(), scan(), distinct(), and groupBy()
3.3.1 Scanning Through the Sequence with Scan and Reduce
3.3.2 Reduction with Mutable Accumulator: collect()
3.3.3 Asserting Observable Has Exactly One Item Using single()
3.3.4 Dropping Duplicates Using distinct() and distinctUntilChanged()
3.4 Slicing and Dicing Using skip(), takeWhile(), and Others
3.4.1 Ways of Combining Streams: concat(), merge(), and switchOnNext()
3.4.2 Criteria-Based Splitting of Stream Using groupBy()
3.4.3 Where to Go from Here?
3.5 Writing Customer Operators
3.5.1 Reusing Operators Using compose()
3.5.2 Implementing Advanced Operators Using lift()
Chapter4 Applying Reactive Programming to Existing Applications
4.1 From Collections to Observables
4.2 BlockingObservable: Exiting the Reactive World
4.3 Embracing Laziness
4.4 Composing Observables
4.4.1 Lazy paging and concatenation
4.5 Imperative Concurrency
4.6 flatMap() as Asynchronous Chaining Operator
4.7 Replacing Callbacks with Streams
4.8 Polling Periodically for Changes
4.9 Multithreading in RxJava
4.9.1 What Is a Scheduler?
4.9.2 Declarative Subscription with subscribeOn()
4.9.3 subscribeOn() Concurrency and Behavior
4.9.4 Batching Requests Using groupBy()
4.9.5 Declarative Concurrency with observeOn()
4.9.6 Other Uses for Schedulers
Chapter 5 Reactive from Top to Bottom
5.1 Beating the C10k Problem
5.1.1 Traditional Thread-Based HTTP Servers
5.1.2 Nonblocking HTTP Server with Netty and RxNetty
5.1.3 Benchmarking Blocking versus Reactive Server
5.1.4 Reactive HTTP Servers Tour
5.2 HTTP Client Code
5.2.1 Nonblocking HTTP Client with RxNetty
5.3 Relational Database Access
5.3.1 NOTIFY AND LISTEN on PostgreSQL Case Study
5.4 CompletableFuture and Streams
5.4.1 A Short Introduction to CompletableFuture
5.4.2 Interoperability with CompletableFuture
5.5 Observable versus Single
5.5.1 Creating and Consuming Single
5.5.2 Combining Responses Using zip, merge, and concat
5.5.3 Interoperability with Observable and CompletableFuture
5.5.4 When to Use Single?
Chapter 6 Flow Control and Backpressure
6.1 Flow Control
6.1.1 Taking Periodic Samples and Throttling
6.1.2 Buffering Events to a List
6.1.3 Moving window
6.1.4 Skipping Stale Events by Using debounce()
6.2 Backpressure
6.2.1 Backpressure in RxJava
6.2.2 Built-in Backpressure
6.2.3 Producers and Missing Backpressure
6.2.4 Honoring the Requested Amount of Data
Chapter 7 Testing and Troubleshooting
7.1 Error Handlering
Chapter 8 Case Studies
8.1 Android Development with RxJava
8.1.1 Avoiding Memory Leaks in Activities
8.1.2 Retrofit with Native RxJava Support
8.2 Managing Failures with Hystrix
8.2.1 The First Steps with Hystrix
8.2.2 Nonblocking Commands with HystrixObservableCommand
8.2.3 Bulkhead Pattern and Fail-Fast
8.2.4 Batching and Collapsing Commands
8.2.5 Monitoring and Dashboards
8.3 Querying NoSQL Databases
8.3.1 Couchbase Client API
8.3.2 MongoDB Client API
8.4 Camel Integration
8.4.1 Consuming Files with Camel
8.4.2 Receiving Messages from Kafka
8.5 Java 8 Streams and CompletableFuture
8.5.1 Usefulness of Parallel Streams
8.5.2 Choosing the Appropriate Concurrency Abstraction
8.5.3 When to Choose Observable?
8.6 Memory Consumption and Leaks
8.6.1 Operators Consuming Uncontrolled Amounts of Memory
Chapter 9 Future Directions
9.1 Reactive Streams
9.2 Observable and Flowable
9.3 Performance
9.4 Migration
Powered by
GitBook
8.1 Android Development with RxJava
由于本人是Java开发,对安卓不懂,所以害怕翻译会把某些人带沟里去。
这一节就不翻译了,感兴趣的安卓开发,自己参考原书吧
results matching "
"
No results matching "
"