NodeChain EN
  • NodeChain
  • Learn
    • About NodeChain
    • Infrastructure
      • Connector
        • Wrapper APIs
      • Nodes
      • Startup script
    • License
    • Ecosystem
      • Supported APIs
      • Integrations
      • Acknowledgments
  • Develop
    • Quick start
      • Initial setup
      • Using command-line script
        • Commands
    • How-to
      • Run tests locally
      • Lint automatically with hooks
      • Integrate a new Blockchain/API
      • Connect to a public node
    • Wrapper API definition file
    • Contributing
  • Reference
    • API Reference
      • Admin
      • General Endpoints
      • REST Wrapper API
        • Bitcoin Cash
        • Bitcoin
        • Ethereum
          • ERC-20
      • JSON-RPC Wrapper API
        • Bitcoin Cash
        • Bitcoin
        • Ethereum
          • ERC-20
      • Real-Time Wrapper API
        • Bitcoin
        • Ethereum
Powered by GitBook
On this page
  • External architecture
  • Internal architecture
  1. Learn
  2. Infrastructure

Connector

PreviousInfrastructureNextWrapper APIs

Last updated 3 years ago

The Connector is the part of the infrastructure that is responsible for routing the requests it receives to each of the APIs and sending them to the corresponding nodes.

External architecture

The Connector is composed of two different services, an Nginx reverse proxy, a router server coded in Python, and one API for every supported blockchain.

Nginx adds a layer of abstraction and security to the requests that reach the Connector. This allows to centralize all requests in a single access point, hide the IP address and allow HTTPS connections, among other things.

This is the only endpoint (URL) consumed by applications using NodeChain, thus making all requests made go through this component.

On the other side, the connector service is in charge of receiving, handling and routing all requests through three protocols:

  • JSON-RPC

  • REST API

  • Real-Time Websockets

Note that "the Connector" and the "connector service" are not the same. Both the "connector service" and Nginx service are part of "the Connector".

Internal architecture

The connector service is divided into three parts:

  • A Python server (Router)

  • An Administration API

  • API packages for every supported blockchain

The Python server is responsible for handling and routing the requests it receives. It is also in charge of managing the APIs by enabling or disabling them.

Communication between these components is done using the JSON-RPC protocol.

Each Wrapper API has its own endpoints due to the differences between each of the blockchains. However, the endpoints are intended to have as much uniformity as possible.

The Connector maintains a file called availableCurrencies.json where each of the Wrapper APIs is defined.

The availableCurrencies.json file is purely for definition and will need to be modified when developing and adding a new API.

In addition, it is responsible for sending and receiving requests from the through JSON-RPC protocol.

In order to keep track of which nodes are up and ready to receive requests, the Python server implements the . It receives requests when the starts a node, processes them and enables the Wrapper API that belongs to the blockchain of the started node.

nodes
administration API
startup script
Wrapper APIs
Connector schema