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

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.

主站蜘蛛池模板: 阿拉善右旗| 象州县| 五河县| 乐昌市| 南充市| 鄱阳县| 霍州市| 和静县| 九寨沟县| 宁远县| 珠海市| 克东县| 荔波县| 辽阳市| 北辰区| 新安县| 苍溪县| 简阳市| 鹤岗市| 汝州市| 左贡县| 嘉义市| 洞口县| 阿克陶县| 密山市| 吴江市| 会昌县| 静海县| 三江| 南涧| 巴彦县| 屯留县| 师宗县| 若羌县| 绥江县| 六安市| 同江市| 隆德县| 巴彦县| 玛沁县| 纳雍县|