Vert.x in Action: Asynchronous and Reactive Java
Vert.x in Action teaches you how to build production-quality reactive applications in Java. This book covers core Vert.x concepts, as well as the fundamentals of asynchronous and reactive programming. Learn to develop microservices by using Vert.x tools for database communications, persistent messaging, and test app resiliency. The patterns and techniques included here transfer to reactive technologies and frameworks beyond Vert.x.

Summary
As enterprise applications become larger and more distributed, new architectural approaches like reactive designs, microservices, and event streams are required knowledge. The Vert.x framework provides a mature, rock-solid toolkit for building reactive applications using Java, Kotlin, or Scala. Vert.x in Action teaches you to build responsive, resilient, and scalable JVM applications with Vert.x using well-established reactive design patterns.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the technology
Vert.x is a collection of libraries for the Java virtual machine that simplify event-based and asynchronous programming. Vert.x applications handle tedious tasks like asynchronous communication, concurrent work, message and data persistence, plus they’re easy to scale, modify, and maintain. Backed by the Eclipse Foundation and used by Red Hat and others, this toolkit supports code in a variety of languages.

About the book
Vert.x in Action teaches you how to build production-quality reactive applications in Java. This book covers core Vert.x concepts, as well as the fundamentals of asynchronous and reactive programming. Learn to develop microservices by using Vert.x tools for database communications, persistent messaging, and test app resiliency. The patterns and techniques included here transfer to reactive technologies and frameworks beyond Vert.x.

What's inside

Building reactive services
Responding to external service failures
Horizontal scaling
Vert.x toolkit architecture and Vert.x testing
Deploying with Docker and Kubernetes

About the reader
For intermediate Java web developers.

About the author
Julien Ponge is a principal software engineer at Red Hat, working on the Eclipse Vert.x project.

Table of Contents

PART 1 - FUNDAMENTALS OF ASYNCHRONOUS PROGRAMMING WITH VERT.X

1 Vert.x, asynchronous programming, and reactive systems

2 Verticles: The basic processing units of Vert.x

3 Event bus: The backbone of a Vert.x application

4 Asynchronous data and event streams

5 Beyond callbacks

6 Beyond the event bus

PART 2 - DEVELOPING REACTIVE SERVICES WITHT VERT.X

7 Designing a reactive application

8 The web stack

9 Messaging and event streaming with Vert.x

10 Persistent state management with databases

11 End-to-end real-time reactive event processing

12 Toward responsiveness with load and chaos testing

13 Final notes: Container-native Vert.x
1138017852
Vert.x in Action: Asynchronous and Reactive Java
Vert.x in Action teaches you how to build production-quality reactive applications in Java. This book covers core Vert.x concepts, as well as the fundamentals of asynchronous and reactive programming. Learn to develop microservices by using Vert.x tools for database communications, persistent messaging, and test app resiliency. The patterns and techniques included here transfer to reactive technologies and frameworks beyond Vert.x.

Summary
As enterprise applications become larger and more distributed, new architectural approaches like reactive designs, microservices, and event streams are required knowledge. The Vert.x framework provides a mature, rock-solid toolkit for building reactive applications using Java, Kotlin, or Scala. Vert.x in Action teaches you to build responsive, resilient, and scalable JVM applications with Vert.x using well-established reactive design patterns.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the technology
Vert.x is a collection of libraries for the Java virtual machine that simplify event-based and asynchronous programming. Vert.x applications handle tedious tasks like asynchronous communication, concurrent work, message and data persistence, plus they’re easy to scale, modify, and maintain. Backed by the Eclipse Foundation and used by Red Hat and others, this toolkit supports code in a variety of languages.

About the book
Vert.x in Action teaches you how to build production-quality reactive applications in Java. This book covers core Vert.x concepts, as well as the fundamentals of asynchronous and reactive programming. Learn to develop microservices by using Vert.x tools for database communications, persistent messaging, and test app resiliency. The patterns and techniques included here transfer to reactive technologies and frameworks beyond Vert.x.

What's inside

Building reactive services
Responding to external service failures
Horizontal scaling
Vert.x toolkit architecture and Vert.x testing
Deploying with Docker and Kubernetes

