Spring Cloud introduction (a)

Studied for some time to prepare the Spring Boot Spring Cloud marching, corporate structure and projects to embrace the Spring Cloud. After use for some time to find Spring Cloud decreased from the technical architecture requirements for building large systems, so we are at a very low cost (technology or hardware) to build an efficient, distributed, fault-tolerant platform, but also Spring Cloud not without drawbacks, small independent projects are not suitable for use.

Spring Cloud What the hell?

Spring Cloud is an ordered collection of a series of frames. It uses facilitate the development of Spring Boot cleverly simplify the development of distributed systems infrastructure, such as service discovery registration, distribution center, message bus, load balancing, circuit breakers, monitoring and other data, can be done with a style of development of Spring Boot and a key to start the deployment. Spring is not reinventing the wheel, it just will present each company developed more mature, and can withstand the test of actual service framework combined, re-packaged masked a complex configuration and implementation of the principles by Spring Boot style, eventually to develop to set aside a set of easy to understand, easy to deploy and easy maintenance of distributed systems development kit.

Micro service can be deployed independently, horizontal expansion, unique visitors (or a separate database) services unit, springcloud that these micro butler service, using the service after this micro-architecture, the number of projects will be very much, springcloud do for the housekeeper need to manage these micro naturally takes a lot of younger brother to help.

The main younger brother: Spring Cloud Config, Spring Cloud Netflix (Eureka, Hystrix, Zuul, Archaius ...), Spring Cloud Bus, Spring Cloud for Cloud Foundry, Spring Cloud Cluster, Spring Cloud Consul, Spring Cloud Security, Spring Cloud Sleuth, Spring Cloud Data Flow, Spring Cloud Stream, Spring Cloud Task, Spring Cloud Zookeeper, Spring Cloud Connectors, Spring Cloud Starters, Spring Cloud CLI, each brother was pregnant with unique skills do the following martial arts introduced one by one.

Core member

Spring Cloud Netflix

This is a big boss, second only to the boss, the boss of the services rely on, and it is integrated with a variety of Netflix OSS components form the core of micro-services, and its little brother the main Eureka, Hystrix, Zuul, Archaius ... too much

Netflix Eureka

Service center, the cloud service discovery, a REST-based services, for location services, the intermediate layer in order to achieve the cloud service discovery and failover. But the most bovine springcloud brother, service centers, and any other younger brother need to support what needs to come and collect from here, the same you have any unique martial arts have been reported quickly, conveniently after the other brother to call; it benefits you What brother does not need to find a variety of direct support, simply go to the service center to receive, support does not need to know where the other brother, still a few little brother to support, anyway, make use of the line, the service center to ensure stability and quality.

Netflix Hystrix

Fuse, fault management tool designed to control node services and third-party libraries by fusing mechanism, thereby providing a more robust fault tolerance for delay and failure. For example, after a sudden illness brother, but you also need to support it, then call it a long time does not respond, you do not know, this has been the response so on; there are other younger brother is also possible to call your martial arts skills, so after a request and more serious blockage occurs affect the overall plan of the boss. This time Hystrix comes in handy when Hystrix find a younger brother is not in an unstable state immediately it flew off the assembly line, so that the other brother to come on top, or to say you do not have to wait this brother is certainly not today, why the rush why do not go in this line up.

Netflix Zuul

Zuul is provided on a cloud platform, dynamic routing, monitoring, frame flexibility, security and other edge services. Zuul is equivalent to the front door all the requested Web site and back-end equipment Netflix streaming applications. When other martial brother act must first come to pass zuul, look there with a knife or something to go back to intercept, or directly to the need to find the little brother with the past.

Netflix Archaius

Configuration management of the API, the API includes a series of configuration management, dynamic type attribute, a thread-safe configuration operation, the polling frame, the callback mechanism functions. Do not need to restart the service after the acquisition enables dynamic configuration, the principle is every 60s (default, configurable) reads configuration from a content source, modify the configuration file so that you can make the modified content into effect, the premise of using the API to archaius read.

Spring Cloud Config

Commonly known as the distribution center, configuration management tool kit, so you can put into a remote server configuration, centralized management cluster configuration currently supports local storage, Git and Subversion. After the weapon is something we, what gun fire are concentrated put together, do not just bring their own, to facilitate future unified management, upgrade equipment.

Spring Cloud Bus

Event, message bus for the cluster (e.g., configuration change event) and the propagation state change, may be combined to achieve thermal Spring Cloud Config deployment. Water Margin is equivalent to eight hundred years of Sino-Japanese row News Attack Dai Zong, to ensure the smooth flow of information between the various maintained brother.

Spring Cloud for Cloud Foundry

Cloud Foundry is VMware introduced the industry's first open source PaaS cloud platform that supports a variety of frameworks, languages, runtime environment, the cloud platform and application services that enable developers to deploy and scale applications in a matter of seconds, no need to worry about any infrastructure problems

In fact, a set of integrated solutions and CloudFoundry, hold Cloud Foundry thigh.

Spring Cloud Cluster

Spring Cloud Cluster will replace Spring Integration. Support provided basic functions in distributed systems, clusters need, such as: state elections, the cluster consistency, abstract patterns and realize common state of the global lock, tokens and so on.

If different gangs organized into a unified whole, Spring Cloud Cluster has helped you a lot of convenience tools into a unified organization.

Spring Cloud Consul

