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

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

commit 50f2a74e5e93098d5f07331e69d6c60b391456a5
Author: yasithdev <[email protected]>
AuthorDate: Wed Apr 1 13:15:33 2026 -0400

    feat: extract storage-service as independent Maven module
    
    Move storage service, config, and StorageProviderImpl to a new
    storage-service module. Model, repository, mapper, task, and util
    packages remain in airavata-api since they are referenced by
    compute and execution code. The StorageProviderImpl implements
    the StorageProvider SPI, delegating to existing repositories.
---
 airavata-api/storage-service/pom.xml               | 56 +++++++++++++++
 .../airavata/storage/StorageProviderImpl.java      | 79 ++++++++++++++++++++++
 .../storage/config/StorageConfiguration.java       |  0
 .../storage/service/AirvataFileService.java        |  0
 .../storage/service/DataProductService.java        |  0
 .../storage/service/ProcessDataManager.java        |  0
 .../storage/service/DataProductServiceTest.java    |  0
 airavata-server/pom.xml                            |  5 ++
 pom.xml                                            |  1 +
 9 files changed, 141 insertions(+)

diff --git a/airavata-api/storage-service/pom.xml 
b/airavata-api/storage-service/pom.xml
new file mode 100644
index 0000000000..08a6d26466
--- /dev/null
+++ b/airavata-api/storage-service/pom.xml
@@ -0,0 +1,56 @@
+<!--
+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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.airavata</groupId>
+        <artifactId>airavata</artifactId>
+        <version>0.21-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>storage-service</artifactId>
+    <name>Storage Service</name>
+    <description>Storage service implementation</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <!-- Spring (optional in airavata-api, needed here for 
@Component/@Service) -->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-autoconfigure</artifactId>
+            <optional>true</optional>
+        </dependency>
+    </dependencies>
+
+</project>
diff --git 
a/airavata-api/storage-service/src/main/java/org/apache/airavata/storage/StorageProviderImpl.java
 
b/airavata-api/storage-service/src/main/java/org/apache/airavata/storage/StorageProviderImpl.java
new file mode 100644
index 0000000000..73768d519e
--- /dev/null
+++ 
b/airavata-api/storage-service/src/main/java/org/apache/airavata/storage/StorageProviderImpl.java
@@ -0,0 +1,79 @@
+/**
+*
+* 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.
+*/
+package org.apache.airavata.storage;
+
+import java.util.List;
+import java.util.Map;
+import org.apache.airavata.compute.repository.GwyResourceProfileRepository;
+import 
org.apache.airavata.model.appcatalog.gatewayprofile.proto.StoragePreference;
+import 
org.apache.airavata.model.appcatalog.storageresource.proto.StorageResourceDescription;
+import org.apache.airavata.model.data.replica.proto.DataProductModel;
+import org.apache.airavata.storage.repository.DataProductRepository;
+import org.apache.airavata.storage.repository.StorageResourceRepository;
+import org.apache.airavata.storage.spi.StorageProvider;
+import org.springframework.stereotype.Component;
+
+@Component
+public class StorageProviderImpl implements StorageProvider {
+
+    private final StorageResourceRepository storageResourceRepository = new 
StorageResourceRepository();
+    private final DataProductRepository dataProductRepository = new 
DataProductRepository();
+    private final GwyResourceProfileRepository gwyResourceProfileRepository = 
new GwyResourceProfileRepository();
+
+    @Override
+    public StorageResourceDescription getStorageResource(String 
storageResourceId) throws Exception {
+        return storageResourceRepository.getStorageResource(storageResourceId);
+    }
+
+    @Override
+    public Map<String, String> getAllStorageResourceNames() throws Exception {
+        return storageResourceRepository.getAllStorageResourceIdList();
+    }
+
+    @Override
+    public String registerDataProduct(DataProductModel dataProductModel) 
throws Exception {
+        return dataProductRepository.registerDataProduct(dataProductModel);
+    }
+
+    @Override
+    public DataProductModel getDataProduct(String productUri) throws Exception 
{
+        return dataProductRepository.getDataProduct(productUri);
+    }
+
+    @Override
+    public DataProductModel getParentDataProduct(String productUri) throws 
Exception {
+        return dataProductRepository.getParentDataProduct(productUri);
+    }
+
+    @Override
+    public List<DataProductModel> getChildDataProducts(String productUri) 
throws Exception {
+        return dataProductRepository.getChildDataProducts(productUri);
+    }
+
+    @Override
+    public StoragePreference getGatewayStoragePreference(String gatewayId, 
String storageId) throws Exception {
+        return gwyResourceProfileRepository.getStoragePreference(gatewayId, 
storageId);
+    }
+
+    @Override
+    public List<StoragePreference> getAllGatewayStoragePreferences(String 
gatewayId) throws Exception {
+        return 
gwyResourceProfileRepository.getGatewayProfile(gatewayId).getStoragePreferencesList();
+    }
+}
diff --git 
a/airavata-api/src/main/java/org/apache/airavata/storage/config/StorageConfiguration.java
 
