"Code farmers turn over" Book

1. The computer world

  • Thread:

    • Thread running step: ready, waiting, running

    • Multithreading problem

    • Locking, deadlocks, according to the order of application resource lock

  • TCP/IP

    • Unreliable channel transmission reliability

    • TCP three-way handshake and four wave

    • Sliding window protocol

  • CPU

    • CPU 100 times faster than memory, a million times faster than a hard disk.

    • Register, program counter

    • Principle of locality

  • process

    • Batch system

    • The process of recording a blog, command value, time-consuming and registers, etc.

    • Address redirection

  • hard disk

    • Track, sector

    • File, the file system

  • I / O device

    • Bus and port

    • Polling, interrupt

  • database

    • Inquire

    • Concurrent access

    • Atomic questions

    • safe question

  • socket

    • Package TCP connection

  • Translator

    • Machine language, assembly language, high-level language

    • Translation process: Source -> lexical analysis -> syntax analysis -> Semantic Analysis -> intermediate code generation -> code optimization -> Code Generation -> target program

  • Lock programming world

    • Shared variable, lock contention, spin lock, the lock atomicity, not reentrant.

    • Semaphore: queue will wait, signal, full, enpty package

  • Recursion

    • Function stack frame

    • Tail recursion, stack frame multiplexing

 

2.Java Empire

 

 

3. The top of the wave of Web

  • web origins

    • Hypertext Markup Language

    • Hypertext Transfer Protocol

  • communication

    • Shared memory communication

    • socket communication: the need for IP and port, but unsafe

    • web通信:HTTP(80)、HTTPS(443)

    • HTTP segment packaged in TCP segment, the data packet into the IP layer, a link layer frame is formed, by issuing the gateway.

  • HTTPS

    • Symmetric encryption

    • RSA asymmetric encryption

    • Asymmetric encryption symmetric encryption +

    • Seizure intermediary asymmetric public key encryption

    • Digital Certificates

  • CASE

    • Share and share session cookie is more limited approach

    • Certification Center: Create session, create Ticket, redirection

    • 2 redirects, once verified Ticket

  • Token and authorization

    • Return Authorization Number

    • Token obtain the authorization code

  • database

    • Structured Query Language: SQL

    • Database link channel: the need for buffer

  • Redis

    • 支持:key-value、List、Set、Sorted Set、Hash

    • Remainder algorithm: According to the modulo hash key, and very unfriendly to add nodes

    • Consistency Hash algorithms: add or delete server cache data will only affect adjacent nodes

    • Hash slot (slot): CRC16 algorithm, taking the slot value of more than increase the node can do data migration, access redirection.

    • Redis Cluster: failover, data backup

  • Availability Nginx

    • Multiple servers master-slave structure formed Keepalived

    • Foreign provides only one IP

  • Availability Tomcat

    • Tomcat cluster

    • Load Balancing

    • Failover: request to transfer server cluster, the state information need to be retained, by redis.

  • Mysql High Availability

    • Database separate read and write

    • Need a distributed environment, maintaining strong data consistency.

    • A master, a plurality of slave structures.

  • function

    • Local procedure calls: all calls occur in a process within the machine.

    • Remote Procedure Call (RPC): Customer Agent (Stub) receive parameters, and then to the proxy server (Skeleton) by socket handle, the complex network details hidden.

  • frame

    • The functional unit frame is extracted, formed in the reusable.

    • Best practice: system architecture design, cache, performance, high availability, distribution, security, backup.

  • HTTP Server1.0

    • Receiving HTTP Request, after processing .html, the document is sent back through the HTTP Response text.

    • The need to establish the HTTP layer below the TCP channel, the channel link is established by Socket. For example: socket, bind, listen, accept. The default is 80 channels, generally will not be blocked by the firewall.

    • This process is a single, easy to block.

  • HTTP Server2.0

    • More complicated process

    • Switching process consumes a lot of resources

  • HTTP Server3.0

    • select model:

      • A socket link is a file descriptor fd, is an integer, behind fd is a simple data structure.

      • HTTP Sever transfer between the operating system and the data structure of a fd_set

      • The operating system detects whether data is then marked with data socket, and finally wake HTTP Server execution.

  • HTTP Server4.0 epoll model

    • And similar select models, is the operating system detects whether there is to read and write data socket, and then notify the HTTP Sever link traversal 1024 execution.

    • The difference is that the operating system will only tell HTTP Server can read and write socket, HTTP Sever do not traverse all socket links.

 

 

Those things 4. Code Control

  • Human flesh version management

  • Lock file: avoid overwriting each other

  • Allowing the conflict: the broader picture

  • Branch: Multi-Version Concurrency

  • Distributed Management

 

5. A brief history of my programming language

  • Javascript

    • The browser is running out verification

    • XMLHttpRequest partial refresh

    • JSON string

    • Three Musketeers front end: HTML, CSS, Ajax and JSON

    • Node.js service their language

  • The difference between Java and C

    • Java virtual machine, API abstraction layer shields the underlying platform

    • Once the C language editing can be performed independently, with separate processes and separate address spaces

    • The Java compiler followed .class, C language preprocessor, compiler, assembler after the target file.

    • C language is statically linked at compile time and run-time dynamic linking Java when.

  • Programming language

    • C language is close to the hardware of the system-level programming

    • VB desktop application development

    • Java programming for the back-end, back-end programming: load balancing, disaster recovery, caching, messaging, distributed, data backup, search, etc.

  • Imperative programming and declarative programming

    • Imperative programming is the abstraction of the hardware operation

    • The programmer is complex, ambiguous and natural human language is compiled into precise computer language instructions.

    • Declarative Programming: SQL representatives are

 

6. old driver of sophistication

  • Everything must first ride the tiger back

    • There is no thing so completely ready before starting, so you feel completely ready, day lily is cold.

    • For programmers introverted, very often you actually think basically ready enough.

  • Code farmers need to know the "hidden rules"

    • God's rules, locality principle: temporal locality, spatial locality

    • How to deal with the donkey cart and sit by plane

    • Details abandoned: Abstract

    • I just want to deal with neighbors: layered, application layer, transport layer, network layer, link layer, and physical layer.

    • I'm afraid not wait: asynchronous call

    • Major issues to minor ones: the divide and rule

  • Summary of an architect

    • curiosity

    • Develop a way of thinking computers

    • Solid foundation, mastery

    • To get a full understanding of the nature of a technology

    • You can write beautiful code

    • The ability to abstract

    • Technology Leadership

    • A little hard on himself, began writing it

 

7. "code farmers turn over" Book

"Code farming" is a derogatory term, many software engineers for this word is an accurate description. Frequent replacement technology, rapid social development, making the software industry worker, very often weighed down in quiet circles constantly changing technology. The "code farmers turn over," a book helps more "code farmers" to break this limit from a technical nature.

In the "Code farmers turn over," a book not only learn the process, basic computer knowledge thread, CPU, hard disk, I / O devices, etc., but also learned knowledge TCP / IP, socket, HTTP and other aspects of the communications protocol. At the same time in the application programming and planning work has a certain reference value, is well worth a look at the books.

From a different point of view "code farmers turn over" which describes the process of a software engineer career, whether it is for beginners, or those who have accumulated some experience, can provide a guiding beacon.

 

Guess you like

Origin www.cnblogs.com/wuchangliang/p/11080151.html