# Architecture
# Overview
The Petro.ai system is an application server resting on a NoSQL database. With exposed endpoints, both the application server and users can make use of the microservices provided by Petro.ai.
# Web Server
Petro Web Server is an API server that can be deployed to a virtual private cloud or on-premise. Petro Web Server’s main role is that of a dispatcher. It receives incoming requests from end users and applications, schedules them with the PetroDatabase for a worker to complete, then notifies the requester that the work has been complete.
# Forge
Petro.ai is uniquely designed to enable data-driven workflows. This means handling large amounts of data in a reactive way. Forge provides the reactive compute and data caching to create a modern user experience across the platform.
# TESS
TESS is the task execution system in Petro.ai and provides job-based compute.
# Petro Portal
Petro.ai Portal is the distribution center for Petro.ai software, Spotfire Extensions, license management, and API access management.
# Database
Petro.ai utilizes the MongoDB 4.0 Community Server as a flexible and scalable NoSQL database. MongoDB allows for easy deployment and scalability both on-prem and in the cloud. Utilizing a NoSQL database such as MongoDB also allows Petro.ai to efficiently model complex hierarchical relationships into a single document view. This document structure allows for applications to quickly query for the data they need without complex join logic often found in SQL databases.
Petro.ai applications rely on an oil and gas schema developed by Petro.ai to ensure documents inserted into or updated are structured correctly. Interfaces with Petro.ai are facilitated by Petro.ai applications, application programming interface (API) calls, or via libraries (R, Python) which ensure that the schema is followed, and the integrity of data is maintained. Direct insertion or updates to Petro.ai collections are strongly discouraged.
# How can I use Petro.ai?
There are several ways to use the platform:
# Web Apps
The primary way of interacting with Petro.ai is through the variety of workflow-focused apps provided through the web.
# API Endpoints
The API allows developers to programmatically integrate Petro.ai into custom programs. Convenient scripting libraries make interacting with the API easier. The API documentation can be used to write your own corporate libraries for accessing the API. For security, the API uses API keys which can be generated by an organization’s administrator via the Petro.ai Portal. In addition to security, these keys have the added benefit of being able to monitor developer use of this service.
Many of Petro.ai applications are built leveraging the API to access and store data, as well as to create and manage jobs. This API allows developers to do the same, customizing Petro.ai to fit your organization's needs.
# Connectors
Dynamically connect the data and analysis in your petron to business intelligence tools like TIBCO Spotfire.