This is an automated email from the ASF dual-hosted git repository.

yasith pushed a commit to branch feat/single-jvm
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/feat/single-jvm by this push:
     new 20e8d11abd feat: update all modules for unified server + multiplexed 
Thrift
20e8d11abd is described below

commit 20e8d11abd4ce6f7db648fac2dd753ed3b3bbbd4
Author: yasithdev <[email protected]>
AuthorDate: Thu Mar 26 01:59:45 2026 -0500

    feat: update all modules for unified server + multiplexed Thrift
    
    - ThriftClientPool: add serviceName support for TMultiplexedProtocol
    - file-server: use RegistryService via multiplexed protocol on port 8930
    - agent-service: fix localhost, ddl-auto=update
    - research-service: fix localhost, unified server port
    - restproxy: fix localhost
    - Register Orchestrator service on unified server
    - All modules build, start, and run successfully
    
    Verified services:
      Port 8930:  Unified Thrift (9 services multiplexed)
      Port 18880: Agent Service (Spring Boot)
      Port 8050:  File Server (Spring Boot)
      Port 18889: Research Service (Spring Boot)
      Port 8082:  REST Proxy (Spring Boot)
      Python SDK: connected, API version 0.18.0
---
 .gitignore                                            |  2 ++
 .../airavata/common/utils/ThriftClientPool.java       | 19 ++++++++++++++++++-
 .../agent-service/src/main/resources/application.yml  | 16 ++++++++--------
 .../airavata/file/server/FileServerConfiguration.java | 14 ++++++--------
 .../src/main/resources/application.properties         |  7 +++----
 .../src/main/resources/application.yml                | 16 ++++++++--------
 .../src/main/resources/application.properties         |  4 ++--
 7 files changed, 47 insertions(+), 31 deletions(-)

diff --git a/.gitignore b/.gitignore
index c298262f76..6a9a2b896a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -64,3 +64,5 @@ airavata-api/distribution/
 airavata-api/target/
 keystores/airavata.p12
 keystores/aes.p12
+modules/*/distribution/
+modules/*/*/distribution/
diff --git 
a/airavata-api/src/main/java/org/apache/airavata/common/utils/ThriftClientPool.java
 
b/airavata-api/src/main/java/org/apache/airavata/common/utils/ThriftClientPool.java
index c4dff37477..3695dd22a0 100644
--- 
a/airavata-api/src/main/java/org/apache/airavata/common/utils/ThriftClientPool.java
+++ 
b/airavata-api/src/main/java/org/apache/airavata/common/utils/ThriftClientPool.java
@@ -29,6 +29,7 @@ import org.apache.commons.pool2.impl.DefaultPooledObject;
 import org.apache.commons.pool2.impl.GenericObjectPool;
 import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
 import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.protocol.TMultiplexedProtocol;
 import org.apache.thrift.protocol.TProtocol;
 import org.apache.thrift.transport.TSocket;
 import org.apache.thrift.transport.TTransport;
@@ -60,6 +61,12 @@ public class ThriftClientPool<T extends BaseAPI.Client> 
implements AutoCloseable
         this(clientFactory, new BinaryOverSocketProtocolFactory(host, port), 
poolConfig);
     }
 
+    public ThriftClientPool(
+            ClientFactory<T> clientFactory, GenericObjectPoolConfig<T> 
poolConfig,
+            String host, int port, String serviceName) {
+        this(clientFactory, new BinaryOverSocketProtocolFactory(host, port, 
serviceName), poolConfig);
+    }
+
     public ThriftClientPool(
             ClientFactory<T> clientFactory, ProtocolFactory protocolFactory, 
GenericObjectPoolConfig<T> poolConfig) {
 
@@ -150,10 +157,16 @@ public class ThriftClientPool<T extends BaseAPI.Client> 
implements AutoCloseable
 
         private String host;
         private int port;
+        private String serviceName;
 
         public BinaryOverSocketProtocolFactory(String host, int port) {
+            this(host, port, null);
+        }
+
+        public BinaryOverSocketProtocolFactory(String host, int port, String 
serviceName) {
             this.host = host;
             this.port = port;
+            this.serviceName = serviceName;
         }
 
         public TProtocol make() {
@@ -165,7 +178,11 @@ public class ThriftClientPool<T extends BaseAPI.Client> 
implements AutoCloseable
                 logger.warn(e.getMessage(), e);
                 throw new ThriftClientException("Can not make protocol", e);
             }
-            return new TBinaryProtocol(transport);
+            TProtocol protocol = new TBinaryProtocol(transport);
+            if (serviceName != null) {
+                return new TMultiplexedProtocol(protocol, serviceName);
+            }
+            return protocol;
         }
     }
 
diff --git 
a/modules/agent-framework/agent-service/src/main/resources/application.yml 
b/modules/agent-framework/agent-service/src/main/resources/application.yml
index e500d03be4..fab385e8ea 100644
--- a/modules/agent-framework/agent-service/src/main/resources/application.yml
+++ b/modules/agent-framework/agent-service/src/main/resources/application.yml
@@ -16,13 +16,13 @@
 
 grpc:
   server:
-    host: airavata.localhost
+    host: localhost
     port: 19900
     max-inbound-message-size: 20971520
 
 server:
   port: 18880
-  address: airavata.localhost
+  address: localhost
 
 spring:
   servlet:
@@ -30,7 +30,7 @@ spring:
       max-file-size: 200MB
       max-request-size: 200MB
   datasource:
-    url: "jdbc:mariadb://airavata.localhost:13306/airavata"
+    url: "jdbc:mariadb://localhost:13306/airavata"
     username: "airavata"
     password: "123456"
     driver-class-name: org.mariadb.jdbc.Driver
