I. Foundation Chapter
1.1 JVM
1.1.1. Java memory model, Java memory management, Java stack and stack, garbage collection
1.1.2. Understanding various JVM parameters and tuning
1.1.3. Learn to use Java tools
jps, jstack, jmap, jconsole, jinfo, jhat, javap, …
http://kenai.com/projects/btrace
https://github.com/taobao/TProfiler
https://github.com/CSUG/HouseMD
1.1.4. Learn Java diagnostic tools
1.1.5. Write out of memory and stack overflow programs by yourself
HeapOutOfMemory
Young OutOfMemory
MethodArea OutOfMemory
ConstantPool OutOfMemory
DirectMemory OutOfMemory
Stack OutOfMemory Stack OverFlow
1.1.6. Use tools to try to solve the following problems and write a summary.
How to find problems when a Java program responds slowly, how to solve problems when a Java program is frequently FullGC, how to view garbage collection log, how to solve problems when a Java application occurs OutOfMemory, young generation, old generation, permanent generation solutions are different, resulting in different reasons.
1.1.7. References
http://docs.oracle.com/javase/specs/jvms/se7/html/
http://www.cs.umd.edu/~pugh/java/memoryModel/
1.2. Basic knowledge of Java
1.2.1. Read the source code
java.lang.String
java.lang.Integer`` java.lang.Long
java.lang.Enum
java.math.BigDecimal
java.lang.ThreadLocal
java.lang.ClassLoader & java.net.URLClassLoader
java.util.ArrayList & java.util.LinkedList`` java.util.HashMap & java.util.LinkedHashMap & java.util.TreeMap
java.util.HashSet & java.util.LinkedHashSet & java.util.TreeSet
1.2.2. Familiarity with Variable Types in Java
1.2.3. Familiar with the use of Java String and various functions of String
1.2.4. Familiar with various keywords in Java
1.2.5. Learn to use List, Map, Stack, Queue, Set
The above data structure traverses the above data structure using scenario Java to achieve Array/List sorting java.uti.Arrays.sort() java.util.Collections.sort() Java implementations de-duplicate List s by Java implementations, and need to preserve the original order of data occurrence. Java implementations recently use the least cache, using LinkedHashMap.
1.2.6. Java IO & Java NIO and learn to use it
java.io.* java.nio.* nio. and reactor design pattern file encoding, character set
1.2.7. Java Reflection and javassist
Reflection and factory mode java.lang.reflect.*
1.2.8. Java serialization
What is serialization and why is serialization serialization and single-case pattern google serialization protobuf
1.2.9. Virtual Reference, Weak Reference, Soft Reference
java.lang.ref. * Experiments on the recovery of these references
1.2.10. Familiarity with Java system properties
java.util.Properties
1.2.11. Familiar with Annotation usage
java.lang.annotation.*
1.2.12. JMS
javax.jms.*
1.2.13. JMX
java.lang.management.*
javax.management.*
1.2.14. Generics and inheritance, generics and erasure
1.2.15. Automatic Unpacking and Byte Code
1.2.16. Implementing Callback
1.2.17. Use of java.lang.Void class
1.2.18. Java Agent, premain function
java.lang.instrument
1.2.19. Unit testing
Junit,http://junit.org/
1.2.20. Java implementations extract e-mail from a piece of text through regular expressions and replace @ with # output
java.lang.util.regex.*
1.2.21. Learn to use common Java tool Libraries
commons.lang
,commons.*...
guava-libraries
netty
1.2.22. What is API & SPI
http://en.wikipedia.org/wiki/Application_programming_interface
1.2.23. References
JDK src.zip source code
https://code.google.com/p/guava-libraries/
http://stackoverflow.com/questions/2954372/difference-between-spi-and-api
http://stackoverflow.com/questions/11404230/how-to-implement-the-api-spi-pattern-in-java
1.3. Java concurrent programming
1.3.1. Read the source code and learn to use it
java.lang.Thread
java.lang.Runnable
java.util.concurrent.Callable
java.util.concurrent.locks.ReentrantLock
java.util.concurrent.locks.ReentrantReadWriteLock
java.util.concurrent.atomic.Atomic*
java.util.concurrent.Semaphore
java.util.concurrent.CountDownLatch
java.util.concurrent.CyclicBarrier
java.util.concurrent.ConcurrentHashMap
java.util.concurrent.Executors
1.3.2. Learn to use thread pools and what you need to pay attention to when designing thread pools yourself
1.3.3. lock
What are locks? What are the types of locks? What are the characteristics of each lock? What are the applicable scenarios? What are the meanings of locks in concurrent programming?
1.3.4. What is the role of synchronized, synchronized and lock
1.3.5. sleep and wait
1.3.6. wait and notify
1.3.7. Write a deadlock program
1.3.8. What are daemon threads, the differences between daemon threads and non-daemon threads, and their usage
1.3.9. Understanding volatile keywords
C++ volatile Key words and Java volatile Keyword happens-before Semantic compiler instruction rearrangement and CPU Instruction rearrangement
http://en.wikipedia.org/wiki/Memory_ordering
1.3.10. Is the following code thread-safe? Why? Can thread security be achieved by adding volatile modifiers to count? What do you think is thread safe?
public class Sample {
private static int count = 0;
public static void increment() {
count++;
}
}
1.3.11. Explain the difference between the following two pieces of code
// Code 1
public class Sample {
private static int count = 0;
synchronized public static void increment() {
count++;
}
}
// Code 2
public class Sample {
private static AtomicInteger count = new AtomicInteger(0);
public static void increment() {
count.getAndIncrement();
}
}
1.3.12. References
http://book.douban.com/subject/10484692/
http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html
Advanced Chapter
2.1. Java underlying knowledge
2.1.1. Learn about bytecode and class file formats
http://en.wikipedia.org/wiki/Java_class_file
http://en.wikipedia.org/wiki/Java_bytecode
http://en.wikipedia.org/wiki/Java_bytecode_instruction_listings
2.1.2. Writing a program requires the realization of the functions of javap (by hand, without the help of ASM and other tools)
For example, Java source code:
public static void main(String[] args) {
int i = 0;
i += 1;
i *= 1;
System.out.println(i);
}
After compilation, read the class file and output the following code:
public static void main(java.lang.String[]);
Code:
Stack=2, Locals=2, Args_size=1
0: iconst_0
1: istore_1
2: iinc 1, 1
5: iload_1
6: iconst_1
7: imul
8: istore_1
9: getstatic #2; //Field java/lang/System.out:Ljava/io/PrintStream;
12: iload_1
13: invokevirtual #3; //Method java/io/PrintStream.println:(I)V
16: return
LineNumberTable:
line 4: 0
line 5: 2
line 6: 5
line 7: 9
line 8: 16
2.1.3. CPU cache, L1, L2, L 3 and pseudo-sharing
http://duartes.org/gustavo/blog/post/intel-cpu-caches/
http://mechanical-sympathy.blogspot.com/2011/07/false-sharing.html
2.1.4. What is tail recursion
2.1.5. Familiar with bit operations
Using bit operation to realize addition, subtraction, multiplication, division and redundancy
2.1.6. References
http://book.douban.com/subject/1138768/
http://book.douban.com/subject/6522893/
http://en.wikipedia.org/wiki/Java_class_file
http://en.wikipedia.org/wiki/Java_bytecode
http://en.wikipedia.org/wiki/Java_bytecode_instruction_listings
2.2. Design Patterns
2.2.1. Implementing AOP
Differences between CGLIB and Invocation Handler http://cglib.sourceforge.net/
Dynamic Proxy Mode Javassist Implementing AOP http://www.csg.ci.i.u-tokyo.ac.jp/~chiba/javassist/
ASM implementation of AOP http://asm.ow2.org/
2.2.2. Implementing IOC using template design pattern and strategy design pattern
2.2.3. Single-case thread-safe mode without synchronization and lock
2.2.4. nio and reactor design patterns
2.2.5. References
2.3. Knowledge of network programming
2.3.1. Java RMI,Socket,HttpClient
2.3.2. HTTP Server Writing a Simple Static File in Java
Implement client caching function, support returning 304 to download a file concurrently, use thread pool to process client requests, use nio to process client requests, support simple rewrite rule. The above functions need to satisfy the "Open-Close Principle" when they are implemented.
2.3.3. Understand the characteristics of nginx and apache servers and build a corresponding server
2.3.4. Implementing FTP and SMTP protocols in Java
2.3.5. What is CDN? If so? What role does DNS play?
Build a DNS server and build a Squid or Apache Traffic Server server http://www.squid-cache.org/ http://trafficserver.apache.org/ http://en.wikipedia.org/wiki/Domain_Name_System
2.3.6. References
http://www.ietf.org/rfc/rfc2616.txt
2.4. Framework knowledge
Spring, spring mvc, read the main source code ibatis, read the main source code to build java server with spring and ibatis
2.5. Application Server Knowledge
Familiar with using jboss, https://www.jboss.org/overview/ Familiar with using tomcat, http://tomcat.apache.org/ Familiar with using jetty, http://www.eclipse.org/jetty/
3. Advanced Chapter
3.1. Knowledge of Compiling Principles
3.1.1. Use Java to parse and return the following expressions (syntax is similar to select sysdate-1 from dual in Oracle)
sysdate
sysdate - 1
sysdate - 1/24
sysdate - 1/(12*2)
3.1.2. Implement DSL filtering of a List
QList<Map<String, Object>> mapList = new QList<Map<String, Object>>;
mapList.add({"name": "hatter test"});
mapList.add({"id": -1,"name": "hatter test"});
mapList.add({"id": 0, "name": "hatter test"});
mapList.add({"id": 1, "name": "test test"});
mapList.add({"id": 2, "name": "hatter test"});
mapList.add({"id": 3, "name": "test hatter"});
mapList.query("id is not null and id > 0 and name like '%hatter%'");
The last two objects in the list are required to be returned.
3.1.3. Implement the following programs in Java (syntax and variable scope processing are similar to JavaScript):
Code:
var a = 1;
var b = 2;
var c = function() {
var a = 3;
println(a);
println(b);
};
c();
println(a);
println(b);
Output:
3 2 1 2
3.1.4. References
http://en.wikipedia.org/wiki/Abstract_syntax_tree https://javacc.java.net/ http://www.antlr.org/
3.2. Operating system knowledge
Ubuntu Centos uses linux to familiarize itself with shell scripts
3.3. Data Storage Knowledge
3.3.1. Relational database
How MySQL sees the execution plan how to build MySQL backup binlog What is Derby, H2, PostgreSQL SQLite
3.3.2. NoSQL
Cache Redis Memcached Leveldb Bigtable HBase Cassandra Mongodb Graph Database neo4j
3.3.3. References
http://db-engines.com/en/ranking
3.4. Big Data Knowledge
3.4.1. Zookeeper, deploy zk on linux
3.4.2. Solr,Lucene,ElasticSearch
Deploy solr, solrcloud, add, delete, query index on linux
Storm, Flow Computing, Understanding Spark, S4
Deploy storm on linux, coordinate with zookeeper, run storm hello world, local and remote mode, run and debug storm topology.
3.4.4. Hadoop, Offline Computing
Hdfs: Deploy NameNode, Secondary NameNode, DataNode, upload files, open files, change files, delete files
MapReduce: Deploy JobTracker, TaskTracker, and write mr job
Hive: Deploy hive, write hive sql, and get results
Presto: hive-like, but faster than hive, it's worth learning.
3.4.5. Distributed log collection flume, kafka, logstash
3.4.6. Data Mining, mahout
3.4.7. References
https://lucene.apache.org/solr/
3.5. Network Security Knowledge
3.5.1. What are DES and AES
3.5.2. What are RSA and DSA
3.5.3. What is MD5, SHA1
3.5.4. What is SSL, TLS and why HTTPS is relatively secure
3.5.5. What is man-in-the-middle attack and how to avoid man-in-the-middle attack
3.5.6. What are DOS, DDOS, CC attacks
3.5.7. What is a CSRF attack
3.5.8. What is CSS Attack
3.5.9. What is an SQL Injection Attack
3.5.10. What is Hash Collision Denial of Service Attack
3.5.11. Understand and learn the following techniques to enhance security
http://www.openauthentication.org/
HOTP http://www.ietf.org/rfc/rfc4226.txt
TOTP http://tools.ietf.org/rfc/rfc6238.txt
OCRA http://tools.ietf.org/rfc/rfc6287.txt
http://en.wikipedia.org/wiki/Salt_(cryptography)
3.5.12. Sign a certificate with openssl to deploy to apache or nginx
3.5.13. References
http://en.wikipedia.org/wiki/Cryptographic_hash_function
http://en.wikipedia.org/wiki/Block_cipher
http://en.wikipedia.org/wiki/Public-key_cryptography
IV. Extensions
4.1. Relevant knowledge
4.1.1. Cloud computing, distributed, highly available, scalable
4.1.2. Virtualization
4.1.3. Monitoring
4.1.4. Load balancing
4.1.5. Learn to use git
4.1.6. Learn to use maven
4.1.7. Learn to use gradle
4.1.8. Learning a small language
Groovy Scala LISP, Common LISP, Schema, Clojure R Julia Lua Ruby
4.1.9. Try to understand the nature of coding
Understand the following concepts ASCII, ISO-8859-1 GB2312, GBK, GB18030 Unicode, UTF-8 does not use String.getBytes() and other tool classes/functions to complete the following functions
public static void main(String[] args) throws IOException {
String str = "Hello, We are Chinese.";
byte[] utf8Bytes = toUTF8Bytes(str);
FileOutputStream fos = new FileOutputStream("f.txt");
fos.write(utf8Bytes);
fos.close();
}
public static byte[] toUTF8Bytes(String str) {
return null; // TODO
}
Think about whether the above program can write a GBK? Write a program to automatically determine what kind of encoding a file is.
4.1.10. Try to understand the nature of time
Time Zone: Winter Time and Summer Time
http://en.wikipedia.org/wiki/Time_zone
ftp://ftp.iana.org/tz/data/asia
http://zh.wikipedia.org/wiki/%E4%B8%AD%E5%9C%8B%E6%99%82%E5%8D%80
Leap year http://en.wikipedia.org/wiki/Leap_year
Leap seconds ftp://ftp.iana.org/tz/data/leapseconds
What is the return time of System.currentTimeMillis()
4.1.11. References
4.2. Extended Learning
4.2.1. JavaScript knowledge
4.2.1.1. What is prototype
Modify the code to make the program output "135": http://jsfiddle.net/Ts7Fk/
4.2.1.2. What is closure
Take a look at this code and explain why there is no alert "This is button: 1" when you press Button 1, and how to modify it
4.2.1.3. Understand and learn a JS framework
jQuery ExtJS ArgularJS
4.2.1.4. Write a Greasemonkey plug-in
http://en.wikipedia.org/wiki/Greasemonkey
4.2.1.5. Learn node.js
4.2.2. Learning HTML 5
ArgularJS,https://docs.angularjs.org/api