In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article focuses on "how to understand the Java micro-service framework", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to understand the Java micro-service framework.
1. What are the frameworks of microservices
1) Dubbo is the core framework of Alibaba's service-oriented governance, and is widely used in the member sites of Alibaba Group. 2) it is the product of Spring Source, and the strong endorsement of the Spring community can be said to be the most influential organization in the Java business community. In addition to Spring Source, Pivotal and Netfix are its strong backing and technology output. Netflix's open source micro-service architecture suite is the core of Spring Cloud.
2. How to separate the front and rear ends
In the front-end separation architecture, the back-end is only responsible for providing callable API services to the front-end according to the agreed data format. The front and back end interact with each other through HTTP request. After obtaining the data, the front end assembles and renders the page, and finally returns it to the browser.
3. The realization principle of RPC.
First of all, there needs to be a module to deal with network connection communication, which is responsible for connection establishment, management and message transmission. Secondly, we need to have codec module, because network communication is the bytecode of transmission, and we need to serialize and deserialize the objects we use. The rest is the client side and the server side, the server side exposes the service interface to be open, and the client invokes a proxy implementation of the service interface, which is responsible for collecting data, encoding and transmitting it to the server and waiting for the results to return.
4. How to deal with the failure of Dubbo service request
Dubbo starts with default retry mechanism and timeout mechanism. If the service does not respond within the specified request time, the request is considered to have failed. If within the configured number of retries, Dubbo will resend the request after the request fails. If the request has not been successfully retried beyond the number of failed requests, the request will fail and an exception will be thrown.
5. What are the differences between Dubbo and SpringCloud?
Dubbo is the soa (service-oriented architecture) and SpringCloud is the micro-service architecture.
Dubbo is based on RPC (remote procedure call) and SpringCloud is based on Restful. The underlying layer of the former is tcp connection and the latter is http. In the case of a large number of requests, the response time of dubbo is shorter than that of springcloud.
Dubbo provides less functions than springcloud,springcloud provides a complete set of micro-service governance solutions, such as service breaker, monitoring, tracking, configuration center and so on.
6. What is the difference between Soa and micro-service architecture?
Micro-service is developed on the basis of Soa. In terms of granularity, micro-service is finer than SOA. Because of the finer granularity of micro-service, the coupling degree of micro-service architecture is lower than that of SOA architecture. The service scale of micro-service is generally larger than that of SOA, and the concurrency capacity of micro-service is also higher.
At this point, I believe you have a deeper understanding of "how to understand the Java micro-service framework". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.