b/airavata-api/storage-service/src/main/java/org/apache/airavata/storage/config/StorageConfiguration.java
similarity index 100%
rename from 
airavata-api/src/main/java/org/apache/airavata/storage/config/StorageConfiguration.java
rename to 
airavata-api/storage-service/src/main/java/org/apache/airavata/storage/config/StorageConfiguration.java
diff --git 
a/airavata-api/src/main/java/org/apache/airavata/storage/service/AirvataFileService.java
 
b/airavata-api/storage-service/src/main/java/org/apache/airavata/storage/service/AirvataFileService.java
similarity index 100%
rename from 
airavata-api/src/main/java/org/apache/airavata/storage/service/AirvataFileService.java
rename to 
airavata-api/storage-service/src/main/java/org/apache/airavata/storage/service/AirvataFileService.java
diff --git 
a/airavata-api/src/main/java/org/apache/airavata/storage/service/DataProductService.java
 
b/airavata-api/storage-service/src/main/java/org/apache/airavata/storage/service/DataProductService.java
similarity index 100%
rename from 
airavata-api/src/main/java/org/apache/airavata/storage/service/DataProductService.java
rename to 
airavata-api/storage-service/src/main/java/org/apache/airavata/storage/service/DataProductService.java
diff --git 
a/airavata-api/src/main/java/org/apache/airavata/storage/service/ProcessDataManager.java
 
b/airavata-api/storage-service/src/main/java/org/apache/airavata/storage/service/ProcessDataManager.java
similarity index 100%
rename from 
airavata-api/src/main/java/org/apache/airavata/storage/service/ProcessDataManager.java
rename to 
airavata-api/storage-service/src/main/java/org/apache/airavata/storage/service/ProcessDataManager.java
diff --git 
a/airavata-api/src/test/java/org/apache/airavata/storage/service/DataProductServiceTest.java
 
b/airavata-api/storage-service/src/test/java/org/apache/airavata/storage/service/DataProductServiceTest.java
similarity index 100%
rename from 
airavata-api/src/test/java/org/apache/airavata/storage/service/DataProductServiceTest.java
rename to 
airavata-api/storage-service/src/test/java/org/apache/airavata/storage/service/DataProductServiceTest.java
diff --git a/airavata-server/pom.xml b/airavata-server/pom.xml
index 4ac965d5c0..e9d46425f7 100644
--- a/airavata-server/pom.xml
+++ b/airavata-server/pom.xml
@@ -68,6 +68,11 @@ under the License.
             <artifactId>research-service</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>storage-service</artifactId>
+            <version>${project.version}</version>
+        </dependency>
 
         <!-- Armeria gRPC -->
         <dependency>
diff --git a/pom.xml b/pom.xml
index 485f8aab2f..8ac070879b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -72,6 +72,7 @@ under the License.
         <module>airavata-api/agent-service</module>
         <module>airavata-api/research-service</module>
         <module>airavata-api/credential-service</module>
+        <module>airavata-api/storage-service</module>
         <module>airavata-server</module>
     </modules>
 

Reply via email to