Prepare to develop a website for an e-store in your spare time. You must be able to cope with large data volumes and high concurrency. I will record the entire process of implementation and share it with you through my blog. Of course, the website of this e-store will also be open-source for free at the end. I hope you can make a lot of bricks.
What functional modules are our e-stores ready to implement?
Detailed description. Let's talk about it later in the next chapter ......
First of all, from the perspective of architecture, we adopt a four-layer service-oriented architecture:
A standard layer-4 architecture consists of the following four parts:
In terms of physical deployment, we adopt distributed deployment:
Our goal is to achieve high concurrency with the increase of access traffic without changing the program and increasing the number of servers.
Customer:
The customer accesses the Web application server of our store from the browser;
Store web applications use the Windows_Server_AppFabric technology to cache some of the data with low-Timeliness changes and share the sessionstate.
In addition, mobile phones and winform programs can access the distributed service's AppFabric server to through the wcf technology.
Deploy the distributed cache of Web applications and the AppFabric server that provides distributed services to maximize server resource savings.
The database adopts the principle of read/write separation:
2. Place the order information in "from database 2". On the order query page, directly from the database.
3. Both "Slave database 1" and "Slave database 2" will be synchronized to the master database at the right time.
4. We will develop different services based on the business, and different services can use more slave databases to facilitate future expansion.
The image server provides the image sharing service through second-level domain names.
Background administrator:
The Administrator accesses our background application server from a browser and manages the resources of image servers (image servers) and database servers (data servers) through background applications.
Now, I think you should understand (1) Why the background applications directly access the business logic layer, while the store applications need to access the business logic layer through the service layer, as the data access volume increases, we can deploy the service on multiple servers as required to relieve the access pressure, without increasing the access volume of background applications.
Then, from the perspective of project components, we create 10 projects:
App-e-store front-end page display
Is a BS architecture project. Select the latest MVC4 framework.
BLL-business logic
Business logic operations, including business processing and transactions.
DAL-Data Access
Database Access operations, data entities, data validation, using Entity Framework.
IBLL -- business interface
APIs and service contracts exposed by methods at the business logic layer. For example, App project and Shop project.
Common -- public component
Common auxiliary methods used by the entire application.
ModelingProject -- Model Design
The legend of the design project, such as the structural diagram.
WcfHost -- service host
Provides a host for the e-store front-end system services, using Microsoft WCF technology.
WFActivitys -- workflow activity Layer
Defines workflow activities and uses Microsoft WF technology.
WFDesigner-workflow designer
The implementer configures the workflow designer freely and uses Microsoft WPF technology.
Shop -- electronic store background application
Is a BS architecture project. Select the latest MVC4 framework. Use the EasyUI script library.
Type Selection
Tool Selection VS2010 SP1 + SQL Server2008 + wolf Ben Code Generator
Technology Selection EF + WF + WCF + MVC4 + EasyUI
References
Windows_Server_AppFabric
Langben Code Generator
Text/ben @ langben @ com