yasithdev opened a new pull request, #612:
URL: https://github.com/apache/airavata/pull/612
## Summary
Complete architectural migration of Apache Airavata from Thrift RPC to gRPC
with Armeria HTTP/JSON transcoding. This replaces the Thrift API layer, REST
controllers, and Python SDK with a unified gRPC-first architecture served on a
single port.
### What changed
- **Replaced Thrift with gRPC+Armeria** — 16 gRPC service definitions (244
RPCs) with `google.api.http` annotations for automatic REST/JSON transcoding.
Single Armeria server on port 9090 replaces separate Thrift (8930), REST/Tomcat
(18889), and gRPC (19900) servers.
- **Eliminated all Thrift dependencies** — zero `org.apache.thrift` imports,
zero Thrift IDL files, zero `libthrift` in POMs. Migrated ~230 Java files from
Thrift model types to proto types (mutable POJOs → immutable builders).
- **Modularized airavata-api** — extracted 3 new Maven sub-modules from the
monolithic jar:
- `compute-service` — HPC resource catalog, resource profiles
- `storage-service` — data products, file service, storage resources
- `credential-service` — SSH keys, passwords, credential store
- Expanded `research-service` with experiments, projects, applications,
parsers, notifications
- Defined SPI interfaces (`ComputeResourceProvider`, `StorageProvider`,
`CredentialProvider`) to break circular dependencies
- **Consolidated server modules** — merged `airavata-server/grpc/`,
`airavata-server/rest/`, and `airavata-api/file-server/` into single
`airavata-server` module
- **Rewrote Python SDK for gRPC** — replaced Thrift clients with gRPC stubs,
deleted 120K lines of Thrift-generated Python code, all 8 client classes working
- **Wired all 16 gRPC services** — including GroupManager, IamAdmin,
UserProfile (previously UNIMPLEMENTED stubs)
- **Updated all docs, configs, CI** — Dockerfile, Tiltfile, Ansible
playbooks, properties files, READMEs all reflect new architecture
### Architecture
```
airavata-api/ (foundation — common, security, sharing,
messaging, execution engine)
├── compute-service/ (ResourceService, GatewayResourceProfile,
GroupResourceProfile, UserResourceProfile)
├── storage-service/ (DataProductService, AirvataFileService,
StorageProvider)
├── credential-service/ (CredentialService, SSHAccountService,
CredentialStoreHandler)
├── research-service/ (ExperimentService, ProjectService,
ApplicationCatalog, Parsers, Notifications)
└── agent-service/ (agent communication, bidirectional streaming)
airavata-server/ (unified — Armeria gRPC + REST transcoding on
port 9090)
├── grpc/services/ (16 gRPC service implementations)
├── config/ (AiravataArmeriaConfig, GrpcAuthInterceptor,
GrpcStatusMapper)
└── file/ (FileController for multipart uploads)
airavata-python-sdk/ (gRPC-based — grpcio, 8 client classes,
generated proto stubs)
```
### Numbers
- **957 files changed** (+46K / -149K lines)
- **16 gRPC services**, 244 RPCs with REST transcoding
- **270 unit tests**, all passing
- **0 Thrift imports** remaining in production code
- **Single port 9090** replaces 3 separate ports
### Server endpoints
| Endpoint | Purpose |
|----------|---------|
| `localhost:9090` (gRPC) | All 16 services via gRPC (HTTP/2) |
| `localhost:9090/api/v1/*` | REST/JSON transcoded from proto annotations |
| `localhost:9090/docs` | Armeria DocService (replaces Swagger) |
| `localhost:9090/internal/healthcheck` | Health check |
### Integration tested
- Server starts via `tilt up`, binds to port 9090
- DocService serves at `/docs` (HTTP 200)
- REST transcoding works: `GET /api/v1/gateways` returns 200
- Python SDK connects via gRPC and calls succeed (get_all_gateways,
search_projects, get_all_compute_resource_names, etc.)
- All 270 unit tests pass across 8 modules
## Test plan
- [x] `mvn compile -T4` — BUILD SUCCESS
- [x] `mvn test -T4` — 270 tests, 0 failures
- [x] Server startup with `tilt up` — Armeria binds to 9090
- [x] REST transcoding: `curl http://localhost:9090/api/v1/gateways`
- [x] Python SDK: `APIServerClient(access_token=...).get_all_gateways()`
- [x] DocService: `curl http://localhost:9090/docs/`
- [x] No Thrift imports in production code (`grep` audit clean)
- [x] No deleted business logic (diff audit verified)
- [ ] Full integration test suite with populated database
- [ ] Django portal migration (sub-project 3, separate PR)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]