• VPC traditional HSF upgrade Pandora boot development


    Introduction:VPC traditional HSF upgrade Pandora boot development This best practice analyzes the disadvantages of traditional HSF applications and the advantages of upgrading to Pandora boot development. It will explain in detail how to upgrade traditional HSF applications to Pandora boot development in combination with HSF code and Pandora boot code. background information The disadvantage of […]

  • Talk about spring for Kafka’s encapsulation and integration of consumers


    order This article mainly analyzes the encapsulation and integration of spring for Kafka to the native Kafka client consumer. Consumer factory spring-kafka-1.2.3.RELEASE-sources.jar!/org/springframework/kafka/core/DefaultKafkaConsumerFactory.java protected KafkaConsumer<K, V> createKafkaConsumer(String clientIdSuffix) { if (!this.configs.containsKey(ConsumerConfig.CLIENT_ID_CONFIG) || clientIdSuffix == null) { return createKafkaConsumer(); } else { Map<String, Object> modifiedClientIdConfigs = new HashMap<>(this.configs); modifiedClientIdConfigs.put(ConsumerConfig.CLIENT_ID_CONFIG, modifiedClientIdConfigs.get(ConsumerConfig.CLIENT_ID_CONFIG) + clientIdSuffix); return createKafkaConsumer(modifiedClientIdConfigs); } } protected […]

  • [multithreading] thread pool source code (2)


    It’s almost three weeks since the last technical article was updated. The reason is written in the last article. No more nonsense. Let’s start the second round of reading our thread pool source code. review Briefly review the two methods involved in the previous thread pool source code. One isexecute()The entrance to the task, and […]

  • Spark – how does the RPC of each component communicate


    Basic concepts Before we start, let’s talk about a few concepts: Rpcendpoint: an instance of RPC distributed, which is used to specify the processing of messages, such as receiving messages. Rpcendpointref: the reference of rpcendpoint, that is, it points to the rpcendpoint of the server, so rpcendpointref will have the RPC address of the server. […]

  • [unity] understanding of ThreadGroup and numthreads in computeshader


    Today, I encountered a magical phenomenon. I set up a100 * 100Then use computeshader to fill it with some colors, but the result has a black edge. The code is as follows: _renderTexture = new RenderTexture(100, 100, 24); _renderTexture.enableRandomWrite = true; _renderTexture.Create(); shader.Dispatch(0, _renderTexture.width / 8, _renderTexture.height / 8, 1); [numthreads(8,8,1)] void CSMain (uint3 id […]

  • Do you want to update the database or the cache first?


    Hello, I’m glacier~~ Recently, my friends have been asking me whether to write the database first or write the cache first when writing data to the database after the cache is introduced into the system? What is the difference between writing the database first and writing the cache first? Today, let’s talk about this topic. […]

  • Don’t panic when there is a problem with the process under Linux. Senior programmers teach you 6 tricks to do it!


    The article is continuously updated every week. Your “three links” are the greatest affirmation to me. WeChat can search the public for the first time to read the official account of “backend Technology School” (usually one to two updates earlier than blogs). Operating system “process” is a basic concept that you should contact when learning […]

  • New features of redis 6.0: take you 100% to master the multithreading model


    Redis officially launched version 6.0 in May 2020, providing many exciting new features, so it has attracted much attention. What features does yard old wet provide? I see. Can I get a raise? The main features are as follows: Multithreaded processing network IO; Client cache; Fine grained permission control (ACL); RESP3Use of the agreement; The […]

  • Talk about auto commit of Kafka client


    order This article mainly talks about the implementation of auto commit of Kafka client maven <dependency> <groupId>org.apache.kafka</groupId> <artifactId>kafka-clients</artifactId> <version></version> </dependency> poll kafka-clients-!/org/apache/kafka/clients/consumer/KafkaConsumer.java public ConsumerRecords<K, V> poll(long timeout) { acquire(); try { if (timeout < 0) throw new IllegalArgumentException(“Timeout must not be negative”); if (this.subscriptions.hasNoSubscriptionOrUserAssignment()) throw new IllegalStateException(“Consumer is not subscribed to any topics or assigned […]

  • The interviewer just wants to ask me the source code of spring MVC. I can’t stand it!


    The online interviewer series has been serialized22Article!Deep and funnyNew series! [Online interviewer] Java notes [Online interviewer] Java generic [Online interviewer] Java NiO [Online interviewer] java reflection && dynamic agent [Online interviewer] multithreading Foundation [Online interviewer] CAS [Online interviewer] synchronized [Online interviewer] AQS & & reentrantlock [Online interviewer] thread pool [Online interviewer] ThreadLocal [Online interviewers] countdownlatch […]

  • Android kotlin uses annotations to realize the anti button connection function


    SingleClick: @Retention(AnnotationRetention.RUNTIME) @Target(AnnotationTarget.FUNCTION) annotation class SingleClick( //Click interval, MS val value: Long = 500 ) SingleClickAspect: import android.os.SystemClock import org.aspectj.lang.ProceedingJoinPoint import org.aspectj.lang.annotation.Around import org.aspectj.lang.annotation.Aspect import org.aspectj.lang.annotation.Pointcut import org.aspectj.lang.reflect.MethodSignature @Aspect class SingleClickAspect { /** *Define the tangent point and mark the tangent point as all the methods annotated by @ singleclick *Note: here, me.baron.test.annotation.singleclick needs to […]

  • Write OS kernel from scratch – run shell


    Series catalog Preface preparation BIOS boot to real mode GDT and protection mode On virtual memory Load and enter the kernel Display and print Global descriptor table GDT Interrupt processing Virtual memory perfection Implement heap and malloc First kernel thread Multithreading operation and switching Lock and multithreading synchronization Enter user status Process implementation system call […]