Comprehensive and thorough analysis of factory method mode
This article is excerpted from "design patterns should be learned this way"
1. Application scenario of factory method mode
The factory method mode is mainly applicable to the following application scenarios.
(1) Creating objects requires a lot of repetitive code.
(2) The client (application layer) does not depend on the details of ho ...
Posted by oldtimer on Wed, 10 Nov 2021 21:15:18 -0800
Thoroughly explain the details of the simple factory that you haven't paid attention to
This article is excerpted from "design patterns should be learned this way"
1 encapsulate product creation details using simple factory mode
Next, let's look at the code and take the creation of an online course as an example. Assuming that there are courses such as Java architecture, big data and artificial intelligence, an ecosyste ...
Posted by caster001 on Wed, 10 Nov 2021 13:02:47 -0800
Thoroughly explain the details of the simple factory that you haven't paid attention to
This article is excerpted from "design patterns should be learned this way"1 encapsulate product creation details using simple factory modeNext, let's look at the code and take the creation of an online course as an example. Assuming that there are courses such as Java architecture, big data and artificial intelligence, an ecosystem h ...
Posted by SieRobin on Tue, 09 Nov 2021 23:08:46 -0800
so eazy uses Netty and dynamic proxy to implement a simple RPC with one click
RPC (remote procedure call) remote procedure call
RPC is used to communicate between the Java processes of two hosts in distributed applications. When host A calls the methods of host B, the process is simple, just like calling the methods in its own process. The responsibility of RPC framework is to encapsulate the details of the underlying c ...
Posted by kylecooper on Mon, 08 Nov 2021 17:30:31 -0800
Microservice architecture foundation
Microservice Architecture Foundation (II) To be continued
Continue the previous basic project for expansion
Load balancing and service invocation
Ribbon
Ribbon local load balancing client & nginx server load balancing difference Nginx is server load balancing. All client requests will be handed over to nginx, and then ngin ...
Posted by cassius on Sat, 06 Nov 2021 15:58:08 -0700
[architect interview - JUC concurrent programming - 9] - thread pool
1: Introduction to thread pool
Using thread pool, you can reuse threads and control the total number of threads. If the thread pool is not used, a new thread should be opened for each task. The overhead of repeatedly creating threads is large, and too many threads will occupy too much memory.
This is too expensive. We want to have a fixed num ...
Posted by hairytea on Thu, 04 Nov 2021 16:05:52 -0700
Designing the architecture of the source code of dating and making friends should follow the principle of Richter substitution
The Liskov Substitution Principle (LSP) means that if there is an object O2 of type T2 for each object O1 of type T1, so that the behavior of program P does not change when all objects O1 defined by T1 are replaced with O2, then type T2 is a subtype of type T1.
This definition looks quite abstract. Let's re understand it. It can be understood ...
Posted by bidnshop on Thu, 04 Nov 2021 08:48:05 -0700
Chapter IX disk storage and file system management
2.3 mount
Mount: the act of associating an additional file system with an existing directory in the root file system, so that this directory can be used as an access to other files
Uninstall: the process of releasing this association
Associate a device with a mount Point: mount Point
The original files under the mount point will be temporar ...
Posted by Strings on Tue, 02 Nov 2021 19:00:24 -0700
RocketMQ-Producer Start Process Decryption
The following is the RocketMQ - Producer series article index:
1: Start the process (this article)
2: Routing dynamic updates
3: Send Mode Analysis + Message Type Difference
4: Sending process of producer message
5: Routing queue selection, client redundancy policy (QA)
Introduction to Producer
Producer is the sender of the Ro ...
Posted by Pi_Mastuh on Tue, 02 Nov 2021 09:18:26 -0700
Unified identity management platform IAM single sign on process and third-party interface design scheme
#Unified identity management platform IAM
Many enterprises have multiple office systems. Accounts, passwords, roles and permissions need to be set separately and cannot be managed uniformly.
I think the unified identity authentication management system IAM has the following three advantages:
Establish a unified user management, identity rati ...
Posted by gezeala on Mon, 01 Nov 2021 23:32:43 -0700