Microservices for collecting transaction and moment data off the NBA Top Shot Flow blockchain. @mjspector intends to use this data for... something.
- consumer: Code for the following services:
- listener: listens to new blocks and makes request to fetchers via Redis.
- fetcher: invoked with a specific event type (e.g.
Market.MomentPurchased
); pops blocks off Redis and fetches events of the aforementioned type in the block, up to a certain height. - recorder: writes moments and events to Postgres.
- migrator: Rough Ruby app I wrote for maintaining the Postgres database schema. Runs every five minutes in the cloud.
- infrastructure: Terraform configuration for spawning the aforementioned services, plus Redis/Postgres/etc. in AWS using ECS, EC2, RDS, Elasticache, etc. in a private VPC; SSH accessible via a bastion.
All services are conveniently orchestrated with Docker. The only installation steps are to clone the repository and construct the database:
git clone [email protected]:nporteschaikin/topshothawk
cd topshothawk
docker-compose run --rm migrator load
docker-compose up -d