A java interview question, how do you solve big data's high concurrency and multithreading in the project, and how can you answer it well?

every time I go to an interview, this kind of question is always not answered well, and the answer on the Internet is too general

I would like to ask all the experts, how to talk about this kind of question from the project

May.07,2021

  1. first of all, let's talk about your understanding of high concurrency and multithreading
  2. Let's talk about the actual business of your project, because talking about high concurrency without business is hooliganism.
  3. according to your project, tell me how you do high concurrency and multithreading.
  4. then be sure to say what you have done and what results you have achieved, and there must be a comparison of the data before and after, that is, you must use the data to say what you have achieved.
  5. tell me more about the benefits of your design or implementation, and how it can help the development of the project or business.
  6. finally, you've been looking forward to learning more about multithreading and high concurrency from different companies on different projects. If you can, you look forward to learning more experience in your company.
  7. in addition, if you don't use too much high concurrency and multithreading in your project, talk about how you expect to plan in the future, or follow the routines of the above points.

step by step, speak slowly. You'd better have practical experience. It doesn't matter if you don't have it. Basically, front end, agent, code (including code optimization), cache, server and database will all have

.

for example, the code layer is very critical. You can also point to the design pattern and programming model, talk about the difference between the traditional one-request-one-thread pattern and the selector pattern, talk about the similarities and differences between the listening mode and the broadcast mode, and so on. These are all common concepts in multithreaded programming

.

I hope you outline the outline and follow the clues to find it. The interview went well

in addition, I Code Cloud has written two projects about algorithms and multithreading. Algorithms are java versions of" algorithm diagrams ". Things in multithreaded projects should also be helpful to you. Don't worry, it will be quick step by step

.

in the case of a single station, no matter how much you optimize, your code is well written, but it does not improve much. The amount of services that a single station can support is certain, and it will soon reach the bottleneck.

solving the problem of high concurrency definitely involves the concept of cluster / distribution:
application cluster / application distribution.
cache cluster.
Database cluster.
.

then expand
1: for example, how to cluster redis cache, what is the implementation plan, go to the Internet to search, and implement the following by yourself according to the example.
2: how applications are clustered and distributed.
.


you can take a look at the book "Technical Architecture of large websites"
https://book.douban.com/subje.

.
Menu