About the reader
For intermediate Java web developers.

About the author
Julien Ponge is a principal software engineer at Red Hat, working on the Eclipse Vert.x project.

Table of Contents

PART 1 - FUNDAMENTALS OF ASYNCHRONOUS PROGRAMMING WITH VERT.X

1 Vert.x, asynchronous programming, and reactive systems

2 Verticles: The basic processing units of Vert.x

3 Event bus: The backbone of a Vert.x application

4 Asynchronous data and event streams

5 Beyond callbacks

6 Beyond the event bus

PART 2 - DEVELOPING REACTIVE SERVICES WITHT VERT.X

7 Designing a reactive application

8 The web stack

9 Messaging and event streaming with Vert.x

10 Persistent state management with databases

11 End-to-end real-time reactive event processing

12 Toward responsiveness with load and chaos testing

13 Final notes: Container-native Vert.x
49.99 In Stock
Vert.x in Action: Asynchronous and Reactive Java

Vert.x in Action: Asynchronous and Reactive Java

by Julien Ponge
Vert.x in Action: Asynchronous and Reactive Java

Vert.x in Action: Asynchronous and Reactive Java

by Julien Ponge

Paperback

$49.99 
  • SHIP THIS ITEM
    In stock. Ships in 6-10 days.
  • PICK UP IN STORE

    Your local store may have stock of this item.

Related collections and offers


Overview

Vert.x in Action teaches you how to build production-quality reactive applications in Java. This book covers core Vert.x concepts, as well as the fundamentals of asynchronous and reactive programming. Learn to develop microservices by using Vert.x tools for database communications, persistent messaging, and test app resiliency. The patterns and techniques included here transfer to reactive technologies and frameworks beyond Vert.x.

Summary
As enterprise applications become larger and more distributed, new architectural approaches like reactive designs, microservices, and event streams are required knowledge. The Vert.x framework provides a mature, rock-solid toolkit for building reactive applications using Java, Kotlin, or Scala. Vert.x in Action teaches you to build responsive, resilient, and scalable JVM applications with Vert.x using well-established reactive design patterns.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the technology
Vert.x is a collection of libraries for the Java virtual machine that simplify event-based and asynchronous programming. Vert.x applications handle tedious tasks like asynchronous communication, concurrent work, message and data persistence, plus they’re easy to scale, modify, and maintain. Backed by the Eclipse Foundation and used by Red Hat and others, this toolkit supports code in a variety of languages.

About the book
Vert.x in Action teaches you how to build production-quality reactive applications in Java. This book covers core Vert.x concepts, as well as the fundamentals of asynchronous and reactive programming. Learn to develop microservices by using Vert.x tools for database communications, persistent messaging, and test app resiliency. The patterns and techniques included here transfer to reactive technologies and frameworks beyond Vert.x.

What's inside

Building reactive services
Responding to external service failures
Horizontal scaling
Vert.x toolkit architecture and Vert.x testing
Deploying with Docker and Kubernetes

About the reader
For intermediate Java web developers.

About the author
Julien Ponge is a principal software engineer at Red Hat, working on the Eclipse Vert.x project.

Table of Contents

PART 1 - FUNDAMENTALS OF ASYNCHRONOUS PROGRAMMING WITH VERT.X

1 Vert.x, asynchronous programming, and reactive systems

2 Verticles: The basic processing units of Vert.x

3 Event bus: The backbone of a Vert.x application

4 Asynchronous data and event streams

5 Beyond callbacks

6 Beyond the event bus

PART 2 - DEVELOPING REACTIVE SERVICES WITHT VERT.X

7 Designing a reactive application

8 The web stack

9 Messaging and event streaming with Vert.x

10 Persistent state management with databases

11 End-to-end real-time reactive event processing

12 Toward responsiveness with load and chaos testing

13 Final notes: Container-native Vert.x

Product Details

ISBN-13: 9781617295621
Publisher: Manning
Publication date: 12/01/2020
Pages: 336
Product dimensions: 7.38(w) x 9.25(h) x 0.70(d)

About the Author

