laitimes

C++ Linux Server Architect Learning Path (Tencent T9 Certification)

author:QT Tutorials
C++ Linux Server Architect Learning Path (Tencent T9 Certification)

This set of learning routes can mainly help you master the necessary technical points of server background development positions in 3-8 months, strengthen theoretical knowledge, and realize pure handwritten projects led by project application. Suitable for 1-3 years of work, with a sense of crisis, and urgently needs to go to the senior position of a large factory; After working for 5--8 years, it is urgent to check and fill the gaps to improve the technical level; Features of the learning route: server background development knowledge points, including C/C++, Linux, Nginx, ZeroMQ, MySQL, Redis, fastdfs, MongoDB, ZK, streaming media, CDN, P2P, K8S, Docker, TCP/IP, coroutine, DPDK, etc., with the product architecture of large-scale Internet landing as the core, cultivate all-round professional C/C++ development engineers in the Linux field. Here's our learning path:

1. Refine the cornerstone column

1. Data structure and algorithm

The first is our red-black tree, including: red-black tree application scenario process scheduling CFS, memory management, mathematical proof and derivation of red-black tree, left-handed and right-handed rotation of red-black tree, implementation and addition of red-black tree addition and proof of three cases, implementation of red-black tree deletion and proof of deletion of four cases, thread-safe practice of red-black tree, analysis of practical characteristics of red-black tree engineering.

To get the red and black tree, the next thing is the disk storage chain B-tree and B+ tree, what needs to be learned is: disk structure analysis and data storage principle, the application of multi-fork tree and the definition proof of B-tree, two splits of B-tree insertion, B-tree deletion before and after borrowing and node merging, hand tearing B-tree insertion, deletion, traversal, search, B+ tree definition and implementation, B+ leaf sub-node before and after pointers, B+ tree application scenarios and practical characteristics, B+ tree thread safety practices.

The next thing we have to learn is the Hash and BloomFilter and bitmap of massive data deduplication, the knowledge points involved: the principle of hash and the implementation of hash functions, the application scenarios of hash, the implementation principle of distributed hash, the mathematical derivation and proof of massive data deduplication Bloom filter, and the Bloom filter.

C++ Linux Server Architect Learning Path (Tencent T9 Certification)

With these knowledge points, our data structures and algorithms have almost learned, and I will continue to learn design patterns.

2. Design pattern

Design patternWe first need to master the creative design pattern, which requires knowledge points: singleton pattern, strategy mode, observer pattern, factory method pattern and abstract factory pattern, prototype pattern.

The second thing to master is: structural design mode: adapter mode, agent mode, chain of responsibility mode, state mode, bridge mode, combined mode.

After learning the design patterns, we can learn about the new features of C++.

C++ Linux Server Architect Learning Path (Tencent T9 Certification)

3. New features of C++

The new features of C++ recommend learning stI containers, smart pointers, and regular expressions, including: the usage and principle of atomic, thread_ local and condition_ var iable, exception handling exception ptr, error handling. The usage and principle of category and coroutine.

After learning the new features above, let's learn threads, coroutines, atomic operations, lamda expressions, mainly learning these: the usage and principle of atomic, thread_ loca | and condition_ var iable, exception handling exception_ PTR, error handling error_ category, and the usage and principle of coroutine.

After learning the new features of C++, we need to learn Linux project management.

4. Linux project management

The first thing we need to learn is Makefi le/ cmake/conf igure, detailed knowledge points: Makefile rules and how make works, single-file compilation and multi-file compilation, Makefile parameter passing, multi-directory folder recursive compilation and nested execution make, Makefile wildcards, pseudo-targets, file search, Makefile operation functions and special syntax, conf igure's principle of generating makefiles, how to write cmake, etc.

Next, you need to learn distributed version control git, detailed knowledge points: Git workflow, creation operations and basic operations, branch management, view commit history, Git server construction, etc.

