Derobukal | 御坂研究所

Principle and implementation of max heap

Original link: http://www.nosuchfield.com/2022/06/29/Principle-and-implementation-of-maximum-heap/ Fundamental The maximum heap is a binary tree, and the parent node of the binary tree is required to be larger than its child nodes. At the same time, the binary tree is a complete binary tree, which means that all nodes except the bottom layer of the binary tree should be […]

Principle and implementation of max heap Read More »

Introduction and installation of Pulsar

Original link: http://www.nosuchfield.com/2022/06/21/Introduction-and-installation-of-Pulsar/ Introduction Apache Pulsar is a distributed message queue, which mainly consists of the following three parts. components effect Broker Responsible for producer and consumer requests as well as message replication and distribution, Broker is stateless and does not store data Zookeeper Store metadata, cluster configuration, responsible for task coordination and service discovery,

Introduction and installation of Pulsar Read More »

A brief introduction to etcd

Original link: http://www.nosuchfield.com/2022/06/14/A-brief-introduction-to-etcd/ Install etcd is a distributed consistent key-value database. First we download the package useradd etcdsu – etcdwget https://github.com/etcd-io/etcd/releases/download/v3.5.4/etcd-v3.5.4-linux-amd64.tar.gztar -zxvf.tar.gzcd After that we can query the version of etcd $ ./etcd –versionetcd Version: 3.5.4Git SHA: 08407ff76Go Version: go1.16.15Go OS/Arch: linux/amd64 We performed the above operations on the three loads 172.19.33.141 , 172.19.32.155 and

A brief introduction to etcd Read More »

The principle and implementation of common sorting algorithms

Original link: http://www.nosuchfield.com/2022/05/27/Principles-and-implementation-of-common-sorting-algorithms/ Bubble Sort The principle of bubble sort is very simple, that is to move the largest (or smallest) element in the current unordered sequence to the beginning (or end) of the sequence every time, and then do the same operation to the remaining sequences except the element. . When all elements have

The principle and implementation of common sorting algorithms Read More »

Willpower: The Psychology of Self-Control, Focus, and Efficiency

Original link: http://www.nosuchfield.com/2022/05/25/yizhili/ This article is reproduced from Little People and should be reading notes from the book Willpower: The Psychology of Self-Control, Focus, and Efficiency . Know your limits First, your supply of willpower is limited; second, you draw willpower from the same account for various tasks. The use of willpower is divided into

Willpower: The Psychology of Self-Control, Focus, and Efficiency Read More »

Simple use of lightweight task queue RQ

Original link: http://www.nosuchfield.com/2022/05/19/Simple-use-of-the-lightweight-task-queue-RQ/ RQ (Redis Queue) is a lightweight Python task queue, here is a record of its simple use. First install RQ (the Python version used here is 3.8.0) pip install rq==1.10.1 Then create the following files .├── __init__.py├── jobs.py└── run.py Among them, two queues are created by connecting redis-server in __init__.py : default

Simple use of lightweight task queue RQ Read More »

Installation and use of Redis service

In the article Redis failover , I introduced how to install Redis and realize the high availability of Redis. With the continuous updating of Redis, Redis now has many new functions. This article is reprinted from: http://www.nosuchfield.com/2022/04/18/Installation-and-use-of-Redis/ This site is for inclusion only, and the copyright belongs to the original author.

Installation and use of Redis service Read More »