This is an automated email from the ASF dual-hosted git repository. yasith pushed a commit to branch feat/thrift-server-extraction in repository https://gitbox.apache.org/repos/asf/airavata.git
commit 6b56687d1d7e7d279e285eeaf7684b34fe9ad2e2 Author: yasithdev <[email protected]> AuthorDate: Thu Mar 26 14:37:07 2026 -0500 chore: final cleanup after thrift server extraction Update ide-integration launchers to reflect consolidated server architecture: - APIServerStarter: replace removed AiravataAPIServer/OrchestratorServer/ProfileServiceServer references with the consolidated AiravataServer from airavata-thrift-server - JobEngineStarter / JobMonitorStarter: fix startServer() calls to use the IServer (Runnable) contract — wrap each service in a named Thread instead - ide-integration/pom.xml: add airavata-thrift-server dependency so AiravataServer is resolvable at compile time --- modules/ide-integration/pom.xml | 5 ++++ .../airavata/ide/integration/APIServerStarter.java | 29 ++++++---------------- .../airavata/ide/integration/JobEngineStarter.java | 17 ++++++------- .../ide/integration/JobMonitorStarter.java | 6 ++++- 4 files changed, 25 insertions(+), 32 deletions(-) diff --git a/modules/ide-integration/pom.xml b/modules/ide-integration/pom.xml index 67857b0257..4da3035247 100644 --- a/modules/ide-integration/pom.xml +++ b/modules/ide-integration/pom.xml @@ -35,6 +35,11 @@ under the License. <artifactId>airavata-api</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>org.apache.airavata</groupId> + <artifactId>airavata-thrift-server</artifactId> + <version>${project.version}</version> + </dependency> <dependency> <groupId>org.mariadb.jdbc</groupId> <artifactId>mariadb-java-client</artifactId> diff --git a/modules/ide-integration/src/main/java/org/apache/airavata/ide/integration/APIServerStarter.java b/modules/ide-integration/src/main/java/org/apache/airavata/ide/integration/APIServerStarter.java index 1445c53877..b27f84141f 100644 --- a/modules/ide-integration/src/main/java/org/apache/airavata/ide/integration/APIServerStarter.java +++ b/modules/ide-integration/src/main/java/org/apache/airavata/ide/integration/APIServerStarter.java @@ -19,31 +19,16 @@ */ package org.apache.airavata.ide.integration; -import org.apache.airavata.api.server.AiravataAPIServer; -import org.apache.airavata.credential.store.server.CredentialStoreServer; -import org.apache.airavata.db.event.manager.DBEventManagerRunner; -import org.apache.airavata.orchestrator.server.OrchestratorServer; -import org.apache.airavata.registry.api.service.RegistryAPIServer; -import org.apache.airavata.service.profile.server.ProfileServiceServer; -import org.apache.airavata.sharing.registry.server.SharingRegistryServer; +import org.apache.airavata.api.server.AiravataServer; +/** + * IDE convenience launcher that starts the consolidated Airavata Thrift server. + * The AiravataServer hosts all services (API, Registry, Orchestrator, Profile, etc.) + * on a single multiplexed port and manages all background services internally. + */ public class APIServerStarter { public static void main(String[] args) throws Exception { - DBEventManagerRunner dbEventManagerRunner = new DBEventManagerRunner(); - RegistryAPIServer registryAPIServer = new RegistryAPIServer(); - CredentialStoreServer credentialStoreServer = new CredentialStoreServer(); - SharingRegistryServer sharingRegistryServer = new SharingRegistryServer(); - AiravataAPIServer airavataAPIServer = new AiravataAPIServer(); - OrchestratorServer orchestratorServer = new OrchestratorServer(); - ProfileServiceServer profileServiceServer = new ProfileServiceServer(); - - dbEventManagerRunner.start(); - registryAPIServer.start(); - credentialStoreServer.start(); - sharingRegistryServer.start(); - airavataAPIServer.start(); - orchestratorServer.start(); - profileServiceServer.start(); + new AiravataServer().start(); } } diff --git a/modules/ide-integration/src/main/java/org/apache/airavata/ide/integration/JobEngineStarter.java b/modules/ide-integration/src/main/java/org/apache/airavata/ide/integration/JobEngineStarter.java index 297f8dcd88..c9945f18c0 100644 --- a/modules/ide-integration/src/main/java/org/apache/airavata/ide/integration/JobEngineStarter.java +++ b/modules/ide-integration/src/main/java/org/apache/airavata/ide/integration/JobEngineStarter.java @@ -30,6 +30,10 @@ import org.apache.helix.manager.zk.ZKHelixAdmin; import org.apache.helix.manager.zk.ZNRecordSerializer; import org.apache.helix.manager.zk.ZkClient; +/** + * IDE convenience launcher for the Airavata job execution engine components. + * IServer implementations run via Runnable.run() — each is started in its own thread. + */ public class JobEngineStarter { public static void main(String args[]) throws Exception { @@ -44,9 +48,8 @@ public class JobEngineStarter { zkHelixAdmin.addCluster(ServerSettings.getSetting("helix.cluster.name"), true); System.out.println("Starting Helix Controller ......."); - // Starting helix controller HelixController controller = new HelixController(); - controller.startServer(); + new Thread(controller, "helix-controller").start(); ArrayList<Class<? extends AbstractTask>> taskClasses = new ArrayList<>(); @@ -55,19 +58,15 @@ public class JobEngineStarter { } System.out.println("Starting Helix Participant ......."); - - // Starting helix participant GlobalParticipant participant = new GlobalParticipant(taskClasses, null); - participant.startServer(); + new Thread(participant, "helix-participant").start(); System.out.println("Starting Pre Workflow Manager ......."); - PreWorkflowManager preWorkflowManager = new PreWorkflowManager(); - preWorkflowManager.startServer(); + new Thread(preWorkflowManager, "pre-workflow-manager").start(); System.out.println("Starting Post Workflow Manager ......."); - PostWorkflowManager postWorkflowManager = new PostWorkflowManager(); - postWorkflowManager.startServer(); + new Thread(postWorkflowManager, "post-workflow-manager").start(); } } diff --git a/modules/ide-integration/src/main/java/org/apache/airavata/ide/integration/JobMonitorStarter.java b/modules/ide-integration/src/main/java/org/apache/airavata/ide/integration/JobMonitorStarter.java index 2068e4e38a..a863b18440 100644 --- a/modules/ide-integration/src/main/java/org/apache/airavata/ide/integration/JobMonitorStarter.java +++ b/modules/ide-integration/src/main/java/org/apache/airavata/ide/integration/JobMonitorStarter.java @@ -21,9 +21,13 @@ package org.apache.airavata.ide.integration; import org.apache.airavata.monitor.email.EmailBasedMonitor; +/** + * IDE convenience launcher for the email-based job monitor. + * EmailBasedMonitor implements IServer (Runnable) — started in its own thread. + */ public class JobMonitorStarter { public static void main(String args[]) throws Exception { EmailBasedMonitor emailBasedMonitor = new EmailBasedMonitor(); - emailBasedMonitor.startServer(); + new Thread(emailBasedMonitor, "email-monitor").start(); } }
