Giter Site home page Giter Site logo

abacus's Introduction

abacus

Service Details

  • Node.JS

Requirements

  • Ability to specify date/time range
  • Ability to run script at any time and will only generate new data since the last time it ran
  • Generates two reports, one for payouts of renters and one for billing for farmers
  • Ability to have a master process that controls running multiple instances of abacus so that it can be scaled
    • This would allow us to tell each worker to handle X date/time range and then combine those proposals into a single proposal or proposal group

Questions?

  • Should this data be published?
  • Proof process? How do we confirm?
    • Something looks fishy, dump all data used to generate data or report?
    • How to handle discrepancy
  • How do we do signed receipts between two users and how do they get reported to us

Proposal Spec

Two parts, payouts and billing

Payouts ( Farmer Services )

  • Storage totals from contracts
  • Transfer totals for upload/downloads

How do we calculate?

(manual process)

  • Calculate per Farmer per Contract
    • GBh for Storage Contracts by farmer
    • GBh for Transfer by farmer

Billing ( Renter Usage )

  • Storage totals from contracts
  • Transfer totals for upload/downloads
  • Consider Audits
  • Other Params or Limitations
    • X amount of SJX in account
    • Total number of farmers running
    • Network Karma ( something to track good or bad netizens )

How do we calculate?

(manual process)

Data format for first step

  • Storage Usage GBh per time period
  • Transfer GHh per time period

Execution Plan Phases

  1. Create mongodb query to use for now to aggregate billing data + This will work until audits are live as audits clear the download counts that this script will use
  2. Build basic service to use audits to do billing
  3. Reassess and build into microservices with queueing to make robust

Questions

  • Does the money received from api users go directly to farmers or keep separate
  • Does the data for download count include date/time?
    • If not, we need to add that so that we can query for time ranges
    • We can decode the date/time from the mongo entry
    • Add completion date/time to download
  • How do we handle contracts that failed an audit part way through?

Things we need that don't exist

  • Download times/speed as reported by the renter (end user) and by the farmer
  • Transfer date/time for download

API Spec

abacus's People

Contributors

phutchins avatar super3 avatar

Stargazers

Priyabrata Dash avatar

Watchers

James Cloos avatar  avatar Tome Boshevski avatar  avatar

Forkers

bobquest33

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.