Preface

Scala is an audacious programming language that blends object-oriented and functional programming concepts on the JVM. Scala has grown from relative obscurity to a top choice for developing robust and maintainable JVM applications. However, writing highly performant applications remains a challenge without a deep understanding of the language and the advanced features that it provides.

Since 2011, we have used Scala to solve complex business challenges with demanding performance requirements. In Scala High Performance Programming, we share the lessons that we have learned over the years and the techniques we apply when writing software. We explore the language and its ecosystem of tools and widely-used libraries in this book.

Our goal with this book is to help you understand the options that are made available to you by the language. We empower you to gather the information that is needed to make informed design and implementation decisions in your software systems. Rather than feed you a few Scala-fish and send you on your way, we help you learn how to fish and give you the tools to write more functional and more performant software. Along the way, we motivate technical discussions by concocting business problems that are reminiscent of real-world problems. We hope that by reading this book, you can come to appreciate the power of Scala, and find the tools to write more functional and more performant applications.

What this book covers

Chapter 1, The Road to Performance, introduces the concept of performance and the important terms for this topic.

Chapter 2, Measuring Performance on the JVM, details the tools that are available on the JVM to measure and evaluate performance, including JMH and Flight Recorder.

Chapter 3, Unleashing Scala Performance, provides a guided tour of various techniques and patterns to take advantage of the language features and improve program performance.

Chapter 4, Exploring the Collection API, discusses various collection abstractions that are provided by the standard Scala library. We focus on eagerly evaluated collections in this chapter.

Chapter 5, Lazy Collections and Event Sourcing, is an advanced chapter that discusses two types of lazy sequences: views and streams. We also give a brief overview of the event sourcing paradigm.

Chapter 6, Concurrency in Scala, discusses the importance of writing robust concurrent code. We dive into the Future API that is provided by the standard library, and introduce the Task abstraction from the Scalaz library.

Chapter 7Architecting for Performance, this closing chapter combines deeper knowledge on previously covered topics and explores CRDTs as building blocks for distributed systems. This chapter also explores load control policies with the free monad to build systems with bounded latency characteristics when facing high throughput.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset