Reactive响应式编程Spring webFlux

栏目: Java · 发布时间: 6年前

内容简介:响应式编程的概念,有很多种定义,我摘录部分如下:作者:慕课网链接:https://www.jianshu.com/p/4676d0646317

# Reactive响应式编程

1. 概念

响应式编程的概念,有很多种定义,我摘录部分如下:

  • Reactive编程是一种通过将智能路由和事件消费组合起来改变行为的微架构风格
  • Reactive响应式(反应式)编程 是一种新的编程风格,其特点是异步或并发、事件驱动、推送PUSH机制以及观察者模式的衍生。
  • Reactive 是异步非阻塞编程;Reactive 能够提升程序性能;Reactive 解决传统编程模型遇到的困境
  • Reactive programming is a declarative programming paradigm concerned with data streams and the propagation of change. With this paradigm it is possible to express static (e.g. arrays) or dynamic (e.g. event emitters) data streams with ease, and also communicate that an inferred dependency within the associated execution model exists, which facilitates the automatic propagation of the changed data flow.

作者:慕课网

链接:https://www.jianshu.com/p/4676d0646317

来源:简书

简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

我的简单理解就是,可以将事件的消费可以异步委托给耦合性比较强消费者来处理。不管请求的响应,还是结果的反馈都可以认为事件主动地push给相应的消费者,这种响应式编程方式可以带来极大的性能提高。

http://www.easysb.cn/2019/04/292.html

2. 几篇介绍文字

3. Spring中的Reactive技术栈

  • [https://spring.io/] (https://spring.io/)

Spring Boot 2.0提供了 Reactive Statck 的编程 Spring WebFlux 。以下摘自官网描述:

evelopers are constantly challenged with choosing the most effective runtime, programming model, and architecture for their application’s requirements and team’s skill set. For example, some use cases are best handled by a technology stack based on synchronous blocking I/O architecture, whereas others would be better served by an asynchronous, nonblocking stack built on the reactive design principles described in the Reactive Streams Specification.

Reactive Spring represents a platform-wide initiative to deliver reactive support at every level of the development stack: web, security, data, messaging, etc. Spring Framework 5 delivers on this vision by providing a new reactive web stack called Spring WebFlux, which is offered side by side with the traditional Spring MVC web stack.


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

代码整洁之道

代码整洁之道

[美]Robert C. Martin / 韩磊 / 人民邮电出版社 / 2010-1-1 / 59.00元

软件质量,不但依赖于架构及项目管理,而且与代码质量紧密相关。这一点,无论是敏捷开发流派还是传统开发流派,都不得不承认。 本书提出一种观念:代码质量与其整洁度成正比。干净的代码,既在质量上较为可靠,也为后期维护、升级奠定了良好基础。作为编程领域的佼佼者,本书作者给出了一系列行之有效的整洁代码操作实践。这些实践在本书中体现为一条条规则(或称“启示”),并辅以来自现实项目的正、反两面的范例。只要遵......一起来看看 《代码整洁之道》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具