This blog gives a brief outline on how to build a single code-line multi cloud application consuming Object Store Service of SAP Business Teachnology Platform (SAP BTP), Cloud Foundry Environment
What is Object Store Service?
Object Store service enables the storage and management of objects, which involves creation, upload, download, and deletion of objects. SAP provides Object Store Service on its SAP BTP running on different IaaS providers like Amazon Web Service, Azure, Google Cloud Platform. Please click here for more information on Object Store Service.
Though the object store service is provided on multiple IaaS providers, the way to connect to and use the service varies for each IaaS provider due to changes in the structure of credentials and in the configurations . Writing a single code-line application that works seamlessly on all these IaaS providers is a challenge that many developers face.
We had developed a single code line reference application that can work with Object Store Service on SAP BTP hosted on multiple IaaS providers . This application perform operations like upload, download, delete and list of files. It is a spring boot application that uses Apache jclouds library which provides a multi-cloud toolkit that gives a developer the freedom to create applications that are portable across IaaS providers.
Architecture diagram of the application
A single REST controller accepts the request (GET, POST, DELETE).
Separate service implementations, configuration classes are provided for each of the Object Store Service provider. The right implementation, configuration is loaded by spring boot based on the IaaS provider that the application is deployed on.
A single DAO (Data Access Object)/ repository class calls the jclouds API’s to perform upload, download, delete operations on the Object Store.
Source code and Tutorial
The source code and documentation of application is available on Github.
A detailed tutorial with steps on how to create such an application is also available.
Hope you will find the code and tutorial useful. Do post in your comments and feedback.