How phybyte/mvx-api-deployer works
Identifying the Main Components
• Deployment Scripts: Represent the initialization, installation, and start scripts (1-Init.sh, 2-Install.sh, 3-Start.sh) as the entry point for managing and orchestrating the setup.
• Configuration: Include the central configuration file (config.cfg) and the structured configuration directories under config/ covering different network types (devnet, mainnet) and their respective service configurations.
• ElasticSearch Indexer: Represent this as the service that processes raw blockchain data. Show its dependencies on configuration files in the mx-chain-es-indexer-go directories.
• ElasticSearch Database & Kibana: Illustrate these as the storage and visualization layers that handle indexing and visualization of the blockchain data, according to the deployment description.
• MultiversX API: Represent the API service which exposes an external REST interface to query the blockchain data.
• xExchange Service: Include the exchange service component (mx-exchange-service) responsible for feeding data into the API.
• Supporting Services and Infrastructure: Optionally illustrate the bash-based maintenance commands, environment configuration (.env files) and docker-compose orchestration files that tie these components together.
Relationships and Interactions
• How the deployment scripts trigger the setup sequence by initializing the server, installing individual services, and finally starting them.
• That the Observing Squad components continuously collect blockchain data and feed it into the ElasticSearch Indexer.
• That the Indexer, in turn, transforms and loads the data into the ElasticSearch Database, which is then visualized by Kibana.
• That the MultiversX API pulls data from the ElasticSearch Database and also may interact with the xExchange service to enrich the API data.
Architectural Patterns and Technologies
• A modular microservices approach: Each service (observing nodes, indexer, API, xExchange) is built and managed separately.
• Usage of containerization (docker-compose files) as the mechanism to deploy services reliably.
• That the configuration is environment-specific (different folders for devnet and mainnet), meaning that the deployment can scale or change per network.
• Mention the reliance on Docker/Docker Compose for orchestration.