Reactive Programming in Kotlin [PDF]

Reactive Programming in Kotlin
Reactive Programming in Kotlin

What this book covers

Chapter 1, A Short Introduction to Reactive Programming, helps you understand the context, thinking pattern, and principles of reactive programming.

Chapter 2, Functional Programming with Kotlin and RxKotlin, chapter walks you through the essential concepts of functional programming paradigms and their possible implementations on Kotlin so that you can understand functional reactive programming easily.

Chapter 3, Observables, Observers, and Subjects enables you to gain a grip on the base of RxKotlin—Observables, Observers, and Subjects lay at the core of RxKotlin.

Chapter 4, Introduction to Backpressure and Flowables, introduces you to Flowables, which enable you to use Backpressure—a technique in RxKotlin that prevents producers from outpacing consumers.

Chapter 5, Asynchronous Data Operators and Transformations, introduces you to operators in RxKotlin.

Chapter 6, More on Operators and Error Handling, gets your grip stronger on operators and introduces how to combine producers and how to filter them with operators. This chapter will also help you handle errors more efficiently in RxKotlin.

Chapter 7, Concurrency and Parallel Processing in RxKotlin with Schedulers, enables you to leverage the benefits of Schedulers to achieve concurrent programming.

Chapter 8, Testing RxKotlin Applications, walks you through the most crucial part of application development—testing—which is a bit different in RxKotlin as reactive programming defines behaviors instead of states. This chapter starts with the basics of
testing, enabling you to learn to test from scratch.

Chapter 9, Resource Management and Extending RxKotlin, helps you learn how to manage resources in Kotlin—resources could be database instances, files, HTTP accesses, or anything that needs to be closed. You will also learn how to create your own custom
operators in RxKotlin in this chapter.

Chapter 10, Introduction to Web Programming with Spring for Kotlin Developers, get you started with Spring and Hibernate so that you can leverage its benefits while writing APIs in Kotlin.

Chapter 11, REST APIs with Spring JPA and Hibernate, introduces you to the Reactor framework, the reactor-kotlin extension so that you can apply reactive programming with Spring in Kotlin.

Chapter 12, Reactive Kotlin and Android, the last chapter of this book, gets you started with reactive programming in Android with Kotlin.

What you need for this book

We will be using Java 8 and Kotlin 1.1.50 for the programs in this book, so Oracle’s JDK 1.8 along with Kotlin 1.1.50 (this can be skipped downloading if you’re using IntelliJ IDEA) will be required. You will need an environment to write and compile your Kotlin code (I strongly recommend Intellij IDEA, but you can use anything of your choice), and preferably a build automation system such as Gradle or Maven. Later in this book, we will use
Android Studio (2.3.3 or 3.0). Everything you need in this book should be free to use and not require commercial or personal licensing (we are using the IntelliJ IDEA Community Edition).

Who this book is for

This book is for Kotlin developers who would like to build fault-tolerant, scalable, and distributed systems. A basic knowledge of Kotlin is required; however, no prior knowledge of reactive programming is assumed.

You can also get this PDF by using our Android Mobile App directly:


Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.