Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
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.

Happy coding!

 

 
10 Comments
Shilpakrishna
Participant
0 Kudos
Hi Indu,

We have various other services to manage unstructured content like Document Service, SAP Document Center , Object Store. HANA on Cloud Foundry/SCP itself can store BLOB objects. How do i map between services and scenarios? What Use-case does each service solve that can't be solved by the other?

Thanks
0 Kudos
Cool blog... thanks for sharing
manjunath_b
Advisor
Advisor
0 Kudos
Thanks for the very pertinent question, Shilpa. Based on your question, we are planning to put out some information on the community in the coming weeks. I will update you once this is available.

But in general, each of these services has a niche place on the platform for which it would be the right fit. More details soon.
Shilpakrishna
Participant
0 Kudos
Thank you Manjunath. Waiting for the comparison blog!

 
vijai_mohan2
Explorer
0 Kudos
Hello,

Thanks for the blog.

My question is: Is it possible to create folder structures under the object store? My requirement is I need to have folders segregated and place right content under the right folders. Also to make it easy to access, is there any standard UI tool like file explorer available to browse through whats available in my object store?
Roopa_N
Advisor
Advisor
0 Kudos
Hi indu.sankar ,

 

Thank you for such a great blog.

How will this work in a Multitenancy mode?

 
Hi  Roopa,

 

Thank you.

There is no dedicated documentation for multi-tenancy with ObjectStore. However, you can create a bucket for each tenant on your side.
Roopa_N
Advisor
Advisor
0 Kudos
Okay, thank you Indu
arjun_thakur
Active Contributor
0 Kudos

Hi Indu,

Per my understanding, when the service instance for Object Store on AWS is created, an AWS S3 bucket is created and the same bucket is used to store the files.

So, if we run in this in multi tenant mode, then the service instance will be created in provider's subaccount only and not on consumer's sub-account. Hence there will only be a single bucket getting created.

Can you please advise how can we create a different bucket for each tenant in a multi-tenant mode.

Regards,

Arjun

0 Kudos
Hi Arjun,

 

You will have to create objectstore instance per tenant. To create that in runtime you can refer to - serviceManager documentation.

 

Regards,

Indu