PBFT algorithm source code explanation

I haven't blogged for a long time. I happen to be studying PBFT recently. Let's start with PBFT! First, I'll give you the PBFT code written by the boss @byron1st: https://github.com/bigpicturelabs/simple_pbft I will take you through the source code! Because many blogs on the Internet copy each other, it doesn't help you at all The whol ...

Added by blogger3 on Mon, 27 Dec 2021 19:50:24 +0200

[Go basics] build TCP server and client

Build TCP server and client Build TCP server and client Introduction to TCP BasicsServer Listen functionClient Dial functionExamples of setting up TCP server and clientRelevant information Introduction to TCP Basics    TCP protocol is a safe, reliable, stable and orderly datagram transmission protocol. If the network layer (t ...

Added by nadz on Mon, 27 Dec 2021 12:12:19 +0200

Data structure STL -- golang implements heap (complete binary tree)

Storage address of GitHub warehouse: https://github.com/hlccd/goSTL summary This time, the heap is implemented in the form of Complete Binary Tree. heap is a general term for a special class of data structures. heap is usually an array object that can be regarded as a tree. heap always satisfies the following properties: The value of a node ...

Added by NathanS on Mon, 27 Dec 2021 11:03:58 +0200

Gin security chapter-3: fast implementation of CSRF verification

introduceThis article describes how to rk-boot Implement the CSRF verification logic of the server.What is CSRF?Cross Site Request Forgery (English: Cross Site Request Forgery), also known as one click attack or session riding, usually abbreviated as CSRF or XSRF, is an attack method to coerce users to perform unintentional operations on the cu ...

Added by irwa82 on Sun, 26 Dec 2021 15:10:41 +0200

Go write excel file

1. Download excel Library go get github.com/xuri/excelize/v2 remarks:Official documents https://xuri.me/excelize/zh-hans/Official GitHub https://github.com/qax-os/excelize2. Use some API functions① Create WorkbookUse NewFile to create a new Excel workbook. The newly created workbook will contain a worksheet named Sheet1 by default② Set sheet ...

Added by jpoladsky on Sat, 25 Dec 2021 21:29:24 +0200

Data structure STL -- implementation of hashMap HashMap by golang

Storage address of GitHub warehouse: https://github.com/hlccd/goSTL summary hash map is a two-layer structure, that is, the first layer uses dynamic array as bucket to store elements, and the second layer stores elements with conflicting hash values. For any element inserted into it, you can calculate the hash value of its key, map it to the ...

Added by always_confused on Sat, 25 Dec 2021 20:31:30 +0200

Hands on implementation of a localcache - enjoy excellent open source design

prefaceHello, everyone, I'm asong. Last article: Hands on implementation of a localcache - Design This paper introduces the points to consider in designing a local cache. Some readers' feedback can learn from the storage design of bigcache, which can reduce the pressure of GC. This is something I didn't consider before. This excellent open sour ...

Added by ichversuchte on Sat, 25 Dec 2021 19:47:04 +0200

Go container: Array, Slice, Map

1, Array array Go language array is a fixed length sequence, and its internal elements generally limit the same type. The array is the underlying structure of the slice. //Create array 1: assignment after declaration var arr1 [3]int arr1[0] = 0 arr1[1] = 1 arr1[2] = 2 //Create array 2: create and initialize arr2 := [3]int{1, 3, 5} / ...

Added by DannyM on Sat, 25 Dec 2021 03:36:57 +0200

go http.Post specifies the size of a single read of the body (32k?)

background Recently, when uploading files, the server directly obtains file data through the requested body. It is found that the io performance during uploading is not fully utilized. When uploading large files, 32k is read in a single time. It is hoped that the block size of a single read can be manually adjusted to improve the speed of uplo ...

Added by zbee on Tue, 21 Dec 2021 20:30:39 +0200

grpc of microservice component

grpc of microservice component summary grpc is a high-performance, open source and general rpc framework. It is designed for mobile and http/2. It brings characteristics such as two-way flow, flow control, header compression, multiple multiplexing requests of single tcp connection and so on. In short, it can be considered as a better protoc ...

Added by cleartango on Tue, 21 Dec 2021 19:14:50 +0200