@@ -39,20 +39,20 @@ spring:
       leak-detection-threshold: 20000
   jpa:
     hibernate:
-      ddl-auto: create
+      ddl-auto: update
     open-in-view: false
 
 airavata:
   server:
-    url: airavata.localhost
+    url: localhost
     port: 8930
     secure: false
-  storageResourceId: airavata.localhost_77116e91-f042-4d3a-ab9c-3e7b4ebcd5bd
+  storageResourceId: localhost_77116e91-f042-4d3a-ab9c-3e7b4ebcd5bd
   storagePath: /tmp
   cluster:
     applicationInterfaceId: AiravataAgent_f4313e4d-20c2-4bf6-bff1-8aa0f0b0c1d6
   tunnel:
-    serverHost: airavata.localhost
+    serverHost: localhost
     serverPort: 17000
     serverToken: airavata
-    serverApiUrl: http://airavata.localhost:8000
+    serverApiUrl: http://localhost:8000
diff --git 
a/modules/file-server/src/main/java/org/apache/airavata/file/server/FileServerConfiguration.java
 
b/modules/file-server/src/main/java/org/apache/airavata/file/server/FileServerConfiguration.java
index fd8f7664d1..9b063c1b46 100644
--- 
a/modules/file-server/src/main/java/org/apache/airavata/file/server/FileServerConfiguration.java
+++ 
b/modules/file-server/src/main/java/org/apache/airavata/file/server/FileServerConfiguration.java
@@ -39,13 +39,11 @@ public class FileServerConfiguration {
         return AdaptorSupportImpl.getInstance();
     }
 
-    // regserver.server.host
-    @Value("${regserver.server.host:localhost}")
-    private String registryServerHost;
-    // regserver.server.port
+    @Value("${airavata.server.host:localhost}")
+    private String airavataServerHost;
 
-    @Value("${regserver.server.port:8970}")
-    private int registryServerPort;
+    @Value("${airavata.server.port:8930}")
+    private int airavataServerPort;
 
     @Bean
     public ThriftClientPool<RegistryService.Client> registryClientPool() {
@@ -55,11 +53,11 @@ public class FileServerConfiguration {
         poolConfig.setBlockWhenExhausted(true);
         poolConfig.setTestOnBorrow(true);
         poolConfig.setTestWhileIdle(true);
-        // must set timeBetweenEvictionRunsMillis since eviction doesn't run 
unless that is positive
         poolConfig.setTimeBetweenEvictionRuns(Duration.ofMinutes(5));
         poolConfig.setNumTestsPerEvictionRun(10);
         poolConfig.setMaxWait(Duration.ofSeconds(3));
 
-        return new ThriftClientPool<>(RegistryService.Client::new, poolConfig, 
registryServerHost, registryServerPort);
+        return new ThriftClientPool<>(RegistryService.Client::new, poolConfig,
+                airavataServerHost, airavataServerPort, "RegistryService");
     }
 }
diff --git a/modules/file-server/src/main/resources/application.properties 
b/modules/file-server/src/main/resources/application.properties
index 42a416d40a..9edf9c74e5 100644
--- a/modules/file-server/src/main/resources/application.properties
+++ b/modules/file-server/src/main/resources/application.properties
@@ -1,9 +1,8 @@
 spring.servlet.multipart.max-file-size=10MB
 spring.servlet.multipart.max-request-size=10MB
 
-regserver.server.host=airavata.localhost
-regserver.server.port=8970
-credential.store.server.host=airavata.localhost
-credential.store.server.port=8960
+# Unified Airavata server (all services on single port)
+airavata.server.host=localhost
+airavata.server.port=8930
 
 server.port=8050
diff --git 
a/modules/research-framework/research-service/src/main/resources/application.yml
 
b/modules/research-framework/research-service/src/main/resources/application.yml
index 8fd8e27997..914a0e29f0 100644
--- 
a/modules/research-framework/research-service/src/main/resources/application.yml
+++ 
b/modules/research-framework/research-service/src/main/resources/application.yml
@@ -20,23 +20,23 @@ grpc:
 
 server:
   port: 18889
-  address: airavata.localhost
+  address: localhost
 
 airavata:
   research-hub:
-    url: http://airavata.localhost:20000
+    url: http://localhost:20000
     dev-user: "[email protected]"
     adminApiKey: "JUPYTER_ADMIN_API_KEY"
     limit: 10
   research-portal:
-    url: http://airavata.localhost:5173
-    dev-url: http://airavata.localhost:5173
+    url: http://localhost:5173
+    dev-url: http://localhost:5173
   openid:
-    url: "http://airavata.localhost:18080/realms/default";
+    url: "http://localhost:18080/realms/default";
   user-profile:
     server:
-      url: airavata.localhost
-      port: 8962
+      url: localhost
+      port: 8930
 
 spring:
   servlet:
@@ -44,7 +44,7 @@ spring:
       max-file-size: 200MB
       max-request-size: 200MB
   datasource:
-    url: "jdbc:mariadb://airavata.localhost:13306/airavata"
+    url: "jdbc:mariadb://localhost:13306/airavata"
     username: "airavata"
     password: "123456"
     driver-class-name: org.mariadb.jdbc.Driver
diff --git a/modules/restproxy/src/main/resources/application.properties 
b/modules/restproxy/src/main/resources/application.properties
index 6e58c85ea6..0ce150e047 100644
--- a/modules/restproxy/src/main/resources/application.properties
+++ b/modules/restproxy/src/main/resources/application.properties
@@ -1,2 +1,2 @@
-restproxy.broker.url=airavata.localhost:9092
-server.port=8082
\ No newline at end of file
+restproxy.broker.url=localhost:9092
+server.port=8082

Reply via email to