1
头图

Learn about the Java language in this issue of Technology Weekly? , welcome to read~

文章推荐

"Playing with Flowable Process Examples" Author: A Little Rain in Jiangnan

Today we continue to talk about process examples. The process after deployment cannot be run directly. For example, we have deployed a leave process. Now, if Zhangsan wants to ask for leave, he needs to start a leave process. If lisi wants to ask for leave, he also needs to start a leave process. These are enabled one by one. The leave request process is a process instance, and the leave request process we deployed at the beginning is similar to a template. Based on this template, we can open many specific process instances. From this point of view, the ProcessDefinition we defined in the last article is similar to a Java class, and the ProcessInstance we are going to introduce today is equivalent to a Java object.

"Real Detailed Explanation of Java Reflection, Practical Cases, Although it is not as good as 10,000 words, it has nearly 8,000 words" Author: Ning Zaichun

As a Java developer, what do you think the importance of reflection is in your mind?
In the past, I only thought that reflection was very important, but after all, I listened to this article and a friend said that learning is learning, but it is not applied very much.
When I officially entered the society as a cv boy, I had to consider a lot of problems. After thinking about the problem slowly, I felt that reflex was a powerful thing, and even more that reflex was an omnipotent thing, such as various The bottom layer of such a framework, the implementation of various interceptors, and reflection are an indispensable part of it~
If you usually focus on business development, you will indeed use the reflection mechanism less often, but it does not mean that reflection is not important. Reflection is the basis for building scaffolding.

"Microservice Development Series: The Beginning" Author: zxdposter

Microservices are now a concept familiar to most developers.
Various microservice development series emerge in an endless stream on the Internet, and various microservice frameworks are also numerous.
However, at such a time when it seems that there is no need to introduce microservices, I still want to give a series of my understanding of microservice development.
These understandings are not esoteric, these practices you may be doing every day, and some places you may think are very basic.
But in my understanding, these are very important, and there are no fancy ways of implementation. The purpose of technology is not to achieve simple purposes with cumbersome methods, but to achieve all purposes with simple methods.
Therefore, the framework I want to introduce is all for convenience, easy investigation, easy deployment, and easy development. It is just a convenient system.
These simple techniques and simple practices not only provide beneficial design methods for microservice frameworks, but also help some developers in their development habits and understanding of development.

"Using elasticsearch as the only storage source problem sorting" by Martin

First of all, es does not support transactions, so this must be taken into account when designing the architecture.
In particular, es is generally not allowed to use scripts in the production environment. The update operations are updated in the memory of the business Java system, and then refreshed to the es database. Therefore, when multiple threads modify concurrently, only the last update succeeds ( In fact, other threads have also been updated successfully, but they are only covered by the last thread). The solution is to add a distributed lock to the caller of the upper interface, or put the request in a message queue that guarantees serialization (such as the same partition of kafka)

"Write a sequel, fill the hole! Regarding the pit left in "Thread.sleep(0) this line of 'seemingly useless' code". " Author: why technology

First of all, I am very grateful to the friends who read my article, and I also especially thank the friends who brought their own thinking and raised valuable questions during the reading process. This is a kind of positive feedback for me.
I really didn't think of this question when I wrote it, so when I asked it suddenly, I probably knew the reason. Since I didn't verify it, I didn't dare to answer it rashly.
So I searched for the answer to this question, so let's start with the conclusion:
It is related to the JIT compiler. Since the code in the loop body is determined to be hot code, the chance of the getAndAdd method entering the safe point is optimized after JIT compilation, so the thread cannot enter the safe point in the loop body.

"Java Development: Implementing the Function of User Registration and Login" Author: Three Shopkeepers

In the process of Java development, it is the most basic to realize the user's registration function. It is also a very common operation method for users to use their mobile phone number or email as a registered account. Whether it is registered by mobile phone number or email, the principle is the same, so this article will come. Share the functional realization of user registration account in the Java development process.

"Java Concurrent Programming Production Application Scenarios and Actual Combat" Author: Gugu Chicken

From the perspective of improving performance, it improves the efficiency of CPU usage: most of the servers currently produced are multi-core, and the standard machines are 8C/16G. The operating system assigns different threads to different cores for processing. In theory, there are as many threads as there are cores to execute in parallel. If there is no concurrent programming, the utilization of the CPU will be greatly wasted. Assuming that time-consuming I/O operations are currently being processed, the entire CPU will be in a blocked idle state, and subsequent instructions must wait for the previous execution to complete before continuing.
Reduce service RT: Large-scale Internet traffic can easily exceed 10,000 per second. If there is no concurrent processing, all user requests will be queued. Can you imagine the experience effect? How can such service capabilities retain customers? With concurrent programming, CPU computing power is fully released, and the operating system allows each customer to use CPU computing in turn, and each customer can get a fast response.
High fault tolerance: the execution of threads will not interfere with each other, and the execution of a thread exits abnormally, which will not affect other threads.

问题推荐

Unanswered:

Most frequent:


# SegmentFault Technology Weekly#

"Technology Weekly" is a series of technical content specially launched by the community, with a weekly theme.

Update every Tuesday, welcome to " follow ". You can also leave a message on the topic you are interested in in the comments, and recommend excellent articles related to the topic.

If you have any questions, you can add Ms. WeChat~

image.png


Beverly
882 声望2.1k 粉丝

怂人面前全是坑,努力填坑 。


引用和评论

0 条评论