The core skill points that Linux server developers/architects must master!

Everyone knows that to engage in back-end development is to choose a language first. Today I will share with you that back-end development is done in C/C++. So friends who want to work in this area must have a foundation in C/C++.

The first thing I want to tell you is from the learning steps: (Linux entry to master)

One, Linux development environment

1. Understand the construction of Linux environment, understand LinuxC programming

2. Understand Linux installation, command usage, shell programming

3. Shell script to detect which ip address machines in the LAN are down

Two, Linux C programming

1. Linux C programming counts the number of words in a file

Including: file operation, file pointer

2. Linux C programming to realize the address book

Including: structure

Three, Linux environment programming

1. Concurrent counting scheme

Including: mutexes, spin locks, atomic operations

2. Implement thread pool

Including: thread queue, task queue, condition variable

3. The relationship between CPU and process

Including: process operation, process and CPU bonding, process communication

4. Database operations

Including: database package, sql statement package, network connection package

Four, network programming

1.DNS requestor

Including: UDP communication, DNS protocol, protocol analysis

2. Implement the HTTP requester TCP client

Including: TCP programming, HTTP request protocol

3. Million-level concurrent server TCP server

Including: tcp, network io, Linux system

Summary: After mastering the above knowledge points, your Linux will be relatively mature, reaching the level of a Linux development engineer.

After mastering the above knowledge points proficiently, you can come to understand the following knowledge points: (Linux background development)

1. Algorithm in design

A thousand miles begins with a single step. If you don't accumulate steps, you can't get thousands of miles away. Can both look up at the stars and be down-to-earth

1. Sorting and searching

Including: insertion sort, quick sort, hill sort, bucket sort, radix sort, merge sort

2. Commonly used algorithms

Including: Bloom filter, string matching KMP algorithm, backtracking algorithm, greedy algorithm, recommendation algorithm, depth and breadth first

3. Commonly used data structures

Including: balanced binary tree, red-black tree, B-tree, KMP algorithm, stack/queue

4. Common design patterns

Including: single-column model, responsibility chain model, filter model, publish and subscribe model, agency model, factory model

Two, background component programming

If a worker wants to do his job well, he must first sharpen his tools. Backend components are the starting point for development

  1. Persist MySQL

Including: MySQL installation and configuration and remote connection, data operations derived from SQL statements, stored procedures and transaction processing, SQL functions, operations, temporary tables, data loss prevention backup and recovery, MySQL database building, table building and indexing

2. Message queue ZeroMQ

Including: ZMQ compilation and installation and development environment construction, publisher-subscriber mode realization, request-response mode realization, Router-Dealer mode realization, message queue-performance analysis

3. Cache Redis

Including: Redis compilation and installation configuration, client global unique ID storage mechanism, Redis message queue mechanism publish subscription, Redis transaction actual combat, Redis security performance, data backup and recovery, Redis distributed lock detailed explanation

  1. Reverse proxy Nginx

Including: Nginx development introduction, detailed explanation of reverse proxy load balancing configuration, custom protocol upstream development, subdomain mapping, server background attack prevention, nginx dual virtual host

  1. Restful Http

Including: Http third-party interface implementation, asynchronous Http request, ngrok and Restlet, long and short links

  1. Coordination Service ZooKeeper

Including: ZK compilation and installation and C API development environment, cluster management and service registration, node creation and monitoring, implementation of distributed locks, ZK pseudo cluster deployment and service management

7.NoSQL MongoDB

Including: Introduction to MongDB installation and development, MongoDB backup and recovery, MongoDB document operation, full-text search and regular expressions, MongoDB database building and collection

Three, code engineering

Excellent engineers have excellent code organization and code iteration capabilities.

1. Architecture Engineering

Including: project parameter configuration and compilation cmake, code specification and naming rules, file naming and variable naming rules, script configuration tool autoconf, code engineering organization structure Makefile

  1. Management code

Including: distributed version control system git, remote warehouse, tag management, github and code cloud, warehouse creation, import, checkout, svn environment construction and principles, branch management conflict resolution, product code version management SVN

Four, network service

Network IO is the blood vessel of network communication, and data is blood. The flow of blood cannot leave the blood vessels.

1. Source code implementation

Including: server IO core-epoll programming combat, client multi-network connection mechanism poll, file IO management select

2. Frame

Including: high-performance time loop libev, cross-platform asynchronous I/O libuv, cross-platform C++ library Boost.Asio, event notification library libevent

3. Theory

Including: blocking BIO, asynchronous IO AIO, non-blocking IO NIO

Five, open source framework

If you want to be a thousand miles away, go to the next level. Standing on the shoulders of giants and seeing the scenery outside the window.

1. TCP protocol stack

Including: high-performance user-mode protocol stack f-stack based on DPDK, single-threaded protocol stack NtyTcp based on Netmap, and streamlined tcp protocol stack LWIP

2. Concurrency

Including: OpenCL C++ GPU computing library Boost.Compute, Intel thread building block Intel TBB, open standard OpenCL for parallel programming heterogeneous systems, C++11 reactive programming library C++ React

  1. database

Including: C client library hiredis for Redis database, RocksDB for fast storage of embedded key values ​​of Facebook, C++ object-relational mapping hiberlite for Sqlite3

  1. globalization

Including: Unicode and globalization support C, C++ and Java libraries IBM ICU, encoding conversion library between different character encodings libiconv, GNU gettext

5. Compression

