refactor: unified transport servers — Spring module reorganization#600
Merged
refactor: unified transport servers — Spring module reorganization#600
Conversation
Replace OpenJPA dependency, bytecode enhancement plugin, and @foreignkey annotations with Hibernate equivalents (@onDelete). Delete persistence.xml — no longer needed with Hibernate runtime proxies. EntityManagerFactory usage in JPAUtils noted but left for the Spring Boot wrapping task.
…rary - Remove spring-boot-maven-plugin, maven-assembly-plugin, and actuator dependency - Add AgentServiceConfig for component scanning, entity scanning, JPA repos - Add AgentProperties (@ConfigurationProperties) replacing @value annotations - Replace local UserContext with unified org.apache.airavata.common.security.UserContext - Delete AgentServiceApplication, AuthzTokenFilter, application.yml, assembly descriptor
Replace the custom main() bootstrap in AiravataServer.java with
Spring-managed components:
- AiravataThriftServerConfig: @ConditionalOnServer("thrift") entry point
- ThriftProcessorConfig: builds TMultiplexedProcessor as a @bean
- ThriftServerLifecycle: SmartLifecycle that manages TThreadPoolServer
- BackgroundServicesConfig: @PostConstruct DB initialization
All handlers annotated with @component. OrchestratorServerHandler
created via @bean factory with graceful fallback on init failure.
Background services (Helix, monitoring, etc.) deferred to future task.
Replace 5 separate service definitions (airavata-server, research-service, agent-service, file-server, rest-proxy) with a single unified airavata-server entry. Update build deps to track new server modules.
The unified airavata-server module now produces the distribution tarball, so the assembly plugin and descriptor files in airavata-api are no longer needed.
This was referenced Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
airavata-api(13@ForeignKey→@OnDeleteannotations, removed bytecode enhancement plugin, deletedpersistence.xml)research-service,agent-service, andfile-serverfrom standalone Spring Boot apps to plain library jars — stripped@SpringBootApplication, auth filters, OpenAPI/CORS config, assembly descriptorsairavata-rest-server(unified REST surface with centralized auth, OpenAPI, CORS, absorbed Kafka proxy fromrestproxy) andairavata-grpc-server(unified gRPC with auth interceptor)airavata-thrift-serverfrom custommain()bootstrap to Spring-managedSmartLifecyclewith handlers as@Componentbeansairavata-servermodule with@SpringBootApplication, conditional server activation via@ConditionalOnServer, singleapplication.yml, distribution tarball@ConditionalOnServerannotation, unifiedUserContext,AiravataServerProperties/api/v1/files/*Architecture after this PR
All servers share one
ApplicationContextand can be selectively activated:Test Plan
mvn clean install -DskipTests -T4passes (all 10 modules)mvn testpasses on airavata-api and airavata-thrift-servertilt upstarts unified server with all three transports/swagger-ui.html)🤖 Generated with Claude Code