Email: [email protected]
Github: https://github.com/qiurunze123
QQ: 3341386488
QQ group: 453259026
Please contact me for reprinting and other operations! I would rather you write a new version based on mine.
? The Three Highs introduced soldiers and horses without using food and grass first
three-high-import is a high-availability, high-reliability, and high-performance three-high multi-thread import system (the meaning of this project is theoretical understanding)
The significance of the three-high-import project is to use multi-threading to import tens of millions of levels to achieve three highs:可扩展
,高性能
,高可用
, and高可靠
. This project can achieve undifferentiated high-performance data reporting and import on tens of millions of levels of data. Compared with ordinary import, the performance is improved by about 10 times, and risks are avoided. When occasional machine downtime, network fluctuations and other situations occur,数据一致
,数据可靠
,数据重试
,数据报警
and other functions can still be achieved in some important situations. Data such as: reconciliation, Account amounts, bills, etc. require daily scheduled tasks and high-risk data to ensure that the data is error-free! Multi-threading from basic to advanced, analysis of entry and exit, and practical work. Finally, I will share a project on how to implement a safe and high-availability strategy for large amounts of data (it has been tested with hundreds of millions of data), and an example DEMO analysis of high availability, high reliability and high performance three-high import system, how to perform data sharding, data import, calculation, multi-threading strategy, etc. This article belongs to the advanced series. If you have questions or better ideas, you can discuss them together! A little suggestion: before learning this series of knowledge, if you have never been exposed to SpringBoot
, CountDownLatch
,线程池
,工作队列
,工作窃取等
, then I suggest you search the Internet for a quick introduction to each piece of knowledge, or you can Download this project and learn by doing it. My project is completely practical and explained. I don’t want to write a bunch of articles and waste our lives. You still don’t understand the inner meaning. If you want to understand, just learn by doing it. Come on??
- Three high import projects
- table design
- How data is sharded
- How to achieve high availability
- How to achieve high performance
- How to achieve high reliability
- How to customize the thread pool and use and import it
- Data import performance (the previous version of Sangao took about 13 seconds to import 100,000 data. The new version is still under development)
- Perform thread splitting to allocate resources
Updated version before multi-threading--Please enter the code path: com.geek.threadandjuc
Table of contents
? Java multi-threading basics
- Multithreading basics
- Several concepts you need to know
- How many ways are there to implement multithreading?
- What is the difference between using runnable in multi-threading and inheriting the Thread class?
- How to correctly and gracefully interrupt threads in multi-threading
- Multi-threaded life cycle state machine flow error and error statement
- Multi-threaded life cycle state machine flow
- Thread and Object classes
- Important properties of multithreading
- Multi-threaded exception handling mechanism
- Detailed interpretation of multi-thread wait notify notifyall join sleep yield function and method
- What problems may multi-threading cause?
- Multiple singleton patterns
- concurrent container
- Introduction to map
- vector and HashTable
- ConcurrentHashMap
- CopyOnWriteArrayList
- BlockingQueue
? Get ThreadLocal
- Get ThreadLocal
- Introduction to qualitative usage scenarios of ThreadLocal
- Some methods of ThreadLocal are used
- ThreadLocal source code analysis
- ThreadLocal memory leak
- ThreadLocal to avoid memory leaks
- Application of ThreadLocal in spring
? Thread pool
- thread pool
- High-level analysis of JDK thread pool
- What is thread pool
- Disadvantages of creating threads multiple times
- When to use thread pool
- Advantages of thread pools
- Executor framework
- How to use hook functions for thread pool operations
- Key attributes of thread pool
- Important properties of multithreading
- Specific implementation of thread pool
- Creation of thread pool Z
- Thread pool parameter explanation
- Thread pool monitoring
- Source code analysis of thread pool
- execute method
- addWorker method
- Worker class
- runWorker method
- getTask method
- processWorkerExit method
- summary
- processWorkerExit method
- Handwritten thread pool code
?Multi-threading advanced update
? Multi-thread security topic
- thread pool
- There are several types of thread safety issues
- Which scenarios require extra attention to thread safety issues?
- Multi-thread switching context
- Deadlock Special
Multi-threaded juc share
https://github.com/qiurunze123/threadandjuc/blob/master/docs/threadinterview.md
Unknowingly, it has been updated for half a year. From basics to concurrency to direct application in projects, many places are not very good, but it is a test for a person. From understanding to applying to writing, it is a tedious process.
It was time-consuming and labor-intensive, but I’m glad I didn’t give up and finally completed it. I hope to get everyone’s corrections and opinions, and I hope to help more people.
千岩万壑不辞劳 远看方知出处高 溪涧岂能留得住 终归大海做波涛 2019/9/24