Eventually platforms outgrow the single-source-tree model and become distributed systems. A common pattern in these distributed systems is distributed composition via event buffering. Here we motivate and describe this event buffering pattern.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE AGGREGATE array_accum (anyarray) | |
( | |
sfunc = array_cat, | |
stype = anyarray, | |
initcond = '{}' | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use anyhow::{Context, Result}; | |
use iroh::{ | |
base::{ | |
node_addr::AddrInfoOptions, | |
ticket::{BlobTicket, Ticket}, | |
}, | |
blobs::BlobFormat, | |
}; | |
use tokio; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/systemd/system/shovel.service | |
[Unit] | |
Description=shovel | |
After=network.target | |
[Service] | |
ExecStart=/bin/bash -c 'source /home/ubuntu/shovel.env; /home/ubuntu/shovel -config /home/ubuntu/shovel.json -l :8546' | |
Restart=always | |
RestartSec=5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lslbk # find drives to add (eg /dev/nvmeXn1) | |
pvcreate /dev/nvme1n1 | |
pvcreate /dev/nvme2n1 | |
pvcreate /dev/nvme3n1 | |
pvcreate /dev/nvme4n1 | |
vgcreate vg1 /dev/nvme1n1 /dev/nvme2n1 /dev/nvme3n1 /dev/nvme4n1 | |
lvcreate --type=raid0 -l100%FREE -n rd1 vg1 | |
mkfs.ext4 /dev/vg1/rd1 | |
mkdir /storage #customize your mount point | |
echo '/dev/vg1/rd1 /storage ext4 defaults 0 0' >> /etc/fstab |
Here are some things I have learned along the way.
Last Updated: 2013-02-08
Original Audience: Hack Reactor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ens | |
import ( | |
"strings" | |
"github.com/ethereum/go-ethereum/common" | |
"github.com/ethereum/go-ethereum/crypto" | |
) | |
func Namehash(name string) common.Hash { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"encoding/hex" | |
"encoding/json" | |
"io/ioutil" | |
"log" | |
"net/http" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bitcoin' | |
require 'chain' | |
Chain.block_chain = 'testnet3' | |
Bitcoin.network = :testnet3 | |
include Bitcoin::Builder | |
key = Bitcoin::Key.from_base58("cVVBKRBMoPLJSSMW7cM3hji7VmXz1zJWX3DypcjPcWpRBMEu2xF7") | |
builder = Bitcoin::Builder::TxBuilder.new |
NewerOlder