Skip to main content

System Architecture

System Architecture of Protege Engine

Overview

Protege Engine's back-end system architecture is designed to provide robust, scalable, and efficient AI capabilities via a GraphQL API. This section of the documentation details the technical infrastructure that supports the Protege Engine, including its database setup, API layer, and job execution framework, all of which are crucial for delivering the fine-tuning and deployment functionalities of the system.

Technical Stack

  • Programming Language: The system is implemented in TypeScript, ensuring strong typing and scalable maintenance of the codebase.
  • Database: PostgreSQL is used for data storage, providing a reliable and powerful database management system that supports complex queries and large datasets.
  • Object-Relational Mapping (ORM): Prisma is utilized as the ORM, which facilitates database schema management and data access layer abstraction.
  • API Layer: TypeGraphQL, integrated with Prisma, is used to generate CRUD (Create, Read, Update, Delete) resolvers automatically. This setup streamlines the development of the GraphQL API and ensures consistency between the database schema and the API.
  • Job Execution: Temporal is leveraged for handling multi-language asynchronous job execution, which is critical for tasks such as model training and data processing that require reliable long-running process management.
  • Model Deployment: The system can deploy Inference Backends to Kubernetes clusters or cloud accounts using Skypilot, providing flexibility and scalability in model deployment.
  • Deployment Configuration: The deployment of the Protege Engine is simplified with an easy-to-use Helm chart, which encapsulates all necessary configurations for quick and reliable setup in a Kubernetes environment.

System Architecture Diagram

Below is an architecture diagram that visualizes the architecture of the Protege Engine:

Explanation of Components

  • Client: Represents the users of the Protege Engine, who interact with the system via GraphQL requests.
  • GraphQL API: The interface through which clients submit requests; it processes these requests and interacts with the ORM or the job execution system as needed.
  • Prisma ORM: Manages the interaction between the GraphQL API and the PostgreSQL database, facilitating data manipulation and retrieval.
  • PostgreSQL Database: Stores all data relevant to the operation of Protege Engine, such as user data, model configurations, and prediction results.
  • Temporal Workflow Engine: Handles the scheduling, execution, and management of asynchronous jobs necessary for AI model training and data processing.
  • Training and Inference Tasks: Specific operations handled by Temporal, including training AI models and performing inference tasks.
  • Skypilot: Tool used for deploying models to Kubernetes, managing the infrastructure required for running inference backends.
  • Kubernetes Cluster: The deployment environment for the inference models, managed via Skypilot, which ensures scalability and reliability of deployed AI models.