The Rust playground where we put all the pieces together.
Pieces so far:
- https://github.com/dkorolev/rust-experiments
- https://github.com/akantsevoi/maroon-migrator
- https://github.com/akantsevoi/test-environment
- https://github.com/dimacurrentai/migrator
https://piarun.github.io/maroon/util/visualize_log.html.
Run in a single-node mode. When you need to test logic, but can sacrifice durability and don't want to start etcd cluster.
make run-local PORT=3000 CONSENSUS_NODES=1Runs imitation of gateway with the given key-range
- If you run several gateways - each of them should have their own KEY_RANGE
- NODE_URLS specifies nodes which gateway will try to connect to
make run-gateway KEY_RANGE=1 NODE_URLS=/ip4/127.0.0.1/tcp/3000- Run etcd:
make start-compose
- Run maroon cluster:
make start-maroon
- Now if you open another terminal session you can see updates in etcd:
etcdctl --endpoints=http://localhost:2379 get --prefix /maroon/history- check out more
you should see published epochs but with empty increments
- Metrics:
- http://localhost:4000 - grafana. metrics Readme.md
- In order to start publishing transactions - use gateway.
Run. NODE_URLS should contain at least one valid node url, in that case transaction will reach out all nodes in cluster eventually:
make run-gateway KEY_RANGE=2 NODE_URLS=/ip4/127.0.0.1/tcp/3000that will start web-service that you can call to run some operations(you need wscat for this). ex:
- simple summarization -
npx wscat -c ws://localhost:5000/summarize/18/24- will print 42
- Shutdown
make shutdown-maroonmake shutdown-compose
- local run of etcd in docker compose
- add possibility to introduce delays between etcd nodes
- MN. deploy empty application in N exemplars in docker-compose that just writes to the log
- MN. node order + calculating delays
- MN. establish p2p connection between all the nodes(exchange public keys) + send pings
- MN. calculate delay for each node
- MN. regularly exchange current vector state to all MNs
- G. Minimal gateway implementation that just publishes transactions
- MN. Request outdated transactions(p2p)
- MN. Fix "epoch" (local)
- MN. integration with state machine - "puf-puf-magic"
- epoch coordinator implementation
- epoch coordinator interface
- set up etcd
- write epochs to etcd
- calculate delay for each node to send epoch. Use calculated order and last commited epoch author
- etcd GC (when we have too many epoch records. Is it a problem? where are the limits?)
- DSL
- base IR
- generate maroon steps from IR
- run base runtime on generated steps (functions call)
- advanced runtime features
- async/await (cross-fiber communication)
- user-friendly DSL(of course minimal/0.0.1 version)
- orderbook showcase
- IR implementation
- light stress-tests (network delays between containers 20ms)
- high throughput demonstration case(orderbook or messenger)
- long-running tests
- kill/bootstrat/restart nodes
- G/MN. Add API to request key ranges for G
- MN. store used ranges on etcd
- external calls (possibility to make http/tcp/etc requests to external services)
- dump data to s3?? (??: what exactly we need to persist? Format? Easy to bootstrap later??)
- MN. Bootstrap node from s3
- G. make it working as a server/sidecar/library