What technologies should senior PHP programmers master? _php Instance

Source: Internet
Author: User
Tags apc epoll error handling exception handling fpm php framework mysql backup zend

This paper divides PHP programmers into two categories of programmers in middle and senior programmers, and explores the skills that these two programmers should have.

Intermediate PHP Programmer

1.Linux
Fluent use of shell scripts to do a lot of automated work; Awk/sed/perl is also good at doing a lot of text processing and data statistics, and can basically install most of the non special Linux programs (including various libraries, packages, third-party dependencies, etc., such as MongoDB /REDIS/SPHINX/LUNCENE/SVN the basics of Linux services, knowing how to view Linux performance metrics data, knowing basic Linux problem tracking, and more

2. Nginx:

On the basis of the first phase, understand the complex nginx configuration, including multi-core configuration, events, proxy_pass,sendfile/tcp_* configuration, know the relevant configuration and performance impact of timeout, etc. know nginx except Web server, can also assume proxy server, reverse static server configuration, know the basic Nginx configuration tuning, know how to configure permissions, compile a nginx extension to Nginx, know the basic nginx operating principle (Master/worker mechanism, epoll), Know why Nginx performance is better than Apache performance knowledge;

3. Mysql/mongodb:

In the first phase of the foundation, in the MySQL development, master a lot of tips, including conventional SQL optimization (group By/order by/rand optimization, etc.), in addition to the ability to build MySQL, but also can be hot and cold backup MySQL data, but also know the impact of innodb/ MyISAM Performance configuration options (such as key_buffer/query_cache/sort_buffer/innodb_buffer_pool_size/innodb_flush_log_at_trx_commit, etc.), also known The way these options are configured to be the appropriate number of values, but also understand some special configuration options, such as knowing how to build MySQL master-slave synchronization of the environment, know the difference between the Binlog_format; know MySQL performance tracking, including Slow_log/explain, Knowledge of basic indexing and processing is also available; the principle of understanding the basic MySQL architecture (server+ storage engine), knowing the basic Innodb/myisam index storage structure and different (clustered index, B-tree); Knowing the basic INNODB transaction processing mechanism; Partial MySQL exception handling scheme (or know where to find the processing scheme). Conditions allow the situation, we recommend to understand the NoSQL representative of the MongoDB database, by the way compared with MySQL differences, colleagues can be in the appropriate application of the safe and cautious use of the MongoDB, know the basic PHP and MongoDB the combination of development.

4. Redis/memcached:

In most medium-sized systems will certainly involve caching processing, so be sure to understand the basic cache, know the similarities and differences between Memcached and Redis and application scenarios, can install the redis/memcached independently, understand the memcahed of some basic characteristics and limitations, For example, the largest value, know PHP and their use of the Union, Redis understand the basic work and use, understand the general data types, know what kind of scenarios to apply what type, understand Redis transactions and so on. The principle part, can probably understand memcached memory structure (slab mechanism), redis to understand commonly used data type bottom implementation storage structure (sds/chain list/skiplist/hashtable) and so on, by the way to understand Redis's affairs, RDB, AoF and other mechanisms are better

5. PHP:

In addition to the first phase of capacity, installation configuration can be installed at will free of PHP and a variety of third-party extensions of the compiler installation configuration; Understand most of the PHP-FPM configuration options and implications (such as Max_requests/max_children/request_terminate_ Timeout performance-related configuration), know the difference between the mod_php/fastcgi, in PHP has been able to proficiency in a variety of basic technology, but also includes a variety of in-depth PHP, including in-depth understanding of the PHP object-oriented/spl/grammatical aspects of the special features such as reflection and so on ; you've read more than one generic PHP MVC framework code in the framework, know the basic PHP framework internal implementation mechanism and design ideas; in PHP development has been proficient in the use of conventional design patterns to apply development (abstract factory/single case/observer/command chain/policy/adapter, etc. mode) Recommend that you develop your own PHP MVC framework to fully liberalize development, give yourself an in-depth understanding of the MVC pattern, and enable you to quickly upgrade your Business Project development, familiarize yourself with PHP's various code optimization methods, and familiarize yourself with most of the PHP security issues. Familiar with basic The mechanism of PHP implementation (Zend Engine/extended basic work mechanism);

6. System Design:

Able to design most of the medium-sized system of Web site architecture, database, basic PHP framework selection, performance test and troubleshooting, etc. to accomplish similar: Browser-> CDN (Squid)-> nginx+php-> Cache-> Database structure the basic design and development of Web site maintenance can support the development and maintenance of millions of to tens of millions of daily traffic basic website;

Advanced PHP Programmer

emphasis: In addition to the basic LNMP procedures, can also be in a certain direction or field of in-depth study. (Depth dimension development)

Objectives: In addition to the completion of the basic PHP business development, but also to solve most of the in-depth and complex technical issues, and can independently design and complete the large-scale system design and development work, they can independently hold depth of a certain technical direction, in this piece more professional. (for example, in MySQL, Nginx, PHP, Redis, and so on in any direction in-depth study)

1. Linux:

In addition to the second phase of the ability, under Linux in addition to the regular operation and performance monitoring tracking, but also the use of many advanced complex command to complete the work (watch/tcpdump/starce/ldd/ar, etc.), in the shell script, have been able to write more complex shell scripts (more than 500 lines) to help complete a lot of shell including backup, automated processing, monitoring and so on, and so on Awk/sed/perl applications such as fire pure green, can operate control processing text statistical analysis of various complex formats of data , some understanding of the Linux internal mechanism, loading the kernel module, starting error handling, and so on have a basic processing, as well as some other related things also know, such as NFS, Disk Management and so on;

2. Nginx:

In the second phase of the foundation, has been able to operate the nginx is very skilled, can carry out more in-depth operation of nginx, such as monitoring, performance optimization, complex problem-handling, and so on; Look at personal interests, more aspects can be considered focus on the Nginx working principle part of the in-depth study, Mainly in the beginning of reading source, such as the specific master/worker work mechanism, nginx internal event processing, memory management and so on, and can learn nginx expansion of the development, can customize some of their own private expansion, but also to a certain degree of nginx+lua understanding, See if you can combine to apply a better model; this stage requires a deep understanding of the nginx principle and can be considered as a nginx in the direction of the professional.

3. Mysql/mongodb:

In the second phase of the foundation, in the MySQL application, in addition to the previous basic SQL optimization, but also in the completion of a number of complex operations, such as large quantities of data import and export, online mass data changes in the table structure or delete the index fields and so high-risk operations; In addition to installation configuration, has been able to deal with more complex MySQL problems, such as the tracking of various issues, master-Slave synchronization delay problem, the resolution of the synchronization of the data, the MySQL high availability architecture, etc. are involved in understanding; for MySQL application level, it is familiar with MySQL core key technology, such as transaction mechanism (Isolation level , locks, etc., to trigger, zoning and other technologies have a certain understanding and application; For MySQL performance, there are disk optimization (SAS migration to SSD), server optimization (memory, server itself configuration), other core performance tuning options except phase two (Innodb_log_buffer_ Size/back_log/table_open_cache/thread_cache_size/innodb_lock_wait_timeout etc), connection pool software selection application, to show * (Show Status/show Profile class is well understood to perform most of the performance problem tracking; MySQL backup technology in-depth familiarity, including disaster recovery, in-depth understanding of binlog, hot and cold backup, multiple IDC backup, etc. in the MySQL principle, have more understanding, For example, the working mechanism of MySQL began to read part of the source code, such as the master-slave synchronization (copy) technology source learning, or to a storage engine (MYISAM/INNODB/TOKUDB) and so on the source of learning to understand, if the conditions allow, you can refer to the CSV engine Develop your own simple storage engine to save some data and enhance your understanding of MySQL; In this process, if you are interested, you can also consider developing a DBA. MongoDB level, you can consider for example in writing less read the situation began to apply MongoDB online, or to do some of the data analysis processing operations, the specific scene can follow the work, but the core is to better understand the Rmdbs and NoSQL of the different scenarios below the application, If conditions or interests permit, you can begin to learn more about MongoDB's working mechanism.

4. Redis/memcached:

On the basis of the second stage, can be more in-depth application and learning. Because memcached is not particularly complex, it is recommended to read the source code, especially the Memory Management section, to facilitate in-depth understanding; Redis part, can do some more complex data structure of the application (Zset to do ranking operations/ Transaction processing is used to ensure that atomicity is used in the use of the second kill scenario; many related to aof synchronization mechanism of learning applications, the design of a highly available Redis application architecture and clustering; it is suggested that you can study the source of Redis in depth, the knowledge accumulated in the second phase can be applied, In particular, you can read about the core event management, memory management, internal core data structure and so on to learn. If you are interested in permitting, you can become a very professional user in Redis.

5. PHP:

As the basic core skills, we need to have more in-depth learning and application on the basis of the second phase. From the basic code application above, able to solve 95% problems in PHP development, understand most of the PHP skills, for most of the PHP framework can be quickly used in one day, and understand the pros and cons of the mainstream PHP framework, can quickly facilitate the development of the project to do technology selection; in configuration, except The knowledge of the regular second phase will understand some of the more partial gate configuration options (PHP auto_prepend_file/auto_append_file), including the extended Some of the complex advanced configurations and principles (such as the Memcache.hash_strategy in the memcached extended configuration, Apc.mmap_file_mask/apc.slam_defense/apc.file_ in the APC extended configuration) Update_protection and so on), the working mechanism of PHP is more understanding, including php-fpm work mechanism (such as php-fpm under different configuration machines to open process number calculation and principle), Zend Engine has a basic familiarity (Vm/gc/stream processing) , read the basic PHP kernel source code (or read the relevant article), the PHP internal mechanism of most of the core data structure (basic type/array/object) implementation is understood, for the core Infrastructure (ZVAL/HASHTABLE/GC) have in-depth learning , be able to do basic PHP expansion development, understand some of the advanced knowledge of extended development (minit/rinit, etc.), familiar with PHP and Apache/nginx different communication mode details (mod_php/fastcgi); In addition to developing PHP extensions, Consider learning to develop Zend extensions and learn more about PHP from the bottom up.

6. C + +:

On the basis of the second phase, we can have a more in-depth learning and understanding of C/n + + language, and can complete the development of the medium and small-sized c/a system; In addition to the basic second phase of basic C/N syntax and data structure, can also learn some special data structures (b-tree/rb-tree/ Skiplist/lsm-tree/trie-tree, etc.) to facilitate the need for special work; in system programming, familiar with multiple processes, multithreaded programming, many processes under the situation to understand the most of the communication between the many processes, the flexibility to choose the means of communication (shared memory/semaphores/pipelines, etc.); multi-line The process programming can solve the lock conflict problem well, and can carry on the development debugging work of the multithreaded program; at the same time, it is familiar with the network programming, understand the difference and type selection of the multi process model/MULTITHREAD model/asynchronous Network IO Model, and be familiar with the principle and difference of different asynchronous network IO EPOLL/IOCP etc.), and familiar with the common asynchronous framework (Ace/ice/libev/libevent/libuv/boost.asio, etc.) and use, if leisure can also look at some of the domestic development of their own libraries (such as Muduo), but also to set The High Concurrency program architecture (Leader-follow/master-worker, etc.) to understand most of the problems in the development of the back-end server (memory management, log printing, high concurrency, front and back end communication protocol, service monitoring), Know each back-end service RPC communication problem (STRUCT/HTTP/THIRFT/PROTOBUF, etc.); be able to use GCC and gdb more familiar to develop and compile the debugger, the online program can trace and trace the problem quickly after the core is lost; common module Development, can accumulate or develop some common tools or libraries (such as asynchronous network framework, log library, memory pool, thread pool, etc.), but the development of whether to use caution, save the pit to chase bugs;

7. Front End:

Get an in-depth understanding of the HTTP protocol, including the specific protocol code for each detail protocol and the underlying reason, for example 302 static file cache, 502 is nginx behind PHP hang up and so on; In addition to the previous front-end aspects of the various framework application integration capabilities, the front-end aspects of learning if interested can be more in-depth, the expression form is, You can develop your own front-end frameworks like jquery, or develop a more trivial test of JavaScript, such as a rich text editor;

8. Other areas of language learning:

On the basis of the php/c/c++ language has a basic accumulation, suggest at the current stage can try to learn different programming languages, see personal interests, scripting language can learn Python/ruby and so on, functional programming language can try Lisp/haskell/scala/ Erlang and so on, static language can try Java/golang, statistical analysis can understand the R language, if you want to change the perspective of the back-end business, you can try Node.js and the previous mentioned with the Nginx Nginx_lua. Learning different languages is mainly to improve their horizons and solve the problem of differences in means, for example, you will understand that in addition to process/thread, there is a lightweight coprocessor, for example, under the Cross machine communication scenario, Erlang's solution is surprisingly simple, for example, if you do not want to choose C + +, there are similar efficient erlang/ Golang can be used, etc., mainly to enhance the field of vision.

9. Other Professional Direction study:

In this stage, in addition to the basic LNMP skills, will consider a number of other areas of knowledge learning, these are available, to see personal interests and long-term goal direction. There are many areas where the situation can be selected, for example, cloud computing (distributed storage, distributed computing, virtual machines, etc.), machine learning (data mining, pattern recognition, etc., applied to statistics, personalized recommendation), Natural language processing (Chinese participle, etc.), search engine technology, graphic images, speech recognition and so on. In addition to these tall, there are many partial engineering can learn places, such as high-performance systems, mobile development (Android/ios), computer security, embedded systems, hardware and other directions.

10. System Design:

System design on the basis of the second stage, can apply the master experience skills, design a more complex medium and large system, can solve most of the various complex system problems, complete similar browser-> CDN-> load balanced-> access layer-> nginx+php-& Gt The business cache-> Database-> complex back-end RPC interactions (storage backend, logical backend, back-end of cheat, external service)-> more complex business of back-end purple, can support the normal development and maintenance of tens of millions of to hundreds of millions of traffic websites every day.

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

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.