Giter Site home page Giter Site logo

arnabguin / storetheindex Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ipni/storetheindex

0.0 0.0 0.0 18.36 MB

A storethehash based directory of CIDs

License: Other

Shell 0.60% Python 0.18% Go 88.32% Makefile 0.15% HTML 0.11% HCL 10.13% Dockerfile 0.52%

storetheindex's Introduction

StoreTheIndex ๐Ÿ—‚๏ธ

Go Reference Coverage Status

The first place to go in order to find a CID stored in Filecoin

This repo provides an indexer implementation that can be used to index data stored by a range of participating storage providers.

Design

Current Status

Released for production: The current production release is running at https://cid.contact

This project and is currently under active development ๐Ÿšง.

Install

This assumes go is already installed.

Install storetheindex:

go get github.com/filecoin-project/storetheindex

Initialize the storetheindex repository and configuration:

storetheindex init

Optionally, edit the configuration

edit ~/.storetheindex/config 

Running the Indexer Service

To run storetheindex as a service, run the daemon command. The service watches for providers to index, and exposes a query / content routing client interface.

The daemon is configured by the config file in the storetheindex repository. The config file and repo are created when storetheindex is initialized, using the init command. This repo is located in the local file system. By default, the repo is located at ~/.storetheindex. To change the repo location, set the $STORETHEINDEX_PATH environmental variable.

Provider Removal Policy

After a configured amount of time without any updates from a provider (PollInterval), the indexer will poll the provider at its last know publisher address, for any index updates. If there is no response from the provider after at least one attempt to poll, then the provider is considered inactive and is not returned in any find results. The indexer will continue polling on an interval (PollRetryAfter) until a time limit (PollStopAfter) is reached. If there is still no response to the poll attempts after this time limit is reached, then the provider is removed from the indexer and its records are garbage-collected and will need to be refetched.

The configuration values that control this are documented here, and their default values are specified here. A custom polling configuration may be applied for specific providers using the PollOverrides configuration value to specify per-provider Polling configuration.

Indexer CLI Commands

There are a number of client commands included with storetheindex. Their purpose is to perform simple indexing and lookup actions against a running daemon. These can be helpful to test that an indexer is working. These include the following commands:

Informational:

  • find Find value by CID or multihash in indexer
  • providers Show information about providers known to the indexer
    • get Get information about a specified provider
    • list List the known providers

Administrative:

  • admin Perform admin activities with an indexer
    • allow Allow advertisements and content from peer
    • block Block advertisements and content from peer
    • import-providers Import provider information from another indexer
    • reload-config Reload various settings from the configuration file
    • sync Sync indexer with provider
  • init Initialize or upgrade indexer node config file

Testing:

  • import Imports data to indexer from different sources
  • register Register provider information with an indexer
  • synthetic Generate synthetic load to import in indexer

Help

To see a list of available commands, see storetheindex --help. For help with command usage, see storetheindex <command> --help.

Configuration

The storetheindex config file documentation

License

SPDX-License-Identifier: Apache-2.0 OR MIT

storetheindex's People

Contributors

gammazero avatar masih avatar adlrocha avatar willscott avatar marcopolo avatar github-actions[bot] avatar web3-bot avatar ischasny avatar petar avatar mvdan avatar hannahhoward avatar rvagg avatar cmharden avatar lexluthr avatar steve-fraser avatar dependabot[bot] avatar

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.