Reactive systems is a term used to describe an architectural style that enables applications composed of multiple microservices to work together in order to better react to their surroundings and to one another. They're designed to be more elastic, resilient, and responsive by utilizing asynchronous message-driven communication, which are useful characteristics for many different systems and applications. This has resulted in this architecture type significantly growing in popularity recently, especially with even more applications turning cloud-native. However, this paradigm can often be hard to clearly get your head around, and it's not always clear how to get started implementing these reactive principles.
Upon completion of this learning path, you will:
- Have a greater understanding of what reactive systems are
- Understand the differences between the various reactive terms that are used under the umbrella term of "reactive"
- Understand why reactive is beneficial to creating truly asynchronous and non-blocking applications
- Learn how tools like MicroProfile can be used to implement reactivity within an application
- Learn how reactive applications can be implemented on various supporting runtimes, like Open Liberty and Quarkus
- Understand the steps needed to transform applications into asynchronous, reactive, microservice-based systems
- Get hands-on with reactive APIs
This learning path is designed to give developers an introduction to reactive systems. However, a basic understanding of microservices and application architecture would be helpful. You will also need an understanding of command lines in order to undertake the tutorials included in this learning series.
Estimated time to complete
Approximately 2.5 hours
The following items make up this learning path:
General introduction to reactive systems
Getting started with reactive systems (Article)
Get an introduction to what reactive systems are, and find pointers to further resources to get you started with reactive systems.
Get a guided tour of the reactive manifesto and the key characteristics associated with reactive systems. See how key reactive concepts relate to nature through the analogy of bees for a memorable and simplistic comparison. (You can also gain more insights from developer advocates discussing reactive programming and reactive systems in this video.)
Defining the term reactive (Article)
Understand and learn to differentiate between reactive terminology, including Reactive programming, Reactive Systems, Reactive Streams, Reactive Messaging, and more.
Learn why and how to transform synchronous communication into asynchronous, reactive communication within an application using the Eclipse MicroProfile specification.
Get hands-on with reactive using MicroProfile
Creating Reactive Java microservices with Open Liberty and MicroProfile (Open Liberty guide)
Learn how to build reactive microservices that can send requests to other microservices, and asynchronously receive and process the responses. Use an external messaging system (Apache Kafka) to handle the asynchronous messages that are sent and received between the microservices as streams of events. MicroProfile Reactive Messaging makes it easy to write and configure your application to send, receive, and process the events efficiently.
Consuming RESTful services asynchronously with template interfaces (Open Liberty guide)
Building off the same system/inventory application, learn how to build a MicroProfile Rest Client to access remote RESTful services using asynchronous method calls. Update the template interface for a MicroProfile Rest Client, which maps to the remote service that you want to call to use the CompletionStage return type. A CompletionStage interface allows you to work with the result of your remote service call asynchronously.
Integrating RESTful services with a reactive system (Open Liberty guide)
Utilizing the same system/inventory application, learn how to integrate RESTful Java microservices with a reactive system by using MicroProfile Reactive Messaging. RESTful Java microservices don't use reactive concepts, so you will learn how to bridge the gap between the two using the RxJava library. In this guide, you will modify two microservices in an application so that when a user hits the RESTful endpoint, the microservice generates producer events.
MicroShed testing for reactive, cloud-native applications (Open Liberty guide)
Learn how to test your reactive system/inventory application in an environment that is as true to production as possible. By completing this guide, you will learn how to write integration tests for reactive Java microservices and how to run the tests in true-to-production environments by using containers with MicroShed Testing. MicroShed Testing tests your containerized application from outside the container so that you are testing the exact same image that runs in production.
If you would like to try deploying your reactive system/inventory application to OpenShift, then be sure to check out the second interactive lab within this tutorial. The first interactive lab will also give you experience deploying a Quarkus-based reactive application to OpenShift as well.
Get hands-on with reactive using Quarkus
Take a look at a reactive demo application built using the runtime Quarkus, and learn how to deploy this reactive, cloud-native application. The article also references several external blogs detailing how to build reactive applications using Quarkus.
Transform monolithic applications into reactive, microservice-based systems
Learn how to transform a monolithic demo application into a reactive, asynchronous application. The tutorials in this series cover patterns like CQRS, event sourcing, domain-driven design (DDD), and more.