The difference between traditional development and microservices

The difference between traditional development and microservices

1. The traditional development model

That is, all the functions are integrated in a project and then placed in a war package (Tomcat, JBoss, etc. javaEE container), which contains entities, DAO, Service, front-end pages, and all the logic

advantage

  • Development speed and high efficiency
  • Easy to test
  • There is no resource consumption that exists between calls between various functions

Disadvantage

  • Low efficiency: there may be employees A who need to call goods and services, but the login of employee B has not been written yet, waiting for each other
  • Poor stability: a function error may cause the entire project to crash
  • Difficult to maintain: For employees who are new to the project, all functions are coupled together, and I don’t know where to start.
  • Difficult to expand: once the project development language is fixed, no other development languages ​​can be used
  • wait wait wait…

Architecture diagram

img

Two, microservice architecture

Microservice is an architectural idea, and the actual use of distributed system development is to split applications according to modularization, reduce coupling, and achieve rapid development and deployment

advantage

  • It can be more convenient for division of labor and rapid development
  • It will not appear that a service is down and the entire system crashes
  • The number of services can be dynamically adjusted according to the actual number of visits
  • High scalability, different development languages ​​can be used
  • One service does only one thing, loosely coupled

Disadvantage

  • The split granularity is too large, resulting in difficulty in operation and maintenance
  • Due to the unreliability of the network, the communication cost between services increases
  • As the number of services increases, management complexity increases
  • May make double efforts and increase the difficulty of development

Architecture diagram

img

end

Author: yufire © [email protected]

Guess you like

Origin blog.csdn.net/weixin_43420255/article/details/106495233