After mastering the above technical points, you need to learn Linux system runtime parameter commands, this knowledge point is a bit much, learning may feel boring, the knowledge points include: inter-process communication facility status ipcs, Linux system runtime upt ime, CPU load average and disk activity iostat, monitoring, collecting and reporting system activity sar, monitoring multiprocessor usage mpstat, monitoring process memory usage pmap, System administrator tuning and benchmarking measurement tool nmon, pay close attention to Linux system glances, view system call strace, ftp server basic information ftptop, power consumption and power management powertop monitor mysql threads and performance mytop, system operation parameter analysis htop/top/atop, Linux network statistics monitoring tool netstat, display and modify network interface controller ethtool, network packet analysis blade tcpdump, remote login service standard protocol telnet, obtain real-time network statistics iptraf, display host network interface bandwidth usage iftop, etc.

C++ Linux Server Architect Learning Path (Tencent T9 Certification)

2. High-performance network design column

1. Self-developed network library: asynchronous network library ZVNET

First of all, you need to master the network IO and IO multiplexing epoll, kqueue (project), detailed knowledge points: socket. and file descriptor association, multiplexing select/poll, code implementation LT/ET difference.

Secondly, you need to master the principle and implementation (project) of event-driven reactors, covering the knowledge points: the advantages of reactors for business implementations, epoll encapsulation send_ CB/recv_ CB/accept_ _cb, Reactor's multi-core implementation, cross-platform (select/epoll/kqueue) encapsulated reactor.

Finally, you need to master the implementation of HTTP server (project), covering the knowledge points: Reactor SendBuffer and RecvBuffer encapsulate HTTP protocol, HTTP protocol format, finite state machine FSM parsing HTTP, other protocols WebSocket, TCP file transmission.

2. Network principle

First of all, we need to master the server million concurrent implementation (practical operation), the main knowledge points include: data differences between synchronous processing and asynchronous processing, asynchronous processing of network IO thread pool, million-level support of FD of ULIMIT, sysct 1. Conf's RMEM and WMEM tuning, and principle analysis of ConnTrack.

The second is redis, memcached, nginx network components (theory), including: redis single-threaded reactor implementation, memcached's multi-threaded master-wor ker reactor implementation, nginx's multi-process reactor implementation, multi-process reactor pit, swarm, shared memory.

The third thing to master is the Posix API and the network protocol stack (theory), the main knowledge points: connect, listen, accept and three handshakes, li sten parameter back log, syn flooding solution, close and four waves, 11 state transfers, a large number of close_ wait and time_ wait reasons and solutions, TCP keepalive and application layer heartbeat package, Congestion control with sliding windows.

Finally, we need to master the reliable transmission protocol QUIC (project) of UDP, covering the knowledge points: the advantages and disadvantages of UDP, the design scheme of UDP high concurrency, why QQ chose UDP as a communication protocol in the early stage, the principle of UDP reliable transmission, the design principle of the QUIC protocol, the open source scheme of QUIC, and the design scheme and algorithm principle of KCP.

C++ Linux Server Architect Learning Path (Tencent T9 Certification)

3. Self-developed framework: implementation of coroutine framework NtyCo (two projects)

The first project is the coroutine design principle and assembly implementation (project), the main knowledge points: 3 reasons for the existence of coroutines, synchronous and asynchronous performance, server-side asynchronous processing, client asynchronous requests, coroutine primitives switch, resume, yield, three implementations of coroutine switching, set jmp/long jmp, ucontext, assembly implementation, assembly implementation register explanation, coroutine initial start EIP register settings, coroutine stack space definition, Practices of independent stacks and shared stacks, coroutine struct definitions.

The second project is coroutine scheduler implementation and performance testing (project), covering technical points: scheduler definition analysis, timeout collection, ready queue, IO wait set implementation, coroutine scheduling execution process, coroutine interface implementation, asynchronous process implementation, hook hook implementation, coroutine implementation mysq|request, coroutine multicore scheme analysis, coroutine performance testing.

4. Self-developed framework: implementation of user-mode protocol stack based on DPDK (three projects)

The first project is the user-mode protocol stack design and implementation (project), in which the technical points: the existence scenario and implementation principle of the user-mode protocol stack, NetMap open source framework, ETH protocol, IP protocol, UDP protocol implementation, ARP protocol implementation, ICMP protocol implementation.

