A general purpose Distributed Systems Framework

Clone this repo:
  1. 0cb57ac add CLAUDE.md by yasithdev · 4 days ago master
  2. 82506ff fix: sharing init, storage mapping, SDK facades, and dev infra (#614) by Yasith Jayawardana · 5 days ago
  3. f250f6d refactor: gRPC/Armeria migration with full module boundary enforcement (#612) by Yasith Jayawardana · 7 days ago
  4. 976c07d chore: add .worktrees/ to gitignore by yasithdev · 2 weeks ago
  5. ed2986f7 security: upgrade credential encryption from AES/CBC to AES/GCM (#610) by Yasith Jayawardana · 2 weeks ago

Apache Airavata

image

Build Status License Contributors

Apache Airavata is a software framework for executing and managing computational jobs on distributed computing resources including local clusters, supercomputers, national grids, academic and commercial clouds. Airavata builds on general concepts of service oriented computing, distributed messaging, and workflow composition and orchestration. Airavata bundles a server package with an API, client software development Kits and a general purpose reference UI implementation.

Key Features

  • 🔧 Service-oriented architecture with distributed messaging
  • 🔄 Fully-managed task lifecycle (environment setup, data staging, execution, and output retrieval)
  • ☁️ Multi-cloud and hybrid cloud support
  • 🖥️ Comprehensive API and SDK ecosystem
  • 🌐 Reference UI Implementations

Using Airavata

If you’re a researcher, Airavata offers several ways to streamline your workflows:

  1. Submit Batch Jobs via the Airavata Application Portal -- Example
  2. Launch Interactive Experiments through the Airavata Research Portal -- Example
  3. Explore and run published experiments from the Airavata Research Catalog -- Example
  4. Run interactive computational jobs directly from your IDE using Airavata Python SDK -- PyPI

🧱 The Airavata Ecosystem

Apache Airavata is composed of modular components spanning core services, data management, user interfaces, and developer tooling.

🔧 Core Services

📦 Data & Metadata Services

📚 Documentation & Branding

🧪 Experimental & Research

🔄 How Airavata Works

Airavata runs as a single unified JVM (Spring Boot + Armeria) that serves gRPC and REST (HTTP/JSON transcoding) on a single port, plus background workers.

graph TB
    subgraph "Docker Infrastructure (compose.yml)"
        DB[(MariaDB<br/>:13306)]
        RMQ[RabbitMQ<br/>:5672]
        ZK[ZooKeeper<br/>:2181]
        KFK[Kafka<br/>:9092]
        KC[Keycloak<br/>:18080]
    end

    subgraph "Unified Airavata Server (single JVM)"
        direction TB
        ARMERIA["Armeria :9090<br/>gRPC + REST transcoding"]
        SVC["Service Layer<br/>(airavata-api module)"]
        BG["Background Services<br/>12 workers"]
    end

    SDK[Python SDK] -->|gRPC| ARMERIA
    Portal[Web Portal] -->|REST| ARMERIA
    ARMERIA --> SVC
    SVC --> DB
    SVC --> RMQ
    BG --> ZK
    BG --> KFK
    BG --> RMQ
    SVC -.->|auth| KC

1. Unified Airavata Server (airavata-server)

Entry point: org.apache.airavata.server.AiravataServerMain Started via: tilt up or java -jar airavata-server/target/airavata-server-0.21-SNAPSHOT.jar

The unified server hosts gRPC and REST (via Armeria HTTP/JSON transcoding) on a single port, Spring Boot services (Research, Agent, File Server), and background workers in a single JVM. On startup it:

  1. Initializes the unified airavata database
  2. Starts Armeria server on port 9090 (gRPC + REST transcoding + DocService at /docs)
  3. Starts background IServer workers

Architecture: Service Layer + gRPC Transport

All business logic lives in a transport-agnostic service layer (org.apache.airavata.service.*). gRPC service implementations delegate to services. Proto definitions with google.api.http annotations provide automatic REST transcoding via Armeria.

ServiceResponsibility
ExperimentServiceExperiment lifecycle (create, launch, clone, terminate, intermediate outputs)
ProjectServiceProject CRUD and search
GatewayServiceGateway management and sharing domain setup
ApplicationCatalogServiceApp modules, deployments, and interfaces
ResourceServiceCompute/storage resources, job submission, data movement, storage info
CredentialServiceSSH/password credential management with sharing
ResourceSharingServiceResource sharing and access control
GroupResourceProfileServiceGroup resource profiles and policies
GatewayResourceProfileServiceGateway resource preferences
UserResourceProfileServiceUser resource preferences
SSHAccountServiceSSH account provisioning and validation
DataProductServiceData products and replicas
NotificationServiceNotification CRUD
ParserServiceParsers and parsing templates

Shared utilities: SharingHelper (sharing operations), EventPublisher (messaging), RequestContext (transport-agnostic identity).

Background Services (IServer lifecycle, same JVM)

ServiceResponsibility
DBEventManagerRunnerSyncs task execution events to the DB via pub/sub
MonitoringServerPrometheus metrics endpoint (optional)
ComputationalResourceMonitoringServicePolls compute resource queue status
DataInterpreterServiceMetadata analysis for submitted jobs
ProcessReschedulingServiceRetries and reschedules failed processes
HelixControllerManages Helix cluster state transitions
GlobalParticipantExecutes task steps (EnvSetupTask, InputDataStagingTask, OutputDataStagingTask, JobVerificationTask, CompletingTask, ForkJobSubmissionTask, DefaultJobSubmissionTask, LocalJobSubmissionTask, ArchiveTask, WorkflowCancellationTask, RemoteJobCancellationTask, CancelCompletingTask, DataParsingTask, ParsingTriggeringTask)
PreWorkflowManagerHandles pre-execution phase (env setup, data staging)
PostWorkflowManagerHandles post-execution phase (cleanup, output fetching)
ParserWorkflowManagerHandles parsing/data-interpretation workflow phase
EmailBasedMonitorPolls email inbox for job status updates (optional)
RealtimeMonitorListens on Kafka for real-time job state changes
stateDiagram-v2
    [*] --> CREATED
    CREATED --> VALIDATED : validateExperiment
    VALIDATED --> LAUNCHED : launchExperiment
    LAUNCHED --> EXECUTING : PreWorkflowManager
    EXECUTING --> MONITORING : job submitted
    MONITORING --> COMPLETED : job finished
    MONITORING --> FAILED : job error
    EXECUTING --> CANCELLED : terminateExperiment
    COMPLETED --> [*]
    FAILED --> [*]
    CANCELLED --> [*]
graph LR
    subgraph "Startup Sequence"
        direction TB
        A[1. DB Init] --> B[2. Armeria Server :9090]
        B --> C[3. DBEventManager]
        C --> D[4. HelixController]
        D --> E{waitForHelixCluster}
        E --> F[5. HelixParticipant]
        F --> G[6. Pre/Post/Parser WF Managers]
        G --> H[7. Email/Realtime Monitors]
    end

Embedded Spring Boot Services

The following services are embedded in the unified server (not run separately):

ServiceModulePurpose
Agent Serviceairavata-api/agent-serviceAgent sidecar lifecycle, bidirectional gRPC for interactive jobs
Research Serviceairavata-api/research-serviceResearch catalog, application catalog, data products, output parsing

Additional service modules in airavata-api/:

ModulePurpose
compute-serviceHPC resource catalog, resource profiles, resource scheduling
storage-serviceStorage resources, data movement interfaces and protocols
credential-serviceSSH keys, passwords, credential store
iam-serviceIdentity, access management, gateways, user profiles
sharing-servicePermissions, groups, tags, resource discovery
orchestration-serviceProcess/task/job execution, workflow orchestration

🏗️ Getting Started

Prerequisites

RequirementVersionCheck Using
Java SDK17+java --version
Apache Maven3.8+mvn -v
Docker Engine20.10+docker -v
Docker Compose2.0+docker compose version
Tilt0.33+tilt version

Quick Start (Tilt)

Tilt orchestrates the full development stack — infrastructure, build, and all services:

git clone https://github.com/apache/airavata.git
cd airavata
tilt up

This starts:

  • Infrastructure: MariaDB, RabbitMQ, ZooKeeper, Kafka, Keycloak (via compose.yml)
  • Unified Airavata Server: gRPC + REST on port 9090, API docs at /docs

Open the Tilt UI at http://localhost:10350 to monitor all resources. Integration tests can be triggered manually from the Tilt UI.

Manual Start

docker compose up -d                          # Infrastructure
mvn clean package -DskipTests -T4             # Build
java -jar airavata-server/target/airavata-server-0.21-SNAPSHOT.jar  # Start server

Or use the helper scripts:

./dev-tools/scripts/setup.sh    # Infrastructure + build
./dev-tools/scripts/start.sh    # Start server

Health Monitoring

The Armeria server on port 9090 exposes:

EndpointMethodDescription
/internal/actuator/healthGETHealth check
/docsGETArmeria DocService (API documentation)

Configuration

The main configuration file is airavata-server/src/main/resources/application.yml. Key settings:

  • spring.datasource.url — JDBC URL (default: jdbc:mariadb://localhost:13306/airavata)
  • armeria.server.port — Armeria server port (default: 9090)
  • airavata.security.openid-url — Keycloak realm URL

Integration Tests

mvn test -pl airavata-api -Dgroups=runtime

Server Ports

TransportPortPurpose
Armeria9090gRPC + REST (HTTP/JSON transcoding), DocService at /docs, health at /internal/actuator/health

🤝 Contributing

We welcome contributions from the community! Here's how you can help:

  1. 🍴 Fork the repository
  2. 🌿 Create a feature branch
  3. ✨ Make your changes
  4. 🧪 Add tests if applicable
  5. 📝 Submit a pull request

Learn More:

Setting up your IDE

Use tilt up to start the full stack, then attach your IDE debugger. For remote debugging, add -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 to the serve_cmd in the Tiltfile.

💬 Community & Support

Get Help:

📄 License

Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for
additional information regarding copyright ownership.

The ASF licenses this file to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at:

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.

See the LICENSE file for complete license details.