Jason
This article is an interview series of PHP Worldwide Developers Conference. The guest of this interview is Ji Pengcheng, senior technical director of Guazi Second-hand Car, a lecturer of PHP Conference. At the upcoming PHP Conference, he will talk about the evolution of the melon Seed backend architecture.
The PHP Worldwide Developers Conference, hosted by DevLink, will be held in Beijing Asia Hotel from June 10 to 11, 2017. The featured lecturer of the conference, Ji Pengcheng, will deliver a wonderful keynote speech entitled “Changes in The Backend Technology Architecture of Melon Seeds”.
Topic Introduction:
This paper introduces how melon seeds evolve from the original state to the present quasi-servitization status quo, the problems encountered in the process, our solutions and some experience summary, and finally, we talk about the overall structure of melon seeds planning.
Please refer to the link at the end of this article
For more highlights of the conference, long click on the QR code below to view the list of issues.
The following is the interview, asked by DevLink and interviewed by Ji Pengcheng.
After graduating from the Institute of Software of Chinese Academy of Sciences in 2007, I went to baidu Tieba project team to do the design and development of back-end system. At that time, back-end modules were mainly developed by C/C++. Later, some systems were gradually transferred to PHP, and I was mainly responsible for tieba resource area project and TIeba I project successively. I joined Ganji in 2011. At the beginning, I was responsible for the dating project of Ganji, and then I was successively responsible for the development of Guazi community, second-hand goods trading channel and second-hand car trading channel. I was always in charge of half technology and half management. In September 2014, the project of Ganjihao Car was incubated internally, which was the predecessor of Guazi Used car. I was responsible for the building and cultivation of the overall technical team and followed this project along.
In terms of technology, the early focus was on storage and architecture based on C/C++ language system. Later, with the change of time, my interest began to become extensive, including back-end, front-end, mobile and machine learning. However, due to the limited energy, it was difficult to master them.
When I graduated, I most wanted to go to Google, but I didn’t go there at that time, so BAIDU became another choice. Fortunately, the post bar that I went to at that time was baidu’s product with the largest traffic only second to Daso. At that time, the direction of Daso had been divided into details, and at that time, the post bar was basically divided into the front and back end. So everyone is going to cover the surface is very wide, it is such a huge flow behind requires that all the performance perfectly, any performance design is not reasonable in front of hundreds of millions of PV will be quickly exposed every day, now looking back on it, post bar four years give me laid a more solid foundation, I’m very grateful.
From Baidu to Ganji, I think classified information is an interesting direction at that time, which is very close to our daily life and relatively down-to-earth. In addition, I think Tieba has also passed its peak stage of rapid growth. In the later stage, more emphasis is placed on strengthening some details. And stick a ratio, the flow of market relatively will be smaller, but and post this at the time don’t consider this pressure, only need to responsible for attracting a flow of products, a lot of business will be complicated market, technology and product not only for customer service, also need to internal sales and service business, to achieve win-win, win-win situation, Also take into account traffic, advertising realization of these things. If the work of tieba can be compared to such an internal skill as the cultivation of yi Jin Jing, then in the market, it is like 18 weapons to master everything, so I will also put forward requirements on the breadth of knowledge, forcing me to contact a broader field and knowledge.
From the market to the melon seeds used, as the incubation of the earliest participants, it belongs to natural excessive, in melon seeds used, in addition to upgrade before the technical architecture, we pay more attention to algorithm, big data, machine learning these techniques to the business, product promotion, to the future world, no longer spell is a business, product, more is right the application ability of data.
First of all, I want to say that there is no best language, only the most appropriate language scene. PHP has the advantage of easy to get started, not permanent memory, so also won’t have to consider a memory leak, the resources to release this kind of problem, start-ups in the initial stage, to meet the business and product demand quickly, rapid prototyping, PHP is the most suitable language, so this time, but it does with concurrency, big traffic demand more gradually, PHP not resident in memory, and the characteristics of the interpreted language will be in response to such demand gradually became a little short, but this does not mean that PHP is no outlet, the simplicity of the PHP is an excellent language writing complex business logic, as a result, written in C/C + +, go, Java to some logical change small, high performance requirements of the module, PHP is a good combination for modules and pages with complex front-end logic.
In recent years, with PHP7, JIT practices, and the Swoole asynchronous programming framework improving, PHP has become more and more powerful in terms of performance, and more and more high-performance modules will migrate to PHP in the near future.
PHP’s per-request process model is actually good for system availability and stability. Releasing resources at the end of each request simplifies the logic of the system without memory leaks or complex GC mechanisms. , however, is also precisely because of this, PHP can’t permanent memory and synchronization mechanism, also give a performance to setting up the ceiling, if the request and response is slow, when all the process in the treatment of the request, so also can’t have any other requests, service also becomes unavailable, it is also the main cause of many sites in 502 at ordinary times, So you need to extract the slow parts and either implement them asynchronously, via queues, or implement them in higher-performance languages.
Generally speaking, ensuring the availability of the system, the focus is still on the architecture level, is a complex system engineering, including capacity planning, single point elimination, service classification and degradation, circuit breaker mechanism, system monitoring and performance monitoring and so on, only in this way, can make the system have high availability.
In terms of employing people, in fact, I only value one point, that is, whether this person has enough sense of learning and learning methods, we are in this industry, great changes are taking place every day, in order to keep up with this era, only continuous learning, constantly update their knowledge.
In terms of management, I also actively promote the establishment of a learning organization and promote everyone to actively learn and share internally. At the same time, appropriate decentralization, so that excellent students can have the opportunity to display their skills, get faster growth.
First, do not rely too much on the framework, although the framework can greatly simplify our work, but after all, the framework is just a tool, should not become a cage to bind our hands and feet, we should learn the idea behind the framework, to deeply understand why the framework does so? What design patterns are reflected? Can I do it better if I do it?
Second, we need to develop solid basic skills. Language is a constant, but solid knowledge of algorithms, data structures, operating systems and networks is the foundation for our continuous development of technology. In recent years, I have been deeply impressed by the interview. Some students from famous universities have been writing business logic for several years, and then asked to write some basic algorithms, even simple ones such as binary search, sorting and string processing, without PHP functions, they cannot write well. This is a bit true and wrong.
Third, do not be overly exclusive to the language, each language has its own characteristics and use scenarios, so you may as well learn more about other languages, only in this way, in any scenario can find the most suitable language and architecture;
Fourth, compliance with the specification, the PHP community is also constantly enriching the PSR standard rules, from coding specification, automatic loading method, message format, caching mechanism, etc., from the past style to the specification is conducive to the promotion of the language and better cooperation with the outside world, this is also the future trend;
Fifth, use data-driven, technology-driven ideas to guide their own work;
Sixth, start to pay attention to machine learning and big data. With the gradual arrival of the intelligent era, these technologies will inevitably become the basic skills of Internet talents in the future. It is better to start to understand them now than to struggle to learn them at that time.
The views expressed in this article are solely those of the guest
PHP Worldwide Developers Conference 2017, which will be held at Asia Hotel Beijing from June 10 to 11, is an offline technology exchange event for PHP developers and technical managers.
Following the theme of “PHP7 First” and “High Performance PHP” last year, the theme of the 3rd PHP Worldwide Developers Conference is “High Availability PHP”. At this event, we will build on PHP7, the increasingly mature VERSION of PHP. Discuss the high availability challenges of PHP development and operations.
Details of the conference, please see: http://php2017.devlink.cn/
Click [Read article] to view the details of the conference directly