Copy Ali youku – enterprise Go transformation PHP project to step on the pit to avoid the pit【 Click to download 】

In the early days of the Internet, many websites were built based on PHP for rapid launch, such as Youku of Ali and YouTube of Google. However, with the development of business, performance problems occurred. At present, 5G stimulates the development of the video industry, so this course takes “Youku” as the model, first builds “Muyouku” based on PHP, and then carries out the Go transformation. Fishing dry speaking: course complimentary PHP source code from 0 to 1. Go from 1 to N, and master the three performance tools: Redis, RabbitMQ, Elasticsearch. After the pressure test comparison, visible performance improvement. Restore the iterative process of real project architecture evolution and code refactoring. From the real Ali project, so that your ability to meet the needs of the enterprise, to help you achieve “life reverse attack”.

Suits the crowd


1. Want to switch from PHP to GO


2. Excellent GO language developers


3. Interested in high performance, high concurrency [aspiring youth]


4. [high-quality youth] who are interested in project reconstruction and hope to achieve “reverse life”


Technical reserve requirements


1. Familiar with a language, basic syntax of GO or PHP is preferred


2. Understand the basic application of MySQL


Chapter Contents:

Chapter 1 Pre-school preparation





Details of this chapter: 1 [play] a unique VCR; 2. 【 demo 】 A little dazzling effect of this lesson project Vlog; 3 [Complimentary] one online ebook for the course; 4 [Introduction] Who is the soul of this course? Why take this course? What are the gains? Correct posture to learn?


1-1 a little bit of “dazzling” project effect, a little bit of “awesome” technology stack trial


Chapter 2 Imitation aliyouku :Go transformation OF PHP project to step on pits to avoid pits refers to the north – preface





This chapter analyzes the project from the perspective of an architect. The core of this chapter is: why the transformation should be carried out, that is, the background and reasons of the transformation are given, the problems commonly encountered in online projects are summarized and enterprise-level solutions are given. Finally, it introduces why Go is chosen for transformation.


2-1 Evolution history of system architecture


2-2 Summary of online problems and reflection on transformation


2-3 What is the goal to achieve


2-4 Why do you choose Go language transformation


Chapter 3 Separation of front and back ends: Beego+Go





Beego: A framework that integrates Go’s high-performance architecture thinking. It is an open source framework that can help friends easily build and develop Go projects. It can quickly develop VARIOUS applications such as APIS, Web and back-end services, and is a RESTful framework. This chapter takes you quickly from the beginning to the beginning of Beego framework, for the subsequent development of “Muyouku” preparation! .


3-1 BeeGO framework introduction and GO environment construction


3-2 Beego and Bee tool installation and project creation


3-3 BEEG routing configuration and MVC development mode…


3-4 Filter and configuration information


3-5 view of grammar


3-6 orm use


3-7 DATABASE CRUD Operations (PART 1)


3-8 DATABASE CRUD Operations (Part 2)


3-9 Database native SQL operations


3-10 Database operations


Chapter 4 “Muyouku.com” core Transformation [Don’t Speak, Show U the Code]





This chapter aims at the transformation of functions prone to performance bottlenecks, covering 80% of the original functions of youku, so as to experience a complete system. Before Coding, the lecturer completed the implementation of the code before transformation through PHP in advance. Use [comparative explanation], such as Go VS PHP programming skills, and finally compare the performance of the two systems to summarize the effect of transformation. .


4-1 familiar with PHP


4-2 Sharpening knife does not mistakenly cut wood worker-reform ideas


4-3 Transformation of Registration and Login Functions (I)


4-4 Transformation of Registration and Login Functions (II)


4-5 Transform channel page – top advertising function


4-6 Revamp channel page – hot play function


4-7 modified channel page – Japanese manchu recommended features trial


4-8 Modified channel page – Girls recommended features


4-9 Transformation Video List Page (I)


4-10 Video List page of Transformation (II)


Chapter 5 Transformation of video playing page [Here are the “most hardcore” : cloud vod and bullet screen]





This chapter integrates Aliyun VOD player to realize video playing function. What’s included: European video series and user-related comments. Last but not least: a full set of bullet screen tutorials, a laundry list of hard skills that are a bit dry!


5-1 Integration of Aliyun VOD player


5-2 Modify the video playing page


5-3 Review function of transformation (I)


5-4 Modification of comment Function (Middle)


5-5 Modification comment Function (Ii)


5-6 Transform the ranking board function


5-7 Modify the batch message sending function


5-8 Modification of bullet Barrage functions (PART 1)


5-9 Modification of bullet Barrage function (Medium)


5-10 Modification of bullet Barrage function (Part 2)


Chapter 6 Integration of Aliyun voD to meet the needs of enterprises





Video uploading is divided into two modes. One is to upload a video file to the local server. Easy to learn. Another mode is to integrate Ali Cloud upload video SDK and use Ali cloud services. Increase interview and work experience to meet the real needs of enterprises.


6-1 Revamp my video management function


6-2 Modifying the Video Uploading Function (1)