The second project is the specific implementation (project) of the application layer POSIX API, in which the knowledge points: socket/bind/listen implementation, accept implementation, recv/send implementation, sliding window/slow start explanation, retransmission timer, adhere to timer, time_ wait timer, keepalive timer

The third project is the hands-on design and implementation of epoll (project), the main knowledge points: epoll data structure encapsulation and thread-safe implementation, protocol stack fd-ready callback implementation, epo11 interface implementation, LT/ET implementation.

5. High-performance asynchronous IO mechanism io_ uring

First of all, you need to learn the io_ uring (project) comparable to epoll, the main knowledge points: io_ uring system call io_ _uring_ setup, io_ _uring_ register, io_ _uring_ enter, liburng's io_ _uring relationship, io_ uring and EPO11 performance comparison, io_ _uring shared memory mechanism.

Then we need to learn the use cases (theory) of io_ uring, which include: irusgecect con. RV, END implementation mechanism, io_ uring network read and write, io_ uring disk read and write, proactor implementation.

3. Basic component design

1. Pool components (three projects)

The first handwritten thread pool and performance analysis (project), which mainly includes: asynchronous processing usage scenarios of the thread pool, the component of the thread pool, the task queue execution queue, task callback and conditional waiting, the dynamic anti-shrinking of the thread pool, and extension: Comparison and analysis of nginx thread pool implementation.

The implementation and scenario analysis of the second memory pool (project) mainly includes: application scenario and performance analysis of memory pool, memory small block allocation and management, memory large block allocation and management. , handwritten memory pool, structure encapsulation and API implementation, two universal ways to avoid memory leaks, 3 tools to locate memory leaks, extension: nginx memory pool implementation.

The implementation of mysqI connection pooling (project) covers two factors affecting connection pool performance, TCP connection and mysql authentication, connection request return policy, connection timeout and unreturned policy, link disconnection and reconnection strategy, and optimal number of connections strategy.

2. High-performance components

It includes six small projects, the first is the atomic operation CAS and lock implementation (project), the main knowledge points: the use scenario and principle of mutexe, the performance analysis of spinlocks, the assembly implementation of atomic operations;

The second is the implementation of RingBuffer (project) of lock-free message queue, which mainly includes: lock-free queue performance, memory barrier Barrier, array lock-free queue design implementation, and linked list lock-free queue design implementation;

The third is the timer scheme red and black tree, time wheel, minimum heap (project), the main knowledge points: the use scenario of the timer, the red and black tree storage of the timer. , the implementation of the time wheel, the implementation of the minimum heap, the implementation of the distributed timer;

The fourth is the handwritten deadlock detection component (project), the main knowledge points include: the phenomenon and principle of deadlock, pthread_ mutex_ implementation of I ock/ pthread_ _mutex_ _unlock dlsym, the construction of directed graphs, the existence of a directed graph DFS judgment ring, three primitive operations lock_ before, lock_ after, unlock_ after, the implementation of deadlock detection threads;

The fifth handwritten memory leak detection component (project) mainly includes, memory leakage phenomenon, third-party memory leakage and code memory leak, dIsym implementation of mal loa and free, memory detection strategy, and application scenario testing;

The sixth is the knowledge points covered by the hand-in-hand implementation of distributed locks (projects): multi-threaded resource contention mutexes, spin locks, abnormal cases of locking, implementation of unfair locks, and implementation of fair locks.

3. Open source components

The first thing to master is the asynchronous log scheme log4cpp (project), which contains knowledge points: log database performance bottleneck analysis, asynchronous log library design and implementation, batch write and double cache rush mechanism, log recovery after crash;

The second thing to learn is the application layer protocol design ProtoBuf/Thrift (project), covering the knowledge points: IM, cloud platform, nginx, http, redis protocol design, how to ensure message integrity, hand-torn protobuf IM communication protocol, protobuf serialization and deserialization, protobuf coding principle.

C++ Linux Server Architect Learning Path (Tencent T9 Certification)

4. Middleware development column