Julien Ponge is a Principal Software Engineer at Red Hat, working on reactive things and the Eclipse Vert.x project. He is on-leave from INSA Lyon where he was an Associate Professor in computer science and engineering, and he remains a research member of the CITI Laboratory. Drawing on his strong background in distributed systems and long-standing open source experience, he’s a regular speaker at user groups and conferences about Vert.x. He’s also the principal author of A gentle guide to asynchronous programming with Eclipse Vert.x for Java developers, which is part of the Vert.x core documentation.

Table of Contents

Foreword xv

Preface xvii

Acknowledgments xix

About this book xxi

About the author xxv

About the cover illustration xxvi

Part 1 Fundamentals of Asynchronous Programming with Vert.x 1

1 Vert.x, asynchronous programming, and reactive systems 3

1.1 Being distributed and networked is the norm 4

1.2 Not living on an isolated island 4

1.3 There is no free lunch on the network 5

1.4 The simplicity of blocking APIs 6

1.5 Blocking APIs waste resources, increase costs 7

1.6 Asynchronous programming with non-blocking I/O 9

1.7 Multiplexing event-driven processing: The case of the event loop 12

1.8 What is a reactive system? 15

1.9 What else does reactive mean? 17

1.10 What is Vert.x? 17

1.11 Your first Vert.x application 19

Preparing the project 19

The VertxEcho class 20

The role of callbacks 22

So is this a reactive application? 22

1.12 What are the alternatives to Vert.x? 23

2 Verticles: The basic processing units of Vert.x 27

2.1 Writing a verticle 28

Preparing the project 28

The verticle class 29

Running and first observations 30

2.2 More on verticles 32

Blocking and the event loop 32

Asynchronous notification of life-cycle events 34

Deploying verticles 36

Passing configuration data 39

2.3 When code needs to block 40

Worker verticles 40

The executeBlocking operation 41

2.4 So what is really in a verticle? 43

Verticles and their environment 43

More on contexts 43

Bridging Vert.x and non-Vert-.x threading models 46

3 Event bus: The backbone of a Vert.x application 48

3.1 What is the event bus? 49

Is the event bus just another message broker? 49

Point-to-point messaging 50

Request-reply messaging 51

Publish/subscribe messaging 51

3.2 The event bus in an example 52

Heat sensor verticle 54

Listener verticle 55

Sensor data verticle 55

HTTP server verticle 56

Bootstrapping the application 60

3.3 Clustering and the distributed event bus 60

Clustering in Vert.x 60

From event bus to distributed event bus 62

4 Asynchronous data and event streams 66

4.1 Unified stream model 67

4.2 What is back-pressure? 69

4.3 Making a music-streaming jukebox 72

Features and usage 73

HTTP processing: The big picture 75

Jukebox verticle basics 76

Incoming HTTP connections 77

Downloading as efficiently as possible 78

Reading MP3 files, but not too fast 80

4.4 Parsing simple streams 83

4.5 Parsing complex streams 86

4.6 A quick note on the stream fetch mode 89

5 Beyond callbacks 91

5.1 Composing asynchronous operations: The edge service example 92

Scenario 92

Heat sensor verticles 93

Snapshot sendee verticle 94

5.2 Callbacks 95

Implementation 96

Running 98

The "callback hell" is not the problem 99

5.3 Futures and promises 100

Futures and promises in Vert.x 100

Future-based APIs in Vert.x 4 102

Interoperability with CompletionStage APIs 103

Collector service with Vert.x futures 104

5.4 Reactive extensions 106

RxJava in a nutshell 106

RxJava and Vert.x 109

Collector service in RxJava 110

5.5 Kotlin coroutines 113

What is a coroutine? 114

Vert.x and Kotlin coroutines 115

Edge service with coroutines 116

5.6 Which model should I use? 118

6 Beyond the event bus 120

6.1 Revisiting heat sensors with a service API 120

6.2 Return of the RPCs (remote procedure calls) 121

6.3 Defining a service interface 122

6.4 Service implementation 124

6.5 Enabling proxy code generation 125

6.6 Deploying event-bus services 125