6-3 Modification of video Uploading Function (2)


6-4 Video uploading ali Cloud – account opening and console demonstration


6-5 Video uploading Ali Cloud – integration of client SDK


6-6 Video uploading Aliyun – Interface for uploading, refreshing and playing credentials


6-7 Video upload Aliyun-callback interface


6-8 Video uploading Ali Cloud – Revamp the functions of uploading and playing videos


Chapter 7 Test Retrofit effect and Online Deployment [Comparative explanation, Visible Performance improvement]





In this exciting chapter, all the functions have been transformed with GO after so many lessons. Now it is time to verify the effect of transformation. Use professional testing software Jmeter tool to test the effect of the transformation function, and the data shows everything.


7-1 Test transformation effect (I)


7-2 Test transformation effect (II)


7-3 Online Project deployment


7-4 Project presentation and summary


Chapter 8 Enterprise real scene, related through Redis transformation





This chapter optimizes the core interface based on Redis and can learn how to develop the development ideas of high availability and high performance functions.


8-1 Introduction and installation of Redis


8-2 Redis Demo development


8-3 Description of transformation ideas and video details Interface transformation


8-4 Modify the comment list interface


8-5 Modify video series interface


8-6 transformation interface and transformation function demonstration trial


8-7 Summary of this chapter


Chapter 9 Key to Business Decoupling: MQ messaging Middleware





This paper introduces the most popular messaging middleware RabbitMQ, explains the basic concepts of RabbitMQ, and explains the implementation of RabbitMQ connection pool, producer and consumer. And explain RabbitMQ dead letter queues. Finally, the usage scenarios and benefits of queues are explained.


9-1 RabbitMQ Basics


9-2 RabbitMQ Installation


9-3 RabbitMQ working mode – The sender and receiver are encapsulated


9-4 RabbitMQ working mode – Simple mode and Work mode


9-5 RabbitMQ message Persistence and manual reply


9-6 RabbitMQ working mode – Subscription mode


9-7 RabbitMQ working mode – Routing mode


9-8 RabbitMQ working mode – Theme mode


9-9 RabbitMQ – Dead letter queue (1)


9-10 RabbitMQ – Dead letter queue (2)


9-11 Revamp updates the leaderboard feature after Posting comments


9-12 Modified the batch message sending function


9-13 Modify Virtual Add the number of comments function


9-14 Summary of this chapter


Chapter 10 – Goroutine retrofit based on Go’s high performance characteristics





One of the most exciting aspects of the Go language: Go concurrent programming. Go’s native support makes concurrent implementation simple and fun. This chapter explains Go concurrency from basic concepts to practical applications.


Goroutine Basics and Demo (1)


Goroutine Basics and Demo (2)


10-3 Revamp the comment list function


10-4 Modify the function of sending messages in batches


10-5 Summary of this chapter


Chapter 11 ElasticSearch based modification





Elaticsearch is an open source, highly extensible search engine that is the first choice for full text search. This chapter selects ES transformation related functions. It meets the needs of enterprises. When the amount of data increases and there is a demand for full-text retrieval, enterprises will inevitably choose ES to optimize and transform.


Chapter 12 Micro-service Practice [Following the Technical Weather Vane]





This chapter explains the important concepts of microservice architecture, analyzes the system to be transformed and disintegrates the system by comparing the single framework and microservice architecture. Finally, the micro-service framework go-Micro of Go is explained through actual combat, and the two functions realized above are microservized.


Chapter 13 Time Management [Giving Eggs: Self-discipline Gives Me Freedom]





This chapter has nothing to do with technology, but I believe it will help students in their life. A day for an app monkey: Busy day in the office, go home, play with the phone in bed, go to bed at 12 o ‘clock. As the years passed and the technology reached a bottleneck, every year was the same. What can be changed to avoid this? The teacher will give you some advice in this chapter. .


Chapter 14 Final return – Farewell to the river’s lake





The importance of reflection is discussed in time management and applies to this course as well. This chapter compares and reflects on the reformed architecture and the old architecture. And the knowledge points involved in the course are sorted out and summarized to strengthen the mastery of the course.


Chapter 15 [Complimentary Supplementary lessons package] Quick start to Go language foundation [Q&A service not included]





This course is aimed at Go foundation is not solid enough/want to quickly review Go grammar partners, special gift widely praised hot actual practice course: “Google teacher take you to Go language actual practice” part of the chapter, that is: Go grammar.


15-1 Senior Engineer of Google explained the go language in depth


15-2 Built-in variable types


15-3 Constants and enumerations


15-4 Conditional statements


15-5 cycles


15-6 function


15-7 pointer


15-8 array


15-9 Concept of slicing


15-10 Operation of slicing


15-11 Slice examples _ Breadth First Maze


15-12 Map


15 and 13 Map example


15-14 character and string processing


15-15 Structures and methods


15-16 packages and packages


15-17 Extending existing types


15-18 GOPATH and directory structure





This course is constantly being updated

     【 Web disk link download 】