Including: very compact data stream compression library Zlib, fast compression and decompression Snappy, very fast compression algorithm LZ4, single C source file, compression/expansion compression library Miniz

6. Log

Including: The design is very modular and extensible. Boost.Log, flexible add log to file, system log Log4cpp, add log to your C++ application templog, C++ log library, only contains a single header file easyloggingpp

7. Multimedia library

Including: open source audio library-cross-platform audio API OpenAL, network real-time streaming media communication WebRTC, audio and music digital signal processing library Maximilian, C++ easy-to-use and efficient audio synthesis Tonic

  1. Serialization

Including: fast data exchange format and RPC system Cap'n Proto, protocol buffering, Google's data exchange format ProtoBuf, efficient cross-language IPC/RPC Thrift, memory efficient serialization library FlatBuffers

9.XML library

Including: Gnome's xml C parser and toolkit LibXml2, single fast C++CML parser TinyXML2, simple and fast XML parser PugiXML, C++ xml parser LibXml++

10. Script

Including: small fast scripting engine Lua, Google's fast JavaScript engine V8, embedded scripting language ChaiScript,

11.Json library

Including: C language library Jansson for encoding, decoding and processing Jason data, JSON parsing and printing library ibjson in C language, lightweight JSON library libjson, C/C++ Jason parsing generator Frozen

12. Math Library

Including: high-quality C++ linear algebra library Armadillo, mathematical graphics template library GMTL, C/C++ library GMP for high-precision calculations, advanced C++ template header file library Eigen

13. Security

Including: GnuTLS, a secure communication library for SSL, TLS and DTLS protocols, a fully functional, open source encryption library Openssl, and a free C++ library Cryto++ related to encryption schemes

14. Web application framework

Including: safe and fast open source web server Lighttpd, web framework QDjango based on Qt library, high-performance HTTP and reverse proxy web server Nginx

15. Network library

Including: C asynchronous network development library Dyad.c, multi-protocol file transfer library Curl, high-speed modular asynchronous communication library ZeroMQ, C++ object-oriented network toolkit ACE

16. Asynchronous events

Including: event notification library libevent, cross-platform asynchronous I/O libuv, full-featured, high-performance time loop libev, network and low-level I/O programming cross-platform C++ library Boost.Asio

17. Coroutine

Including: pure c version of the coroutine framework ntyco, C++11 implementation coroutine library, golang style libgo, WeChat support 800 million users online at the same time the underlying IO library libco

Six, performance test

Learning without thinking means nothing, thinking without learning means nothing. Understand the principles of knowledge from technical feedback.

1. Debug library

Including: Boost test library Boost.Test, memory debugging performance analysis tool Valgrind, Google C++ testing framework GoogleTest, memory allocation tracking library MemTrack

2. Test library

Including: unit testing framework minUnit, test case writing libtap, lightweight C++ unit testing framework UnitTest++, automated test cases gtest and luatest

3. Performance tools

Including: high-performance code construction system tundra, Http pressure measurement tool WRK, website pressure measurement tool webbench, high-performance construction system FASTBuild

Seven, Linux system

God closes a door and opens a window. Linux is another window of the programmer's world.

1. System Command Tool

Including: inter-process communication facility status ipcs, Linux system running time uptime, CPU average load and disk activity iostat, monitoring, collecting and reporting system activity sar, monitoring multi-processor usage mpstat, monitoring process memory usage pmap, system management Staff tuning and benchmarking tool nmon, pay close attention to Linux system glances, check system calls strace

  1. Basic command tools

Including: system process status ps, virtual memory statistics tool vmstat, console traffic monitoring tool vnstat, process monitoring tools atop, htop, memory usage status free

3. Network parameter tool

Including: Linux network statistics monitoring tool netstat, display and modify network interface controller ethtool, network data packet analysis sharp edge tcpdump, remote login service standard protocol telnet, obtain real-time network statistics information iptraf, display the network interface bandwidth usage on the host iftop

4. Disk parameter tool

Including: disk unmount umount, read, convert and output data dd, file system system df, disk mount mount

5. Log monitoring tool

Including: real-time network log analyzer GoAccess, multi-window log monitoring MultiTail, log analysis system LogWatch/Swatch

6. Parameter monitoring tool

Including: monitoring the overall performance of apache network server apachetop, ftp server basic information ftptop, IO monitoring iotop, power consumption and power management powertop, monitoring mysql threads and performance mytop, system operating parameter analysis htop/top/atop

Linux server development/architect learning roadmap is a full-family map, involving each technical point.
Insert picture description here
Summary: The above knowledge points are more, but if you want to truly understand the background development, you must understand and master these knowledge points. It will be used in your future work. If you are proficient in the above knowledge points, you will reach the level of a back-end development engineer.

Today, the editor shared with you here, and also compiled some personally good C/C++Linux server development/senior architect [System benchmarking Tencent T8] learning route, and some C/C++ Linux server architecture Teacher learning materials (including C/C++, Linux, golang technology, Nginx, ZeroMQ, MySQL, Redis, fastdfs, MongoDB, ZK, streaming media, CDN, P2P, K8S, Docker, TCP/IP, coroutine, DPDK, ffmpeg Etc.) If you are in need, you can + group 960994558 (VX: lingsheng_1314).
Insert picture description here
Insert picture description here
Follow-up will also share C/C++linux server development technology teaching. Friends who are interested can pay attention to the editor.Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_52622200/article/details/114980704