6.7 Service proxies beyond callbacks 126

6.8 Testing and Vertx 127

Using JUnit 5 with Vert.x 128

Testing Data Verticle 129

Running the tests 132

Part 2 Developing reactive services with Vert.x 133

7 Designing a reactive application 135

7.1 What makes an application reactive 135

7.2 The 10k steps challenge scenario 136

7.3 One application, many services 139

7.4 Service specifications 142

User profile service 142

Ingestion service 143

Activity service 144

Public API 146

User web application 148

Event stats service 148

Congrats service 149

Dashboard web application 150

7.5 Running the application 151

8 The web stack 154

8.1 Exposing a public API 155

Routing HTTP requests 155

Making HTTP requests 157

8.2 Access control with JWT tokens 159

Using JWT tokens 160

What is in JWT token? 161

Handling JWT tokens with Vert.x 162

Issuing JWT tokens with Vert.x 164

8.3 Cross-origin resource sharing (CORS) 165

What is the problem? 166

Supporting CORS with Vert.x 167

8.4 A modern web frontend 168

Vue.js 168

Vue.js application structure and build integration 169

Backend integration illustrated 171

Static content serving with Vert.x 173

8.5 Writing integration tests 174

9 Messaging and event streaming with Vert.x 179

9.1 Event-driven services beyond HTTP with Vert.x 180

What Vert.x provides 180

The middleware and services that we'll use 181

What is AMQP (and a message broker)? 181

What is Kafka? 182

9.2 Reliably ingesting messages over HTTP and AMQP 183

Ingesting from AMQP 184

Translating AMQP messages to Kafka records 185

Ingesting from HTTP 187

9.3 Sending congratulation emails 188

Listening for daily step update events 189

Sending emails 190

9.4 Integration tests 192

Ingestion testing 192

Congratulation email testing 195

10 Persistent state management with databases 199

10.1 Databases and Vert.x 200

What the Eclipse Vert.x stack provides 200

A note on data/object mapping, and why you may not always need it 201

10.2 User profile service with MongoDB 202

Data model 202

User profile API verticle and initialization 203

Validating user input 204

Adding users in MongoDB 205

Authenticating a user 209

Fetching a user's data 209

Updating a user's data 210

10.3 Activity service with PostgreSQL 211

Data model 212

Opening a connection pool 212

Life of a device update event 213

Inserting a new record 214

Generating a device's daily activity update 215

Activity API queries 216

10.4 Integration tests 217

Testing the user profile service 218

Testing the activity service API 220

Testing the activity service's event handling 222

11 End-to-end real-time reactive event processing 225

11.1 Advanced stream data processing with Kafka and RxJava 226

Enriching daily device updates to generate user updates 226

Computing device-update ingestion throughput, using time-window aggregates 228

Computing per-city trends using aggregation discriminants and time windows 230

11.2 Real-time reactive web applications 232

Forwarding Kafka records to the Vert.x event bus 233

Bridging the event bus and web applications 234

From Kafka to live web application updates 235

11.3 Streams and state 237

A stream of updates 237

Hydrating the, ranking state 238

Periodically updating rankings from the updates stream 240

12 Toward responsiveness with load and chaos testing 244

12.1 Initial experiments: Is the performance any good? 245

Some considerations before load testing 245

Simulating users with Locust 246

Load testing the API with Hey 249

12.2 Let's do some chaos engineering 253

Test plan 253

Chaos testing with Pumba 254

We are not-resilient (yet) 256

12.3 From "scalable" to "scalable and resilient" 257

Enforcing timeouts 257

Using a circuit breaker 259

Resiliency and fallback strategies 263

13 Final notes: Container-native Vert.x 268

13.1 Heat sensors in a cloud 269

Heat sensor service 270

Sensor gateway 271

Heat API 272

Deploying to a local cluster 274

13.2 Making the services work in Kubernetes 279

Building container images 279

Clustering and Kubernetes 282

Kubernetes deployment and service resources 284

13.3 First-class Kubernetes citizens 288

Health checks 288

Metrics 292

13.4 The end of the beginning 295

Index 297

From the B&N Reads Blog

Customer Reviews