Microservices
Microservices
-
How to separate the front and back ends
In the front-end and back-end separation architecture, the back-end only needs to be responsible for providing callable API services to the front-end according to the agreed data format. The front-end and back-end interact through HTTP requests. After the front-end obtains the data, the page is assembled and rendered, and finally returned to the browser.
| Backend | Frontend | |
| ----------------------------------------- | ------------------------------------------------- ----------- | -------------------------------------- ---------------------- |
| Server | Browser | |
| JAVA | NodeJS | JS + HTML + CSS |
| Service layer provides data interface to maintain data stability Encapsulate business logic | JS running on the server forwards data, concatenates service routing design, controls logic to render pages, and experiences more possibilities for optimization | JSCSS, JS running on the browser loads and runs DOM to operate any front-end framework and Tool sharing template, routing |
Reference from: https://www.jianshu.com/p/fc0c63404cc7 and http://2014.jsconf.cn/slides/herman-taobaoweb/index.html#/69 -
Which frameworks are microservices
Dubbo is the core framework of Alibaba's service-oriented governance, and is widely used in various member sites of Alibaba Group. Alibaba's contributions to the open source community in recent years are remarkable both at home and abroad. For example, JStorm donated to Apache and joined the Apache Foundation, which has won the face of Chinese Internet people and made Alibaba in the eyes of Chinese people. It has been upgraded from an e-commerce company to a technology company.
Spring Cloud, we can know from the name that it is the product of Spring Source. The strong endorsement of the Spring community can be said to be the most influential organization in the Java enterprise world. In addition to Spring Source, there are also Pivotal and Netfix. The backing and technical output. Among them, the whole set of microservice architecture suite open sourced by Netflix is the core of Spring Cloud.
Reference from: http://blog.didispace.com/microservice-framework/ -
How do you understand the RPC framework
Please refer to: https://www.zhihu.com/question/25536695
-
Talk about the implementation principle of RPC
First of all, there needs to be a module that handles network connection communication, which is responsible for connection establishment, management and message transmission. Secondly, there needs to be a module for encoding and decoding, because network communication is all transmitted bytecode, and the objects we use need to be serialized and deserialized. The rest is the part of the client and the server. The server exposes the service interface to be opened. The client calls a proxy implementation of the service interface. This proxy implementation is responsible for collecting data, encoding and transmitting it to the server and then waiting for the result to return.
Reference from: https://liuzhengyang.github.io/2016/12/16/rpc-principle/ -
Talk about the implementation principle of Dubbo
As an rpc framework, dubbo achieves the effect of calling remote methods just like calling them locally. How to do it? That is, there is a description of the remote method locally, including the method name, parameters, and return value. In dubbo, the remote and local use the same interface; then, there must be an encapsulation for network communication, and the communication details for the caller are It is completely invisible. What network communication needs to do is to pass the attributes of the calling method to the server through a certain protocol (in short, the message format); the server parses the calling information according to the protocol; executes the corresponding method; The return value of the method is passed to the client through the protocol; the client parses it again; in terms of calling methods, it can be divided into synchronous calls and asynchronous calls; in short, this is basically the process
Author: Beiming Youyu
Link: https://www .zhihu.com/question/52133065/answer/129153953Source
: Zhihu
The copyright belongs to the author. For commercial reprints, please contact the author for authorization, and for non-commercial reprints, please indicate the source. -
How do you understand RESTful
-
Talk about how to design a good API
-
How to understand the idempotency of RESTful APIs
-
How to ensure the idempotency of interfaces
-
Talk about CAP theorem and BASE theory
-
How to Consider Data Consistency
-
Talk about the implementation of eventual consistency
-
What do you think about microservices
-
Difference Between Microservices and SOA
-
How to split services
-
How Microservices Do Database Management
-
How to deal with chain call exceptions of microservices
http://blog.720ui.com/2017/msa_design/?utm_source=tuicool&utm_medium=referral
-
For fast tracking and locating problems
dependency log
-
Security for Microservices
distributed
-
Talk about the use of distributed scenarios in business
https://segmentfault.com/q/1010000006095431/a-1020000006114658
-
Session distributed solution
-
Distributed Lock Scenario
-
Distribution is an implementation of locks
-
Distributed transaction
-
Algorithms and Implementations of Clustering and Load Balancing
-
Talk about sub-library and sub-table design
-
Distributed dilemma and countermeasures brought by sub-database and sub-table
safe question
-
Security Elements and STRIDE Threats
-
Protection against common web attacks
-
Server communication security attack and defense
-
Analysis of the principle of HTTPS
-
HTTPS downgrade attack
-
Authorization and Authentication
-
role-based access control
-
Data-Based Access Control
performance optimization
-
What are the performance indicators
-
How to spot performance bottlenecks
-
Common means of performance tuning
-
Talk about how you perform performance tuning in your project