Talk about the HAClient of rocketmq

order This paper mainly studies the HAClient of rocketmq HAClient rocketmq-all-4.6.0-source-release/store/src/main/java/org/apache/rocketmq/store/ha/HAService.java class HAClient extends ServiceThread { private static final int READ_MAX_BUFFER_SIZE = 1024 * 1024 * 4; private final AtomicReference<String> masterAddress ...

Added by mjgdunne on Thu, 12 Dec 2019 18:37:02 +0200

Brief introduction of new features of systemd and common type analysis of unit, using systemd to manage the nginx of compilation and installation

1. New features of SYSTEMd Process (start) all services in parallel. Service control logic based on dependency definition System state snapshot Activate the process on demand, only when it is accessed for the first time can it really start; 2. Common unit types of SYSTEMd target: simulate the implementation level; service: define system service ...

Added by Sandip on Wed, 11 Dec 2019 20:13:40 +0200

Boost.Asio Source Reading: Organization Structure

(This article is based on Boost 1.69)Boost.Asio code style.Asio divides the declaration and implementation of some of the more complex classes into two header files for readability, and include s the header file of the implementation at the end of the header file of the declaration.The impl folder contains header files for these implementations ...

Added by KDesigns on Tue, 10 Dec 2019 16:44:16 +0200

A simple implementation of message middleware MQ

1. Message processing center class:    this class is the basic class for processing message logic. If the message received from MQ client is CONSUME, it is consumption message; if the message received from MQ client is not CONSUME, it is production message. package com.richinfo.demo; /** * Message processing center cl ...

Added by fire_cracker on Tue, 10 Dec 2019 08:59:55 +0200

tcp protocol and packet sticking in network programming

tcp protocol and socket in network programming I. single supplement Several ways to realize single column #Mode 1: classmethod # class Singleton: # # __instance = None # # @classmethod # def singleton(cls): # # if not cls.__instance: # cls.__instance = cls() # # return cls.__instance # # obj1 = Singlet ...

Added by nawhaley2265 on Mon, 09 Dec 2019 16:12:26 +0200

nginx startup process details

The starting process of nginx starts with the main() method of the nginx.c file, in which nginx performs operations such as parsing command line parameters, initializing module indexes, parsing configuration files, initializing modules, starting master, worker, and cache-related processes.This paper starts with the main () method and explains h ...

Added by 01706 on Thu, 05 Dec 2019 13:57:26 +0200

Utilize php websocket to implement message push or timely communication function of applet wss

Applet does not have message pushing function, to achieve this, you can use php's websocket Configure the server. 1. Upload the web-msg-sender directory to the server (download address https://www.workerman.net/web-sender) 2. Modify the start_io.php file to modify the certificate path (nginx certificate) $sender_io = new SocketIO(2120); Mod ...

Added by n8r0x on Mon, 02 Dec 2019 11:36:22 +0200

poll listening event

Create a new socket int listenfd; listenfd = Socket(AF_INET,SOCK_STREAM|SOCK_NONBLOCK|SOCK_CLOEXEC,0); Bind the ip and port for the socket sockaddr_in serv_addr; bzero(&serv_addr,sizeof(serv_addr)); serv_addr.sin_family = AF_INET; serv_addr.sin_port = htons(SERV_PORT); serv_addr.sin_addr.s_addr = htonl(INADDR_ANY); Bin ...

Added by eyeself on Sun, 01 Dec 2019 10:20:23 +0200

Simple usage and installation of nodejs websocket

I can't understand a lot of WebSockets on the Internet. I have to watch a video to understand them Video link: https://blog.csdn.net/QQ408896436/article/details/81606553 The following are all based on the steps of the teacher First open cmd or powershell, type cd to enter the server address, and then type NPM install nodejs websocket And no ...

Added by electronish on Sun, 01 Dec 2019 06:45:02 +0200

Java learning notes network programming using Socket transfer file CS mode

Simple understanding of Socket Socket is a connection oriented communication protocol. Socket application is a C/S (Client / Server) structured application Socket is the end point of communication between two machines. Socket is a two-way communication endpoint connecting two programs running on the network. Socket communication principle T ...

Added by Space Cowboy on Wed, 27 Nov 2019 20:30:58 +0200