ledger

command
v0.0.0-...-975e8d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

README

Ledger example

Summary

Simulate a ledger and a certain type of workload against it. A general ledger is a complete record of financial transactions over the life of a bank (or other company). The example here aims to model a bank in a more realistic setting than our previous bank example(s) do, and tickles contention issues (causing complete deadlock in the more contended modes) which will be interesting to investigate.

Running

See the bank example for more detailed information. The example may be run both against Postgres and Cockroach.

Cockroach
./cockroach start --background
go run main.go postgres://root@localhost:26257/ledger?sslmode=disable
Postgres
docker run -d -p 5432:5432 postgres
# When not on OSX, use 'localhost' instead
go run main.go postgres://postgres@$(docker-machine ip default):5432?sslmode=disable

Documentation

Overview

This example simulates a (particular) banking ledger. Depending on the chosen generator and concurrency, the workload carried out is contended or entirely non-overlapping.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL