Copyright: Attribution, allow others to create paper-based, and must distribute paper (based on the original license agreement with the same license Creative Commons )
1.1. Projects
- Le gifted Mall is a whole category of electricity supplier shopping site (B2C).
- Users can purchase online merchandise, Add to Cart, Order, commodity spike
- Comments can already buy goods
- Administrators can manage commodity in the background of the upper and lower planes, promotional activities
- Administrators can monitor merchandise sales
- Customer Service can process your refund in the background
- We hope the next 3-5 years to support millions of users use
1.2. System Architecture
1.2.1. Chart
1.2.2. Interpretation System Architecture
Excellent music throughout the mall can be divided into two parts: the back office, front portal system.
- Backstage management:
- Background system mainly includes the following features:
- Merchandise management, including management information commodity classification, brand, product specifications, etc.
- Sales management, including order statistics, order processing refunds, and other promotional activities to generate
- User management, including user control, freeze, unlock, etc.
- Rights management, access control entire site, using JWT authentication scheme, and the API for user access control
- Statistics, statistical analysis of various data show
- Background front and rear end of the separator will be developed, and the entire background management system uses a single page of Structures Vue.js Application (SPA).
- preview:
- Background system mainly includes the following features:
- Front door
- Front-facing customer portal, containing all the functions to interact with customers. E.g:
- Search products
- add to Shopping Cart
- Order
- Evaluation of merchandise, etc.
- Reception system we use in conjunction with Vue Nuxt complete page development. For SEO optimization considerations, we will not use a single-page application.
- Front-facing customer portal, containing all the functions to interact with customers. E.g:
Whether foreground or background system, all share the same micro-cluster service, including:
- Goods Micro services: commodities and commodity classification, brand, inventory and other services
- Search Micro Services: the search function
- Orders Micro Services: the order-related
- Cart Micro Services: the cart-related functions
- Users: Users log on registration and other functions
- Certification Center: user rights and permissions certification services
- Eureka registry
- Zuul Gateway Service
- Spring Cloud Config configuration center
- …
1.3 Technical Selection
1.3.1 Related Art
Front-end technology:
- Basic HTML, CSS, JavaScript (based ES6 standard)
- Vue.js 2.0 UI framework based on Vue: Vuetify
- 前端构建工具:WebPack
- 前端安装包工具:NPM
- Vue脚手架:Vue-cli
- Vue路由:vue-router
- ajax框架:axios
- 基于Vue的富文本框架:quill-editor
后端技术:
- 基础的SpringMVC、Spring 5.0和MyBatis3
- Spring Boot 2.0.1版本
- Spring Cloud 最新版 Finchley.RC1
- Redis-4.0
- RabbitMQ-3.4
- Elasticsearch-5.6.8
- nginx-1.10.2
- FastDFS - 5.0.8
- MyCat
- Thymeleaf
- JWT
1.3.2.技术解读
上面的技术组合可以在项目中解决以下电商中的典型问题:
- 利用Node.js及Vue.js技术栈,实现前后端分离开发
- 利用SpringCloud技术栈,实现真正的微服务实战开发,并且是基于SpringBoot2.0和SpringCloud最新版本Finchley.RC1实现,业内领先。
- 贴近真实的电商数据库设计,解决全品类电商的SPU和SKU管理问题
- 基于FastDFS解决大数据量的分布式文件存储问题
- 基于Elasticsearch高级聚合功能,实现商品的智能过滤搜索
- 基于Elasticsearch高级聚合功能,实现销售业务的复杂统计及报表输出
- 基于LocalStorage实现离线客户端购物车,减轻服务端压力。
- 基于JWT技术及RSA非对称加密实现真正无状态的单点登录。
- 结合JWT和RSA非对称加密,自定义Feign过滤器实现自动化服务间鉴权,解决服务对外暴露的安全问题
- 基于阿里大于实现SMS功能,解决电商短信通知问题
- 基于RabbitMQ实现可靠消息服务,解决服务间通信问题
- 基于RabbitMQ实现可靠消息服务,解决分布式事务问题
- 使用微信SDK实现微信扫码支付,符合主流付款方式
- 基于Redis搭建高可用集群,实现可靠缓存服务即热点数据保存。
redis持久化,集群,哨兵,主从,缓存击穿,热点key。 - Based on Redis and message queues to cope with high availability high concurrent spike scene
- And based on the sub-library separate read and write sub-table of the database to achieve MyCat
- Based Thymeleaf achieve page templates and static, improve page responsiveness and concurrency
- Based on a preliminary request Nginx achieve load balancing, clipping, limiting