[Code Page] Build your own golang framework step by step from scratch
In the previous article, we defined the project basic catalog structure.Now let's review my thoughts:
Create entry file;
Specify configuration, log directory;
Specify the database, queue, cache component directory;
Create a controller directory for data processing;
Specify miscellaneous items such as public functions.
Next, we'll fill in t ...
Posted by AaZmaN on Mon, 20 Jan 2020 19:23:08 +0100
raft theory and practice [3]-lab2a explanation
Explanation of lab2a experiment
1. raft structure complementary field of raft.go.Fields should be as close as possible to Figure2 from raft's paper.
type Raft struct {
mu sync.Mutex // Lock to protect shared access to this peer's state
peers []*labrpc.ClientEnd // RPC end points of all peers
persister *Persister ...
Posted by DesertFox07 on Fri, 17 Jan 2020 17:47:33 +0100
Go Network File Transfer
Process analysis
With the help of TCP, the basic idea is as follows:
The sender (client) sends the file name to the server, and the server saves the file name.
The receiver (server) returns a message ok to the client to confirm that the file name is saved successfully.
After receiving the message, the sender (client) begins to send the file da ...
Posted by evdawg80 on Tue, 07 Jan 2020 09:53:27 +0100
Source code analysis of go open source project influxdb relay (1)
The address of the influxdb relay project: https://github.com/influxdata/influxdb-relay, which is mainly used as a load balancing node and writes to multiple influxdb nodes for high availability.
Don't talk about it~
1,main.go
1 package main
2
3 import (
4 "flag"
5 "fmt"
6 "log"
7 "os"
8 "os/signal"
9 ...
Posted by scifo on Sun, 29 Dec 2019 15:41:11 +0100
[go cryptography] - Digital Signature
introduce
Digital signature is a digital string that can not be forged by others only by the sender of the message. This digital string is an effective proof of the authenticity of the information.
Sender: generate signature
Recipient: verify signature
Asymmetric cryptography
In asymmetric encryption, the public key is used for encryption and ...
Posted by validangina on Sun, 15 Dec 2019 16:28:31 +0100
Blockchain tutorial Fabric1.0 source code analysis configtx × genesis
The blockchain tutorial Fabric1.0 source code analysis configtx ා genesis, in the second half of 2018, the blockchain industry is gradually fading away from the impetuosity and returning to rationality at the beginning of development. On the surface, the demand and value of relevant talents seem to be falling. But in fact, it is the gradual dec ...
Posted by richei on Fri, 13 Dec 2019 21:41:45 +0100
Building the source code analysis environment of btcpool ore pool
Chain code and platform of Fabric 1.0 source code Notes
1. Overview of platforms
The platforms code is centralized in the core/chaincode/platforms directory.
core/chaincode/platforms directory, the programming language platform implementation of chain code, such as golang or java.
Platform.go, platform interface definition, and platform related ...
Posted by djs1 on Thu, 12 Dec 2019 22:26:57 +0100
Blockchain tutorial Fabric1.0 source code analysis Ledger II
Blockchain tutorial's Fabric1.0 source code analysis Ledger II.
Ledger of Fabric 1.0 source code Notes
Supplement the definition of commonledger.Ledger interface embedded in PeerLedger interface as follows:
type Ledger interface {
GetBlockchainInfo() (*common.BlockchainInfo, error) //Get the basic information of blockchain
GetBlockByNum ...
Posted by zwiebelspaetzle on Thu, 12 Dec 2019 16:39:15 +0100
Jsonpath use for Snack3
1. Introduction of Snack3 and JSONPath
Snack3 is a JSON framework that supports JSONPath.JSONPath is a powerful feature that can also be used as an Object Query Language (OQL) in the Java framework.
<dependency>
<groupId>org.noear</groupId>
<artifactId>snack3</artifactId>
<version>3.1.5.10</version&g ...
Posted by srboj on Tue, 10 Dec 2019 12:52:04 +0100
Troubleshooting a UDP communication problem
Communication model
(a -- > B -- > A): a sends data to B through UDP (a can be a specified destination, or a broadcast message to b). B sends back a message to a according to the source address and port after receiving the message, which is such a simple communication process.
For the explanation of golang udp, please refer to the followi ...
Posted by PDXDesigner on Mon, 09 Dec 2019 08:37:47 +0100