In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
This series of articles indexes Responsive Spring Tao Spells
Previously on reactive programming| responsive flow
1.5 Responsive Systems 1.5.1 Responsive Manifesto
It is not difficult for friends who pay attention to "responsive" to search for an introduction to "responsive declaration." First, the above picture:
This picture embodies the wisdom and experience of many great gods. See the official website, Chinese version of the official website. If you agree with the content of this declaration, you can also sign your name. Although these contents are more conceptual and less practical, people feel that they are reading textbooks, but every word is precious, and there will be new experiences and gains from time to time.
This is also the code of conduct for boyfriends in the new era:
Responsive, to respond in a timely manner, 24 hours online, not allowed to answer the phone, WeChat reply time should be within 5 minutes; how to achieve Responsive, first of all to Resilient, that is, in any case to have a response. Even if you are playing LOL, you have to answer the phone. Even if you are speaking at the United Nations, you should set up an automatic reply of "Sorry baby, I will call you later." Another point of Responsive is Elastic, which should be flexible to deal with the arrival of a large number of commands. What happens when there are too many imperial edicts? Sorry, there is no such thing. If you can't learn three heads and six arms, pull a few friends to help. The imperial edict is delivered asynchronously. Call the florist to order flowers, order cakes at the cake shop, etc. Don't forget that the "message queue" in the shopping cart should be processed in time ~ These orders are messages with certain formats and destinations, and then wait asynchronously for express delivery.
Systems built in a responsive systems fashion are more flexible, loosely coupled and scalable. This makes them easier to develop and more open to change. Timely response to ensure a good user experience. System errors and exceptions are inevitable. When exceptions occur, handle them gracefully. Don't let them spread or even reach users.
The specific content of the declaration is very detailed on the official website, so I won't repeat it much.
From the landing aspect, it is not difficult to think of some specific technologies to support the goal of responsive declaration:
For example, today's hot cloud native and DevOps concepts and practices, as well as earlier automated operation and maintenance, all help to make the system more Elastic, but the micro-service of the system architecture is also indispensable; similar to Hystrix fuses Circuit Breaker makes the system more Resilient because it can contain service anomalies in a timely manner and avoid avalanches; cloud native applications like kubernetes can detect and rebuild abnormal services in the system in a timely manner; Message queue products such as RabbitMQ and ActiveMQ help to build message-driven systems, and play the role of decoupling, speeding up, broadcasting, and peak clipping; message-driven is conducive to system elasticity and reliability, and elasticity and reliability make system response more timely; and so on. 1.5.2 Responsive Programming and Responsive Systems
A responsive manifesto is a set of architecture and design principles that a system that conforms to these principles can be considered responsive. Responsive systems and responsive programming are different levels of content.
I saw that some articles on the Internet introduced responsive programming technologies such as RxJava and Reactor, and used responsive declarations to lead to topics, which was a little bit like a donkey's lips to a horse's mouth (^_^). Responsive systems (or responsive manifestos) and responsive programming are another pair of terms that are easily mixed together (the last pair of terms that are easily mixed are "responsive programming RP" and "functional responsive programming FRP"; see 1.3.1 lambda and functional). Although they are not as far away from each other as "Lei Feng" and "Lei Feng Tower," Java and JavaScript, they do not necessarily have a causal relationship.
As the authors of Responsive Manifesto, Jonas Bonér and Viktor Klang explain the differences and connections between responsive programming and responsive systems (translated version on "Linux China"), including an interpretation of the four principles of Responsive Manifesto, which is worth learning. Here are some of the differences:
1) The difference between tactics and strategy
Responsive programming is a subset of asynchronous programming, a paradigm with specific development libraries that focuses on logic driven by information/data flow rather than imperative control flow.
Responsive Manifesto is a set of design principles, a way of thinking about system architecture and design in distributed environments, and responsive systems are systems that conform to this architectural style.
2) Difference between event-driven and message-driven
Reactive programming--which focuses on computation over short chains of data streams--tends to be event-driven, whereas responsive systems--which focus on resiliency and reliability through communication and collaboration in distributed systems--are message-driven.
Responsive Manifesto defines the difference between message-driven and event-driven:
A message is a piece of data sent to a definite destination. An event is a signal from a component that reaches a given state. In a message-driven system, addressable recipients wait for a message to arrive and then respond to it, otherwise they remain dormant. In an event-driven system, the listener for notifications is tied to the message source so that it is invoked when the message is sent. This means that an event-driven system focuses on addressable event sources and a message-driven system focuses on addressable receivers.
3) Difference between component scope and system scope
Reactive programming's "activity scope" is within a component, a technique for managing logic and data flow within a component or service, even if the flow of data from service B to service A, as in Section 1.4.2, is not cross-service messaging, but rather API-based invocations.
Responsive systems emphasize the exchange of information between components/services and provide a principle for dealing with distributed system resilience and reliability through responsive declarations, thus being distributed system-wide oriented.
4) Difference in spatial decoupling ability
As with asynchronous invocation, event-driven responsive programming focuses on decoupling in time, thus providing a technically higher performance concurrency approach. However, its scope limits its ability to achieve spatial decoupling.
Message-driven asynchronous nature makes responsive systems capable of decoupling both temporally and spatially. Services can not only realize distributed collaboration through message queues, but also realize Auto Scaling of individual services according to load, thus realizing Elastic capability in responsive declaration.
5) Summary
Reactive programming techniques are often used for asynchronous, non-blocking processing of data flows within a single node or service. When there are multiple nodes, data consistency, cross-node communication, coordination, versioning, orchestration, failure management, separation of concerns and responsibilities, etc., need to be carefully considered-all of which are elements of a responsive system architecture.
Similarly, Spring WebFlux is a responsive programming framework for developing responsive applications, while Spring Cloud is not only a set of microservice architecture foundations adapted to today's cloud-native environment, but also closer to the goals of responsive declarations and responsive systems design principles.
However, it should also be noted that it is precisely because of the Responsive, Resilient, Elastic and Message Driven requirements of modern systems in the Responsive Manifesto that the call for responsive programming technology is getting higher and higher. In particular, with the introduction of the Reactive Streams Specification for Responsive Manifesto, reactive programming technologies such as Reactor, RxJava, VT.x, Spring WebFlux, etc. will play an increasingly important role in responsive systems.
The topic of responsive systems is relatively large, involving many concepts and technologies. This series of articles focuses primarily on the category of responsive programming and concludes with a discussion of responsive programming in Spring Cloud.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.