1、Redis

(1) Detailed explanation of Redis related commands and their principles

  • str ing,set,zset,list,hash
  • Implementation of distributed locks
  • Lua scripts address ACID atomicity
  • Analysis of the ACID nature of Redis transactions

(2) Redis protocol and asynchronous mode

  • Redis protocol parsing
  • Special protocol operations subscribe to publications
  • Hand tear asynchronous redis protocol

(3) Storage principle and data model

  • Three ways to encode a string is int, raw, embstr
  • List implementation of a doubly linked list
  • Dictionary implementation, hash function
  • Resolve key conflicts and rehashes
  • Implementation and data demonstration of jumping tables
  • Integer collection implementation
  • Compressed list proof-of-principle

(4) Master-slave synchronization with the object model

  • The type and encoding of the object
  • String object
  • List object
  • Hash object
  • Collection object
  • Ordered collections
  • Type detection and command polymorphism
  • Memory reclamation
  • Object sharing
  • The length of time the object is idle
  • Redis has 3 clustering methods: master-slave replication, sentinel, and cluster
  • 4 persistence solutions

2、MySQL

(1) SQL statements, indexes, views, stored procedures, triggers

  • MySQL architecture, SQL execution flow
  • SQL CURD and advanced queries
  • Views, triggers, stored procedures
  • MySQL permission management

(2) MySQL indexing principle and SQL optimization

  • Indexes, constraints, and the difference between them
  • B+ trees, clustered indexes, and secondary indexes
  • The leftmost match principle as well as the overriding index
  • Index invalidation and index optimization principles
  • EXPLAIN execution planning and optimization selection process analysis

(3) MySQL transaction principle analysis

  • The ACID nature of the transaction
  • MySQL concurrency issues dirty read, non-repeatable read, phantom read
  • Transaction isolation level
  • The type of lock, the lock algorithm implementation, and the lock operation object
  • S lock X lock IS lock IX lock
  • Record lock, gap lock, next-key lock
  • Insert intent lock, self-increment lock
  • Anatomy of the MVCC principle

(4) MySQL caching policy

  • Read/write splitting, the scenario of connection pooling, and its limitations
  • Analysis of cache policy issues
  • Strong consistency solution for caching policies
  • Caching policy eventual consistency solution
  • 2 mysq|cache synchronization schemes from the database with trigger +udf
  • Cache synchronization open source solution go-mysql-transfer
  • Analysis of the principle of canal, an open source scheme for cache synchronization
  • 3 types of cache failure, cache breakdown, cache penetration, cache avalanche

3、Kafka

(1) Kafka usage scenarios and design principles

  • Publish-subscribe mode
  • Peer-to-peer messaging
  • Kafka Brokers principle
  • Topics和Partition

(2) Kafka storage mechanism

  • Partition storage distribution
  • Partition file storage mechanism
  • Segment file storage structure
  • offset to find message
  • Efficient file storage design

4. The cornerstone of communication between microservices, gRPC

(1) Internal component associations of gRPC

  • ClientSide with ServerSide, Channel, Ser ivce, Stub concept
  • Implementation of asynchronous gRPC
  • Asynchronous call in callback mode
  • Server and Client implementations of RPC

(2) gRPC communication protocol based on http2

  • It is constructed based on the HTTP protocol
  • ABNF syntax
  • Request protocol Request-Headers
  • gRPC. Context passing

5、Nginx

(1) Nginx reverse proxy and system parameter configuration conf principle (practical)

  • Configuration of NGINX static files
  • Nginx dynamic interface proxy configuration
  • Nginx forwards the MQTT protocol
  • Ng inx to RTMP push-pull streams
  • Openresty for Redis caching data proxy
  • Three implementations of SHMEM
  • Atomic manipulation
  • ng inx channe l
  • Signal
  • Semaphores

(2) Nginx filter module implementation (project)

  • How the Nginx Filter module works
  • The order in which the linked list is filtered
  • Module development data structure ngx_ str. _t, ngx_ list. t, ngx. _buf _t,ngx. _chain_t
  • Usage of the error log
  • ngx_ comond_ t's explanation
  • ngx_
  • _http_ module_ T execution flow
  • File locks, mutexes
  • slab shared memory
  • How to solve the problem of "shocking herds"
  • How to implement load balancing