Consul is a multi-distributed high-availability data center services to discover and configure shared services software, be based on open source Mozilla Public License 2.0 HashiCorp agreement by the company with the Go language development. Consul support health checks and allow HTTP and DNS protocols call the API to store key-value pairs.

Spring Cloud Consul Consul encapsulates operation, Consul is a service discovery and configuration tools can be seamlessly integrated with Docker containers.

Other brother

Spring Cloud Security

Add security controls for your application based on spring security security toolkit. The younger brother is responsible for security issues bovine whole gang, set different sects access to specific resources, we can not Cheats holy canon leaked.

Spring Cloud Sleuth

Log collection kit, a package Dapper and log-based tracking, and Zipkin and HTrace operation, to achieve a solution for distributed tracking SpringCloud applications.

Spring Cloud Data Flow

  • Data flow is used to develop and execute a wide range of data processing mode that includes ETL, batch operation and continuous operation of the unified programming model and hosting services.

  • For micro-service program in modern operating environments that can be combined for, Spring Cloud data flow is a native cloud can be allocated to services. Use Spring Cloud data flow, the developer can be extracted as image data, real-time analysis, and data import / export and this common use cases to create a data channel allocation (data pipelines).

  • Spring Cloud data flow is a native cloud-based redesign of the spring XD, the project aims to simplify the development of large data applications. Reconstructed stream and batch Spring XD modules are based on the stream and Spring Boot task / batch micro service program. These programs are now automatically deploy units and their native support like a modern operating environment Cloud Foundry, Apache YARN, Apache Mesos and Kubernetes and so on.

  • Spring Cloud data flow provides a range of models and best practices based on distributed data stream processing and batch micro-channel services.

Spring Cloud Stream

Spring Cloud Stream is a framework to create a message-driven micro-services applications. Spring Cloud Stream is created based on the Spring Boot, used to create a separate / industrial spring applications, use the connection spring integration between the provider and the message broker. Dataflow operations development package, a package that message transmission and Redis, Rabbit, Kafka like.

A business will involve a number of tasks, between tasks is triggered by an event, this is the Spring Cloud stream to be doing things

Spring Cloud Task

Spring Cloud Task mainly to solve the short-lived micro-services task management, task scheduling of work, for example, some regular tasks and run once in the evening, or an interim data analysis run times.

Spring Cloud Zookeeper

ZooKeeper is a distributed, open-source coordination service for distributed applications, is an open source implementation of Google's Chubby, is a key component of Hadoop and Hbase. It is to provide a consistent service for distributed applications, provides features include: configuration maintenance, domain name service, distributed synchronization, group services. ZooKeeper goal is to better encapsulate complex error-prone critical services, the easy to use interface and efficient performance, function and stability of the system to the user.

Zookeeper operations toolkit for using the service zookeeper way of discovery and configuration management, hold Zookeeper thigh.

Spring Cloud Connectors

Spring Cloud Connectors simplifies the process of connecting to the service and the process of acquiring the operation from the cloud platform, highly scalable, you can build your own cloud platform leverages Spring Cloud Connectors.

Drive to facilitate various applications of PaaS is connected to the rear end, such as: database and message broker service.

Spring Cloud Starters

Spring Boot-style start-up projects, providing dependency management out of the box for the Spring Cloud.

Spring Cloud CLI

Based on Spring Boot CLI, allows you to quickly create command line cloud components.

What is the relationship and Spring Boot

Spring Spring Boot is a fast configuration of scaffolding, based on Spring Boot quickly develop a single micro-services, Spring Cloud is a cloud-based application development tool Spring Boot implemented; Spring Boot focus on fast, easy integration of a single individual, Spring Cloud is service governance framework of global concern; Spring Boot uses the default configuration is greater than the concept, many programs have been integrated to help you choose well, could not configure not configured, Spring Cloud large part is based on the Spring Boot to achieve, it can not be based on Spring Boot it? Not.

Spring Boot can leave Spring Cloud development projects independently, but can not do without Spring Cloud Spring Boot, belonging to the dependent relationship.

spring -> spring boot> Such relationships Spring Cloud.

Spring Cloud advantages

So many micro-services framework such as: dubbo, Kubernetes, Why is it necessary to use Spring Cloud?

  • Output in the spring large family, spring invincible in enterprise development framework, a large backing, can guarantee the subsequent update and improve. For example dubbo now almost dead
  • Spring Boot have this independent go-getters can save a lot of things, large and small, are engaged in a living Spring Boot pretty good.
  • As a big guy micro-governance service, consider the very comprehensive, almost all aspects of service management are taken into account, and to facilitate the development of out of the box.
  • Spring Cloud activity is high, the tutorial is very rich, a problem is easy to find solutions
  • Easily few lines of code to complete the various platform capabilities fuse, load balancing, service center

Spring Cloud Internet for small and medium sized companies, is a blessing, because these companies often do not have the strength or there is not enough funding to develop their own distributed systems infrastructure, using Spring Cloud-stop solutions in business calmly while the development of greatly reducing development costs. Meanwhile, in recent years, with the popular micro-service architecture and concepts Docker containers, it makes Spring Cloud in the future more and more "cloud" of software development style of a neutral place, especially in a wide variety of solutions are currently distributed in It offers a standardized, full-stop technical solution, meaning may be comparable to the birth of the current Servlet specification, effectively promote the progress of the technical level of the server software system.

 

 

Sample Code -github

Sample code - Code Cloud


Author: pure smile
Source: http://www.ityouknow.com/ 
All journal authors, please indicate the source

Guess you like

Origin www.cnblogs.com/holly8/p/10930773.html