Technical characteristics of e-commerce industry
Ø New technology
Ø wide range of technology
Ø distributed
Ø high concurrency, clustering, load balancing, high availability
Ø Massive data
Ø Business Complexity
Ø system security
Distributed: One thing, take it apart
Cluster: The same thing, we do 1 together. Amoy-Amoy Mall system function 1.1. System function Diagram
1. system Architecture 1.1. Legacy architecture 1.1.1.500 Concurrency
Problems that exist:
1. High function Coupling degree
2. High system maintenance cost
3, if the concurrency is large, can not solve the problem of high concurrency
E-commerce high concurrency of more than 1000
Problems that exist:
1, the system can not be effectively horizontal expansion (cluster cannot be for the function module) Figure 5.1
2, the user has the problem of repeated login
For the 2nd: Need session sharing, is the form of the session broadcast, comparative consumption of resources, broadband.
If you want to reach 10000 concurrency
20 servers are required to do the Tomcat cluster. When the number of nodes in the Tomcat cluster increases, the service capacity increases first and then decreases.
So the number of nodes in the cluster can not be too much, generally also about 5.
You need to split the system according to the function points, split into separate functional engineering, you can add a server to a node alone, need to cooperate between the system to complete the entire business logic this is called distributed.
Cluster: Equivalent to the same project code copy multiple deployments to multiple servers, each running independently of each server.
Distributed architecture:
The system is divided into several subsystems according to the module, and multiple subsystems cooperate to complete the communication between the business process system.
Advantages:
1, the module split, the use of interface communication, reduce the coupling between the modules.
2, split the project into several sub-projects, different teams responsible for different sub-projects.
3, increase the function only need to add a sub-project, call other system interface can.
4, can be flexibly distributed deployment.
Disadvantages:
1, the interaction between the system needs to use remote communication, need to develop interfaces, increase the workload.
2, each module has some common business logic cannot be common. 1.1.1.
SOA-based architecture
Soa:service Oriented Architecture service-oriented architecture. That is, the project is divided into service layer engineering, performance layer engineering. The service layer contains the business logic that only needs to be served externally. The presentation layer only requires processing and page interaction, and the business logic is implemented by invoking service layer services. Projects can be deployed independently.
1.1. Amoy Mall System Architecture
2. Technology selection and development environment 2.1. Technology selection
Øspring, SPRINGMVC, Mybatis
øjsp, JSTL, JQuery, Easyui, Kindeditor (Rich Text editor)
Øredis (cache server, Single sign-on, shopping cart)
ØSOLR (search)
ØDUBBO (Distributed service Framework)
Øhttpclient (HTTP protocol access client)
ØACTIVEMQ (Message Queuing)
Øquartz (Scheduled Tasks)
Øfastdfs (Image server)
Øfreemarker (web Static)
Ønginx (reverse proxy server)
Ømycat (Database middleware) 2.2. Development tools version and Environment
Øeclipse mars.2
Ømaven 3.3.9
Øtomcat 7.0.72 (Maven Tomcat Plugin)
ØJDK 1.7
Ømysql 5.7
Ødubbo 2.5.3
Ønginx 1.8.0
Øredis 3.0.0
ØACTIVEMQ 5.13.0
Øwin7 Operating System
ØSVN (Version Management)