(3) Nginx Handler module implementation (project)

  • How the Nginx Handler module works.
  • ngx_ module_ t/ngx_ http_ module__t explained
  • ngx_ http_ _top_ body_ filter/ngx_ http_ top_ header__filter principle
  • How to use ngx_ rbtree_ t
  • ngx_ rbtree custom add method
  • Nginx's core data structures ngx_ cycle_ t, ngx_ event_ moule_ t
  • 11 stages of processing HTTP requests
  • HTTP packet body processing
  • HTTP response sent
  • Design and implementation of the Nginx Upstream mechanism
  • Module performance testing

5. Open source framework column

1. Game server development skynet

(1) Skynet design principles

  • Multi-core concurrent programming - multi-threading, multi-process, CSP model, Actor model
  • Actor model implementations - Lua service and C service
  • Message Queuing implementation
  • actor message dispatch

(2) Skynet network layer encapsulation and Iua/c interface programming

  • SkyNet Reactor network model encapsulation
  • socket/socketchanne| encapsulation
  • Hand torn high-performance C service
  • Lua programming and Lua/C interface programming

(3) Skynet important components and hand-torn game projects

  • Basic interface skynet. send, skynet. call, skynet. response
  • Broadcast component multicastd .
  • The data sharing component sharedatad datasheet
  • Hand tear 10,000 people while playing online

2. Distributed API Gateway

(1) High-performance web gateway Openresty

  • NGINX and the Lua module
  • Openresty accesses Redis, MySQL
  • Restful API interface development
  • Openresty performance analysis

(2) Kong dynamic load balancing and service discovery

  • "Gou" between nginx, openresty, Kong
  • The principle of dynamic load balancing
  • The principle of service discovery implementation
  • Server less
  • Monitoring, fault detection and recovery
  • Proxy layer caching and response services
  • System logs

3. File system implementation of high-performance storage SPDK (project)

(1) The working principle of SPDK and file system architecture analysis

  • The principle of NVMe and PCle.
  • RPC between NVMe Controller and bdev
  • The relationship between blobstores and blobs

(2) PoSIX API implementation of the file system

  • 4-layer structure design VFS
  • SPDK's asynchronous transformation of the PoSix synchronization API
  • Implementation of open/wr ite/read/close

(3) Performance test of the file system

  • iIOeEngine implementation of Fio
  • I odepth explains
  • Random read, random write, sequential read, sequential write

4. High-performance computing CUDA

(1) GPU parallel computing CUDA development process

  • Heterogeneous computation of CPU + GPU
  • GPUs in computer architecture
  • CUDA's environment is set up with NVCC and the use of srun
  • CUDA's vector addition and matrix multiplication
  • MPI and CUDA

(2) Parallel computing in audio and video codecs

  • CUDA's H264 codec
  • MPEG codec for CUDA
  • CUDA support for FFMPEG

5. Parallel computing and asynchronous network engine workf low

(1) Application scenarios of workflow

  • Workflow's programming paradigm and design philosophy
  • Request implementation for mysql/redis/kafka/dns
  • Parallel processing and task assembly

(2) Component implementation of workflow

  • Thread pool implementation
  • DAG diagram tasks
  • Implementation of msgqueue
  • Pure C's jsonparser implementation

6. MOSQUITTO, the implementation framework of the IoT communication protocol MQTT

(1) Efficient use scenarios of MQTT

  • MQTT's publish-subscribe model
  • Solve data transfer in low-bandwidth network environments
  • 3 Qos levels
  • 0Auth and JWT security certification

(2) MQTT's broker

  • MQTT's will mechanism
  • Publish-subscribe filters
  • Mosquitto's docker deployment
  • MQLt's logs are monitored in real time
C++ Linux Server Architect Learning Path (Tencent T9 Certification)

6. Cloud native column

1、Docker

