GithubHelp home page GithubHelp logo

datafast-network / datafast-runtime Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 0.0 788 KB

A Subgraph-indexing-runtime that prioritises performance & cost efficiency

Home Page: https://runtime.datafast.network

Rust 99.75% Dockerfile 0.15% Shell 0.10%
blockchain data-indexing subgraph diy subgraphs thegraph thegraphprotocol

datafast-runtime's Introduction

datafast-runtime's People

Contributors

quannadev avatar vutran1710 avatar

Stargazers

 avatar

datafast-runtime's Issues

CLI Mode

App can be run as CLI with options

Truncate data

Each datasource should be able to config maximum block history to store data

Add more logs

SWR is lacking logs. Must provide more logs for it.

  • Log on different wasm-hosts should have different target names
  • Log should be enough, not too many that it can cause performance degradation
  • Might need some macros to make it happen

Source from grpc

Implement GRPC server/client for ingest source input

  1. Init GRPC Server
  2. Init Substream client

Implement NATS

Subscribe block data from NATS (so SWR can run along with Pullcaster)

Logging

Add more logs, and format it to be more readable

Verify non null data

Graph schema define non-null data but Schemas & Database are not verifying them. Must check before insert.

Optimize subgraph's create-source

creating wasm-sources takes ~ 20ms (even if only 3 datasources) - which is quite a lot.

If query 10k-block step, and create new sources every time we process 1 single block, then:

  • it will take 20ms * 10_000 = 200_000ms = 200s = 3.3' (3 minutes 20 seconds)
  • if process 1M blocks, it will cost in total 3.3 * 100 = 330' = 5.5 hours
  • if process 10M blocks, it will cost 5.5 * 10 = 55h = 2.3 day

Load test NATS

If NATS cannot carry more than 100Mb block, it is useless.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.