Go Language (18) context & Log Items
Context&log items
context
Method to cancel goroutine in general scenarios
var wg sync.WaitGroup
var exit bool
func worker(exitChan chan struct{}) {
LOOP:
for {
fmt.Printf("work\n")
time.Sleep(time.Second)
/*if exit {
break
}
*/
select {
case <- exitChan:
break LOOP
...
Posted by loopykd on Mon, 04 May 2020 16:40:51 -0700
Web Api service registration and discovery based on Zookeeper
Installation and differences
Please refer to my last article for Zookeeper installation http://www.cnblogs.com/woxpp/p/7700368.html
Service provision and consumption based on Nginx
Service registration and discovery based on zookeeper
The load balance of zk can be adjusted. Nginx is only able to adjust the weight, and other things t ...
Posted by Tarsonis21 on Sun, 03 May 2020 18:18:58 -0700
Apache Kafka Study Notes
quick get start
install
Docker installation single Kafka
docker pull wurstmeister/zookeeper
docker pull wurstmeister/kafka
docker run -d --name zookeeper -p 2181:2181 wurstmeister/zookeeper
docker run -d --name kafka -p 9092:9092 -e KAFKA_BROKER_ID=0 -e KAFKA_ZOOKEEPER_CONNECT=Host computer IP:2181 -e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127 ...
Posted by ghost007 on Fri, 24 Apr 2020 00:00:49 -0700
Path to.NET Core Micro Services: Let's modify the last Demo communication to complete RPC communication
There have been some delays in updating these days. Sorry, everyone.
In the previous article, we briefly introduced the DotNetty communication framework and the implementation of loop (Echo) communication based on DotNetty.
Let's recall the entire process of the previous project:
When the server starts, bind and list ...
Posted by TeddyKiller on Tue, 21 Apr 2020 12:23:54 -0700
Self growth of serial number by distributed lock
1. introduction
In a distributed system, a service can start multiple replicas. When multiple replicas do one thing at the same time, there will be a problem of parallel. If there is a problem of data serial number duplication when new data is added, there are many ways to solve this problem, such as distributed locks, message queues, etc., in ...
Posted by techjosh on Wed, 15 Apr 2020 08:27:53 -0700
Reader's Letter|If you have too many Region s in your HBase cluster, take a look at this problem, which you may encounter
Preface: Reader's Letter is a question and answer column opened by the old HBase store, which aims to solve HBase-related problems frequently encountered in the work for more small partners.The store will try its best to help you solve these problems or give you a help. The store hopes this will be a small platform to help each other.If you hav ...
Posted by chatmaster on Mon, 06 Apr 2020 20:35:23 -0700
[Java Series 004] don't underestimate Redis distributed lock
Hello, I'm miniluo. For positions requiring distributed experience, interviewers always like to ask questions about distributed locks. Recently, I have the honor to participate in the company's interview, and I often ask about the knowledge of distributed locks. Most of the candidates' answers are more limited to using, and they have not though ...
Posted by Sekka on Sun, 05 Apr 2020 01:39:05 -0700
Simple RPC framework based on Socket+Zookeeper
RPC process details
Implementation content
json serialization
zookeeper implements service registration on the server side and service discovery and load balancing on the client side
Automatically scan the interface provided by the server and register it in zookeeper
Automatically generate client dynamic proxy objects
socket communication
M ...
Posted by alvinkoh on Fri, 03 Apr 2020 03:14:29 -0700
Search engine - Solr cluster deployment
Key contents
Three zookeeper nodes are required
Four solr nodes.
Using pseudo distributed to implement solr cluster. Three zookeeper instances and four tomcat instances are required, which can be simulated on a virtual machine. More than 1G memory is recommended for virtual machines.
Solr instance building
Step 1: crea ...
Posted by zorgon on Wed, 01 Apr 2020 19:42:14 -0700
dubbo source code analysis 5 -- ServiceBean publishing service
Publishing service ServiceBean
Release entrance
ServiceBean implements the afterpropertieset() method of the interface InitializingBean
public void afterPropertiesSet() throws Exception {
//Set provider, application, registers
//Publishing service
if (!isDelay()) {
export();
}
}
If the service has ...
Posted by danf_1979 on Mon, 30 Mar 2020 12:53:21 -0700