PostgreSQLのMVCC(Multi-Version Concurrency Control)では、各トランザクションが見るべきレコードのバージョンを効率的に見つける仕組みとして、以下のような方法が使われています。
- Heap Tuple:
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>フルーツ合成パズルゲーム</title> | |
| <!-- Matter.js を CDN 経由で読み込み --> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/matter-js/0.19.0/matter.min.js"></script> | |
| <style> | |
| body { margin: 0; font-family: sans-serif; } | |
| /* 上部の情報&操作エリア */ |
The other day, I wrote an articleshown below, and I was thinking about whether I could prepare or have a machine that can run the server continuously.
NostrP2P: Pure P2P Distributed Microblogging System - ryo_grid's tech articles
Then, I remembered that there is an app called Termux that creates a unique Linux environment within an Android device. So, I thought it would be a good idea to use an old Android smartphone to run the server, and when I tried it, it worked perfectly!
(The idea behind Termux is that since Android is a type of Linux, by changing the root location of the file system in the shell shown to the user with chroot and placing the necessary files, you can create a unique Linux userland.)
First, referring to the sites below, install Termux via the Fdroid app.
| // Code generated by protoc-gen-go. DO NOT EDIT. | |
| // versions: | |
| // protoc-gen-go v1.32.0 | |
| // protoc v3.19.1 | |
| // source: np2p_event.proto | |
| package schema | |
| import ( | |
| protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
正直、精査していないので普通に穴があるかもしれない。
GitHub Repo
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "log" | |
| "math/rand" | |
| "os" | |
| "strconv" | |
| ) |
| // Bostr config | |
| module.exports = { | |
| // Server listener [Required] | |
| address: "127.0.0.1", | |
| port: "8080", | |
| // Clusters. | |
| // 0 will make bostr run clusters with available parallelism / CPU cores. | |
| clusters: 1, |