HO CHI MINH UNIVERSITY OF TECHNOLOGY AND EDUCATION FACULTY FOR HIGH QUALITY TRAINING GRADUATE THESIS BUILD AN E-COMMERCE SYSTEM FOR RESTAURANT CHAINS SUPERVISOR: Dr LÊ VĨNH THỊNH STUDENT: NGÔ CÔNG AN STUDENT: ĐÀO XUÂN THỦY SKL 0 0 7 0 4 7 Ho Chi Minh, June 2020 do an HO CHI MINH UNIVERSITY OF TECHNOLOGY AND EDUCATION FACULTY FOR HIGH QUALITY TRAINING GRADUATE THESIS BUILD AN E-COMMERCE SYSTEM FOR RESTAURANT CHAINS STUDENT NAME: STUDENT ID NGÔ CÔNG AN 16110002 ĐÀO XUÂN THỦY 16110544 School year: 2016 – 2020 Major: INFORMATION TECHNOLOGY SUPERVISOR: Dr LÊ VĨNH THỊNH Ho Chi Minh, June 2020 do an HO CHI MINH UNIVERSITY OF TECHNOLOGY AND EDUCATION FACULTY FOR HIGH QUALITY TRAINING GRADUATE THESIS BUILD AN E-COMMERCE SYSTEM FOR RESTAURANT CHAINS STUDENT NAME: STUDENT ID NGÔ CÔNG AN 16110002 ĐÀO XUÂN THỦY 16110544 School year: 2016 – 2020 Major: INFORMATION TECHNOLOGY SUPERVISOR: Dr LÊ VĨNH THỊNH Ho Chi Minh, June 2020 do an SOCIALIST REPUBLIC OF VIETNAM Independence – Freedom - Happiness ----***---- Ho Chi Minh, July 1st 2020 MISSION OF GRADUATION THESIS Student name Student ID Class Ngô Công An 16110002 16110CLST1 Đào Xuân Thủy 16110544 16110CLST3 Major: Information Technology. Mentor: Dr Lê Vĩnh Thịnh. Contact: +84 938 252 222 Started date: 24/02/2020 Submit date: 01/07/2020 1. Topic name: Build an e-commerce system for restaurant chains.
The figures, the original documents: - Report about “Analysis and design about restaurant supply chain management system” (made from specialized essay by ourselves). - Content: + Compare current store chain management systems. + Research about microservices architecture. + Research about authentication and authorization for microservices.
+ Design an overview architecture for chain management system. - Execution time: 09/09/2019 to 08/12/2019. - Source: https://1drv.ms/b/s!AvSr2F4XIt-fkQ5QnYR_d4sjHf_9 3. Content to implement the project: Theory: - Research about microservices architechture (continue).
- Research about Angular, ASP .NET Core, RESTful APIs, React Native. - Research about Docker Engine, Amazon Web Service and Heroku. - Research about e-commerce business analysis, sales management business. i do an Practice: - Build an e-commerce system for restaurant chains base on microservice architecture.
- Manage services using microservice achitecture, load balancing and system administrator based on Docker Engine platform - Apply cloud computing to manage and build system based on Ubuntu virtual private server. Implementation plan No Time Work 24/02/2020 to Analyze requirements, identify agents and function in 1 01/03/2020 usecase diagrams. 02/03/2020 to 2 Usecase specification, sequence schema, database design. 08/03/2020 09/03/2020 to 3 Database design, streamline processing of functions.
15/03/2020 16/03/2020 to Make a list of screens, describe the screens in detail, and 4 22/03/2020 learn the design pattern. 23/03/2020 to Designing and building a microservice model for the 5 29/03/2020 Project. - Page interface design 30/03/2020 to 6 - Writing the API 05/04/2020 - Map API with corresponding interfaces - Page interface design 06/04/2020 to 7 - Writing the API 12/04/2020 - Map API with corresponding interfaces - Page interface design 13/04/2020 to 8 - Writing the API 19/04/2020 - Map API with corresponding interfaces ii do an - Page interface design 20/04/2020 to 9 - Writing the API 26/04/2020 - Map API with corresponding interfaces - Page interface design 27/04/2020 to 10 - Writing the API 03/05/2020 - Map API with corresponding interfaces - Page interface design 04/05/2020 to 11 - Writing the API 10/05/2020 - Map API with corresponding interfaces 11/05/2020 to 12 Learn socket.io and apply socket.io into the system. 17/05/2020 18/05/2020 to 13 Research, improve more features of the system.
24/05/2020 25/05/2020 to Deploy the system to amazon web services, heroku, 14 31/05/2020 docker. 01/06/2020 to Run the demo on the server, test the functions of the 15 07/06/2020 system. 08/06/2020 to 16 Fix errors arising during the demo process, testing. 14/06/2020 15/06/2020 to Write a report, make a powerpoint, prepare the final steps 17 21/06/2020 for the report.
22/06/2020 to Write a report, make a powerpoint, prepare the final steps 18 01/07/2020 for the report. Products - Food e-commerce website. - Food e-commerce mobile application (Android and IOS). - Website operation management.
HEAD OF INFORMATION TECHNOLOGY SUPERVISOR (Name and signature) (Name and signature) iii do an SOCIALIST REPUBLIC OF VIETNAM Independence – Freedom - Happiness ----***---- COMMENTARY OF SUPERVISOR Student name: Ngô Công An Student ID: 16110002 Đào Xuân Thủy 16110544 Major: Information Technology. Topic name: Build an e-commerce system for restaurant chains. Name of supervisor: Dr Lê Vĩnh Thịnh. On content of topic & workload done:.
Recommend for defense or not?. ) Ho Chi Minh, ………………………………. 2020 SUPERVISOR (Name and signature) iv do an SOCIALIST REPUBLIC OF VIETNAM Independence – Freedom - Happiness ----***---- COMMENTARY OF REVIEWER Student name: Ngô Công An Student ID: 16110002 Đào Xuân Thủy 16110544 Major: Information Technology. Topic name: Build an e-commerce system for restaurant chains.
Name of reviewer:. On content of topic & workload done:. Recommend for defense or not?. ) Ho Chi Minh, ……………………………….
2020 REVIEWER (Name and signature) v do an ASSURANCE We assure this project is our own implementation. We do not copy, use any material or source code of others without specifying the source. We assume responsibility for violations. Ho Chi Minh, June 25th 2020 Đào Xuân Thủy Ngô Công An vi do an MANY THANKS In fact, there is no success that are not associated with support or assistance, whether a lot or a little, directly or indirectly by others.
Now we would like to send this sincere thanks to Dr Lê Vĩnh Thịnh, who has supported and transmitted motivation to us in the process of choosing topics, instructions and comments. Although we do not ask much, but when asking the teacher for help, it is the motivation for us to complete the project, without the instructions and practical experiences of the teacher, I think this project will be difficult to complete and completed on time. Once again, I would like to thank our supervisor. We would like to send our thanks to our fellow students who provided useful information and knowledge to help us improve our topic.
We would also like to thank Dr Lê Vĩnh Thịnh who directly guided us to complete this project. We will not be able to complete without the guidance of the supervisor. Due to lack of experience in designing and building software that applies this relatively new process, it is possible that during construction process, there are many errors and problems, so please understand. Due to limited time, with limited knowledge and many other mistakes, so there will have inevitable problem, so I look forward to receiving your valuable suggestions from everyone for more complete later.
We sincerely thank you. Ho Chi Minh, June 25th 2020 Đào Xuân Thủy Ngô Công An vii do an SUMMARY INFORMATION BY VIETNAMESE 1. Các vấn đề nghiên cứu - Tìm hiểu về Microservices architecture (kiến trúc đa dịch vụ) và so sánh với Monolithic architecture (kiến trúc nguyên khối) để tìm ra những điểm mạnh cho hệ thống thương mại điện tử. - Tìm hiểu về Single page application (Angular), ASP.NET Core, RESTful và React native giải quyết bài toán cho hệ thống cung cấp dịch vụ sử dụng API cho website thương mại điện tử và ứng dụng di động thương mại điện tử đa nền tảng.
- Tìm hiểu về Docker Engine, Amazon Web Service và Heroku ứng dụng cho việc vận hành hệ thống thương mại điện tử đa dịch vụ, đáp ứng được lưu lượng sử dụng và lưu trữ dữ liệu lớn từ người dùng. - Tìm hiểu về nghiệp vụ thương mại điện tử và nghiệp vụ quản lý bán hàng cho chuỗi cửa hàng (bao gồm website, ứng dụng di động và nghiệp vụ quản lý). Các vấn đề phát sinh Cấu hình máy chủ thấp không đủ đáp ứng cho đa dịch vụ chạy cùng một lúc gây tràn bộ nhớ, máy chủ quá tải cho lượng truy cập lớn từ người dùng. Các phương pháp giải quyết vấn đề - Triển khai mở rộng 6 dịch vụ nhỏ của hệ thống lên heroku và sử dụng cổng dịch vụ điều hướng tới các dịch vụ nhỏ giúp cân bằng tải và giảm lưu lượng truy cập tới server.
- Sử dụng Docker giúp dễ dàng triển khai các dịch vụ lên môi trường mới và cấu hình Docker giúp tự động khởi động lại dịch vụ khi gặp sự cố phát sinh, giới hạn dung lượng ram được sử dụng cho từng dịch vụ, từ đó tránh được việc tràn bộ nhớ của máy ảo gây sập máy ảo và ảnh hướng tới các dịch vụ khác cũng như đảm bảo các dịch vụ luôn được sẵn sàng trở lại nếu gặp vấn đề phát sinh. Kết quả đạt được - Hệ thống thương mại điện tử quản lý chuỗi quán ăn, bao gồm: website, ứng dụng di động cho đa nền tảng và website quản lý cho chủ cửa hàng. - Đáp ứng được lưu lượng truy cập lớn từ khách hàng, đáp ứng được yêu cầu cân bằng tải cho từng dịch vụ nhỏ. - Xây dựng được hệ thống dễ dàng bảo trì, phát triển và mở rộng.
viii do an SUMMARY INFORMATION BY ENGLISH 1. Research issues - Research about Microservices architecture and compare with Monolithic architecture to find strengths for e-commerce system. - Research about Single Page Application (Angular), ASP.NET Core, RESTful and React Native to solve problems for provided service system using API for e- commerce websites and multi-platform e-commerce mobile applications. - Research about Docker Engine, Amazon Web Service and Heroku applications for operating a multi-service e-commerce system, meeting a large user request and storing large data.
- Research about e-commerce system and sales management for chain stores (including website, mobile application and website operation management). Issues stem Server have low specifications and it is not sufficient for multiple services running at the same time causing memory overflow, the server is overloaded when received a large request from users. Problem solving methods - Deploying to expand 6 services of the system to heroku and use a service gateway to navigate to services to help load balancing and reduce traffic to the server. - Using Docker makes it easy to deploy services to new environment and configures Docker to automatically restart services when problems arise, limit the amount of ram used for each service, from which avoid memory overflow that causes virtual machine collapse and affect other services as well as ensure services are always available if problems arise.
Achieved results - The e-commerce system for managing restaurant chain, including website, mobile application for multi-platform and website for operation management. - Meet a large request from customers, meet the load balancing requirements for each service. - Building a system that is easy to maintain, develop and expand. ix do an TABLE OF CONTENT MISSION OF GRADUATION THESIS.
i COMMENTARY OF SUPERVISOR. iv COMMENTARY OF REVIEWER. vi MANY THANKS. vii SUMMARY INFORMATION BY VIETNAMESE.
viii SUMMARY INFORMATION BY ENGLISH. ix TABLE OF CONTENT .x LIST OF ACRONYMS AND ABBREVIATIONS. xvi LIST OF TABLES. xvii LIST OF FIGURES.
Urgency and objectives of project. The urgency of project. Objects, scope and methods of research. Survey of current status.
Function of sales screen. Functions of Sales App. Functionality of App Manager. Compare Ocha, Kiotviet and Suno.
Introduction to Microservice Architecture. Advantages and disadvantages of microservices. Advantages of microservices. Disadvantages of microservices.
Introduction to API Gateway. Microservices architecture used in project. Overview of ASP. Introduction to ASP.
Introduction to Web APIs in ASP. Advantages of ASP.NET Core appied in project. Introduction to Angular. Compare Angular, ReactJS and VueJS.
Angular used in project. React Native Framework [5]. Introduction to React Native. React Native used in project.
Amazon Elastic Compute Cloud [12]. Amazon Relational Database. Introduction to Docker .27 xi do an 2.