"Turn" PHP senior engineer facing the growth bottleneck

Source: Internet
Author: User
Tags php and mysql
"Go" PHP engineers face a growing bottleneck
As one of the most widely used languages in web development, PHP has a large number of fans, so are you a good programmer? Do you want to face all kinds of problems while doing self-cultivation, how can I break through my own bottleneck so as to develop better?
PHP Engineers face growing bottlenecks

Clear firstThe PHP engineer referred to here refers to the development of web systems primarily in PHP and does not work in its language. Work experience in about 3-4 years, ordinary Web system (millions access, level 1000 data or business logic is not particularly complex) development of basic handy, no problem. But they would have such a disadvantage:

Reference


In addition to PHP's non-use of other languages, a shell script may be ordered.

The mastery of PHP is not fine (many PHP manuals are not read, except the library).

Knowledge is narrower (in the face of demand, except the use of PHP and MySQL, do not know other solutions).

The PHP code takes the process as the main idea, the object-oriented implementation is too round, can not understand.



These phper are a lack of thought when it comes to the complexity of projects or business logic that requires high performance, high concurrency, and large amounts of data (systems need to address multi-domain business issues). Can not analyze the nature of the problem, technical judgment is poor, the problem can find a temporary solution, but often in the temporary solution, the system and their own step by step toward collapse. How do you improve yourself? How can you challenge a more difficult system?

Where is the higher challenge?

In combination with my own experience, I have listed some specific challenges so that we can first have a perceptual understanding.

Where are the challenges of high-performance systems?

Reference


How do I choose a Web server? Do not use fast-cgi mode;

Do you want to use the Reverse proxy service? Select Full memory cache or hard disk cache?

Do you need load balancing? Is it based on the application layer or the network layer? How to guarantee high reliability?

How is your PHP code performing, and what happens after you use the optimizer tool? Where are the performance bottlenecks? Do you need to write a C extension?

What are the characteristics of user access, read more or write more? Do you need read/write separation?

How does the data be stored? Write speed and readout speed? How does data increase access speed read change?

How do I use caching? How to consider failure? How does data consistency guarantee?



Where are the challenges of high complexity systems?

Reference


Can you identify the areas of your business? Is it one or more?

Can the business be reasonably abstracted, and the changes in business rules can be achieved at a very small cost?

Data consistency, security can be guaranteed?

Does it hold the method of object-oriented analysis and design?



You can definitely answer the questions listed here, stating that technically you may have become an architect. How you can not yet answer, you need to strengthen in the following several directions.

   How to improve, break through bottlenecks, how you can not answer, you need to strengthen in the following several directions:

Reference


Analyze the principle of the technology you use and the mechanism behind it, so that you can improve your technical judgment and improve the correctness of your technical options.

Learn important knowledge during college, operating system principles, data structures and algorithms. Know that you used to study for the exam, but now you need to learn for yourself, let yourself know why;

Start learning C again, although you've already learned it in college. This is not only because you may need to write PHP extensions, but also because, in the application of C, there is a moment of concern for performance, memory control, variable life cycle, data structure and algorithm environment;

Learning object-oriented analysis and design, it is an effective way to solve complex problems. Learning abstraction is the only way to solve complex problems.


How to study effectively is a big problem. "Architecture-centric, use-case-driven, iterative development", borrowing this idea, on effective learning methods, can be expressed as follows: the principle, model or mechanism-centric, task-driven, iterative learning. A little abstract, for example, to illustrate how to learn.

Objective: To learn how to improve processing performance.

An iterative-driven task: Locate the region by IP. This is a common task for Web applications, and the IP database is a record of around 10 mangyo.

First iteration: Implementing functionality without regard to performance (implemented via PHP)

Because it is not possible to find a region directly through key (IP), it is not easy to put it directly into the data or through an associative array. The idea is to sort the data before you look for it:

Reference


How to find through IP? Ordered data, binary lookup is the fastest.

How to sort? Use the library function sort of course yes, but that is learning, it is to achieve a quick sort of it yourself.



Learning goals: Sorting algorithms, finding algorithms

Phper data structure and algorithm foundation is poor, usually do not have this task, oneself also do not study, therefore this aspect of knowledge is very lack. However, the problem of programming solves eventually comes down to the data structure and algorithms for manipulating this data structure. If the data structure algorithm is often in the mind, then the problem can be clearly recognized its internal structure, the solution will naturally arise.

Second iteration: Optimizing the loading and sequencing of data

If you do the first step, it's basically not available because the data needs to be loaded and sorted every time, so it's too time-consuming. The idea is that once the data is loaded and sorted, it is placed in a place where every PHP process can access it. Put it in memcache it's easy for everyone to think of. In fact, in the shared memory (EA and other accelerators are supported) is a faster way, because memcache more network operations. How do you test performance when the data is put into shared memory or chunked? How to analyze the bottleneck (xdebug)? You will learn by driving these questions.

Learning Goal: The method of detecting, locating and optimizing PHP performance; The impact of PHP implementation structure on performance.

Third iteration: Writing PHP extensions

Performance or not to go, have to enter the world of C + +, but you will not just phper and service end of the all-round engineer, of course, this has not done the C + + students challenge is huge.

Learning goals: Learning from C + +, writing PHP extensions

How do you determine the mechanisms and principles that you need to learn? How to find the driving learning task? I have no concept of what needs to be learned, how to answer the above two questions? From the positioning of this technology to find out the need to learn the focus, that is how it does (mechanism) and why it can do so. List the most common applications of this technology, as a learning task, from simple to difficult to practice.

If I need to learn JavaScript, I have some perceptual knowledge about html,css. The first thing to understand is that JavaScript is a dynamic language in the Web, primarily addressing the dynamic interaction of web pages. The key points to learn are as follows:

Reference


How JavaScript interacts with HTML (mechanism)

Where is the dynamic nature of JavaScript, and how does it differ from other dynamic languages? (Language model)


If you are fully self-taught, find the key points (mechanisms, models, principles) that you need to learn to set up a learning task is really not that easy to grasp. If you find an experienced person to guide you or add a learning team, the speed of learning will certainly be greatly improved.

Finally, I want to say to everyone: PHP because simple and use, but not because of its simplicity and limit our growth!
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.