(1) Kernel functions under the scenery of Docker

  • Process namespace
  • UTS namespace
  • IPC namespace
  • Network namespace
  • File system namesapce
  • Resource control for CGR OUP

(2) Docker container management and image operation

  • Docker image download runs with the image
  • Docker storage management
  • Docker data volumes
  • Docker and container security

(3) Docker Network Management (Project)

  • 5 Docker network drivers
  • PipeWork communicates across hosts
  • OvS divides VLANs into tunnel modes
  • GRE enables cross-host Docker-to-host communication

(4) Docker Cloud and Container Orchestration (Project)

  • The syntax flow of Dockerfile
  • Fig/Compose
  • Flynn architecture
  • What has Docker changed?

2、Kubernetes

(1) K8S environment construction

  • K8s cluster security settings
  • K8s cluster network settings
  • K8S core service configuration
  • kubect|command tool
  • yaml file syntax

(2) Usage of pods and services

  • Management configuration of pods
  • Pod upgrade and rollback
  • DNS service for k8s
  • http Layer 7 policies and TLS security settings

(3) Those things (projects) of k8s cluster management

  • Management of Node
  • Namespace isolation mechanism
  • K8S cluster log management
  • K8S cluster monitoring

(4) k8s secondary development and k8s API (project)

  • RESTful interface
  • API aggregation mechanism
  • API groups
  • Go access k8s API
C++ Linux Server Architect Learning Path (Tencent T9 Certification)

7. Performance analysis column

1. Performance and testing tools

(1) Test framework gtest and memory leak detection

  • Goog LeTest and Goog | emock file
  • Function instrumentation and class testing
  • Test fixture Test fixture
  • Type parameterization
  • Event testing
  • memory leak
  • Set expectations, expect parameters, number of calls, meet expectations

(2) Performance tools and performance analysis

  • MySQL performance testing tool mysqlslap
  • Redis performance testing tool redis-benchmark
  • HTTP performance testing tool WRK
  • TCP performance testing tool TCPBenchmarks
  • Disk, memory, network performance analysis

(3) The generation principle and construction method of the flame diagram

  • Flame Diagram tool explained
  • Flame diagrams use scenarios and principles
  • nginx dynamic flame diagram
  • MySQL flame diagram
  • Redis flame diagram

2. Observation technology BPF and EBPF

(1) The implementation principle of core BPF

  • tracking, sniffing, sampling,
  • Observable understanding
  • Dynamic hooks: KPR OBE/ UPR OBE
  • Static hooks: tracepoint and USDT
  • Performance monitoring timer PMC mode
  • CPU observation taskset use
  • BPF tool bpftrace, BCC

(2) BPF's observation of kernel function

  • Memory observation kmalloc and vm_ area_ struct
  • The file system observes the status of VFS
  • Observation bitesize of disk io, mdf lush
  • BPF statistics on network traffic
  • BPF observations of REDIS--Server
  • Network observation tcp_ connect, tcp_ accept, tcp_ close

3. Kernel source code mechanism

(1) What is the process scheduling mechanism

  • QEMU debug memory
  • Process scheduling CFS with four other scheduling classes
  • task_ struct structure
  • RCU mechanism and memory optimization barrier

(2) Kernel memory management operation mechanism

  • Virtual memory address layout
  • SMP/NUMA model
  • How page tables and page table caching work
  • Partner system implementation
  • Block allocation (SIab/Slub/Slob) principle implementation
  • BRK/KMALLOC/VMAL LOC SYSTEM CALL FLOW

(4) File system components

  • Virtual file system VFS
  • Proc file system
  • super_ block with inode struct
  • File descriptors and mount processes
C++ Linux Server Architect Learning Path (Tencent T9 Certification)

8. Distributed architecture column

1. Distributed database

(1) Different kv storage RocksDB usage scenarios

  • Prefix search
  • Low-priority writes
  • Survival time support
  • Transactions
  • Snapshot storage
  • The database engine for the log structure

(2) The principle of TiDB storage engine

  • TiKV's Key-Value storage engine
  • RBAC-based permission management
  • Data encryption

