Public | Automated Build

Last pushed: 2 months ago
Short Description
A blockchain style eventsourcing service using cyclone.io, redis, and libgit2 http://getbitwrap.com
Full Description

Bitwrap-io


A blockchain-style eventstore.

Read the whitepaper Solving 'State Exposion' with Petri-Nets and Vector Clocks

(above is a tic-tac-toe state machine )

A Bitwrap machine can be explained as follows:

1. It declares a single 'state-vector' of size 'n'
   * the machine is said to have 'n' places
   * each place(n) has a pre-defined inital value.
2. 'transitions' are defined as a set of delta vectors
   * of size 'n' 
   * containing positive or negative integers.
3. Transactions are applied to the current state vector using vector addition.
4. The 'state-vector' is stored after each valid transaction.
5. No place(n) may store a negative value.
   * only valid output states are stored

Status

  • Removing LMDB support from this project

  • Porting algorithm / schema generation to use PostgreSQL

    • algorithm is executed as a stored procedure
    • state validation is handled using domain types to define tokens
    • event payload is stored as a json datatype
      • PostgreSQL provides interesting functions for making use of json
  • Re-Deploying Developing Demo Apps & Widgets using PGSQL

install

pip install bitwrap_io

# TODO: update to include database parameters
twistd -n bitwrap \
  --listen-address 127.0.0.1 \
  --listen-port 8080 \
  --schema-path ./bitwrap_io/pnml

# visit http://127.0.0.1:8080

Roadmap

  • Auth - provide authentication via Oauth2

    • authentication
      • Planning to alter the stored-procedure to provide user/session based authentication
  • Contracts - api for joint event execution (think multisig transations) between statevectors

    • contracts form the basis for a Python API
    • using bitwrap to develop applications
    • cross machine contracts
      • should allow target/sender params - with or instead of 'oid'
  • Analytics - archive event data to S3/Athena for warehousing & analysis

Reference

Read Martin Fowler's description of Event Sourcing.

Watch an event sourcing video from Greg Young.

Learn more about our deterministic approach to modeling events at our blog blahchain.com.

Platform Independent Petrinet Editor

see ./bitwrap_io/pnml/ directory for petri-nets included with bitwrap

Download:

  • PIPEv5 - PIPEv5 being released as a jar on github
    • This is the primary tool we have been using to develop Petri Nets

Deployment

AWS lambda

Docker

Run development database

docker run -d --name bitwrap-dev -p 127.0.0.1:5432:5432 -e POSTGRES_PASSWORD=bitwrap postgres:9.6

####
Automated Build: https://hub.docker.com/r/bitwrap/bitwrap-io/~/dockerfile/

#TODO: include instructions for deploying using containers
Docker Pull Command
Owner
bitwrap
Source Repository

Comments (0)