programmer group

Analysis of kbucket in libp2p RS

At present, the kad protocol has been implemented on the main line of the project, and kbucket, as a part of the storage node, is worth an analysis. Brief introduction to kbucket In kad, every time peer gets the information of a node, it will store it in its own kbucket. Each peer_ ID is passed through Sha2 by public key_ After 256 operation, the length is 32 bytes. Each node can XOR with another node to get the longest prefix, that...

programmer group

Basic use of NPM

one package.json file Function: to save the module information used in the current project as a package description file_ When the modules are lost, you can use the package.json Package used by file quick recovery project Create: automatically initialize through NPM init E: Front end nodejs practice NPM init This utility will walk you through creating a package.json file. It only covers the most common items, and tries to guess...

programmer group

Spring resttemplate transparent cookie

The front page requests service a, and service a calls service B, where service B needs to log in. So how can service a transfer the login information to service B?The first priority is to meet the first point: system a and B have done SSO login processing. For example, the login session that service a can handle is also handled by service B. public Object sendPostWithCookieObject(String url, Map<String, Object> params) { ...