(2) The principle of TiDB storage engine

  • TiKV's Key-Value storage engine
  • RBAC-based permission management
  • Data encryption

(3) TiDB cluster solution and replication principle

  • The three components of the cluster are TiDB Server, PD Server, and TiKV Server
  • Raft protocol explained
  • OLTP与OLAP

2. Distributed file system

(1) Distributed storage Ceph supported at the kernel level

  • Ceph's cluster deployment
  • monitor与0SD
  • CEPH 5 core components
  • Ceph cluster monitoring
  • CEPH performance tuning and benchmarking

(2) Distributed CEPH storage cluster deployment

  • Synchronization mechanism
  • Linear expansion
  • How to achieve high availability
  • Load balancing

3. Distributed collaboration

(1) Registration Service Center Etcd

  • etcd configures services, service discovery, cluster monitoring, leader election, and distributed locks
  • etcd architecture in detail (gRPC, WAL,
  • Snapshot、BoItDB、 Raft)
  • etcd storage principle in-depth analysis (B-tree, B+ tree)
  • etcd read and write mechanism and analysis of ACID characteristics of transactions
  • Raft consensus algorithm explained (leader election + log replication)

(2) Collaborative event user-mode file system fuse (project)

  • Use cases for fuse
  • File system read and write events
  • The implementation principle of fuse
  • The role of /dev/fuse

(3) The core technology of Kuaibo reveals the implementation of the P2P framework

  • Gateway NAT table analysis
  • NAT type, full taper NAT, symmetric NAT, port restriction cone NAT, IP limit cone NAT
  • The code logic implements NAT type detection
  • The principle of network penetration
  • 3 cases of network penetration

9. Practical operation of online projects

1. DKVSTORE implementation (project)

(1) Architecture design of KV storage

  • Storage node definition
  • tcp server/cl ient
  • Hash data storage
  • List data storage
  • Skiptable data storage
  • RBtree data storage

(2) Network synchronization and transaction serialization

  • Serialization and deserialization formats
  • Establish transactions versus release transactions
  • Thread-safe processing

(3) Performance test of KV storage

  • Network test TPS
  • Throughput testing
  • hash/list/sk iptab le/rbtree测试

2. Graph bed shared cloud storage (project)

(1) FastDFS architecture analysis and configuration

  • FastDFS architecture analysis
  • Quickly configure fastdfs
  • Upload file logical analysis
  • Download the file Logic Analysis

(2) File transfer and interface design

  • HTTP interface design
  • Graph bed database design
  • The function of uploading, downloading and sharing the image bed file is realized
  • Business process implementation

(3) Product release/test cases on the cloud public network

  • HTTP interface design
  • Graph bed database design
  • The function of uploading, downloading and sharing the image bed file is realized
  • Business process implementation

3. Microservice instant messaging (project)

(1) IM instant messaging project framework analysis and deployment

  • Architecture division of access layer, logical layer, and persistence layer
  • Real-time message analysis
  • Instant messaging database design
  • The principle of single chat and group chat messages
  • Group member management
  • How unread messages work
  • Use of pooling technology
  • Quick Configuration|Project M

(2) IM message server/file transfer server

  • Protobuf communication protocol design
  • Database table sharding design
  • The reactor million concurrency model
  • login_ Server load balancing
  • Login request-response model

(3) Message server/routing server

  • Request login logic
  • Recent contact session logic
  • Query user online topics
  • Unread message mechanism
  • Single-chat message push-pull mechanism
  • Group chat message push and pull mechanism
  • Route forwarding mechanism

(4) Database proxy server design

  • The main function main process
  • Response process
  • Redis cache
  • Message count (single and group chats)
  • Unread message mechanism
  • Group member management
  • Single chat group chat

(5) File server and docker deployment

  • Analysis of online file transfer mechanisms
  • Analysis of offline file transfer mechanisms
  • etcd microservice registration and discovery
  • Docker production and deployment

(6) The product is released on the cloud public network / the public network test is launched

  • Unit test cases
  • How testbench is designed
  • IM project performance stress test
  • Customize private features
  • Cloud server deployment