官术网_书友最值得收藏!

Early reactive solutions in Spring

We have previously mentioned that there are a lot of patterns and programming techniques that are capable of becoming building blocks for the reactive system. For example, callbacks and CompletableFuture are commonly used to implement the message-driven architecture. We also mentioned reactive programming as a prominent candidate for such a role. Before we explore this in more detail, we need to look around and find other solutions that we have already been using for years.

In Chapter 1, Why Reactive Spring?, we saw that Spring 4.x introduced the ListenableFuture class, which extends the Java Future and makes it possible to leverage the asynchronous execution of operations such as HTTP requests. Unfortunately, only a handful of Spring 4.x components support the newer Java 8 CompletableFuture, which introduces some neat methods for asynchronous execution composition.

Nevertheless, Spring Framework provides other bits of infrastructure that will be very useful for building our reactive application. Let's look through some of these features now.

主站蜘蛛池模板: 甘南县| 桑植县| 拉萨市| 花莲市| 嵊泗县| 鄢陵县| 山阳县| 伊宁县| 本溪市| 锡林浩特市| 徐闻县| 仁寿县| 垫江县| 琼结县| 简阳市| 开远市| 波密县| 盐津县| 什邡市| 临颍县| 朝阳市| 宣化县| 东光县| 从江县| 凯里市| 拉萨市| 开化县| 九寨沟县| 资中县| 隆尧县| 老河口市| 永新县| 宣威市| 蒙城县| 墨江| 扶沟县| 工布江达县| 太和县| 陇西县| 宁乡县| 扎赉特旗|