cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Web-IDE Full Stack: how to handle configuration files

0 Kudos

In SAP Web-IDE Full Stack we need to handle configuration files, typically json, that stores information that may change during application lifetime. We're looking to the proper way to change this files and fetch them from application: at the moment we store them with in the Web-IDE project, so we need to re-deploy to CF the application for each modification in configuration files (but this cannot be the correct way, if the customer needs to change the configuration on his own).

Is there some kind of best practices to achieve this task?

michal_keidar
Active Contributor

Since this question does not necessarily related to Web IDE, I suggest to adjust the tags in order to reach more developers. Perhaps SAP Cloud Platform.

0 Kudos

Thanks for the note, I just updated the tags.

Accepted Solutions (0)

Answers (1)

Answers (1)

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Luca,

I would prefer storing application configuration on a database and expose them via rest service. Cloud systems tend to have no file system persistence - so it is not wise to rely on files to store your application configuration or any other data for that matter. When you use a backend as configuration repository you are centralizing everything with the ability to keep separate configurations based on roles or users.

There are other ways of storing configuration, such as Spring Cloud Config or Redis Backing Service. However, I find those to be targeting different means of storing application data.

Best regards,
Ivan

0 Kudos

Ivan,

thanks for the response.

Storing the configuration on a database could be a good solution, but I wonder if SAP itself provides a sort of out-of-the-box service to achieve this task, for application created through Web-IDE Full Stack and other tools.

Best regards,

Luca

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Luca,

AFAIK there is no service in the platform that is made to handle just what you're seeking.

On the other hand there are several viable options that you could use.

I believe you could use any JavaScript library that implements the Git protocol and interact with a Git repository to sync the configuration file for your application. SAP Cloud Platform - Neo has such repository - so you could store such files there if you wish to avoid public services.

On the HTML5 application you will find the manifest file which can be freely incremented to include information for your application (in JSON format) and you could retrieve it using standard sapui5 commands during runtime. But I suspect this is not what you are looking for since it doesn't allow you to store/change the data stored in it.

Database technologies such as Redis, PostgreSQL, HANA HDI, etc, are all part of SAP Cloud Platform - Cloud Foundry. So you can already use them as indicated here.

Another option, already mentioned here is the use of Spring Cloud Configuration server - which you could investigate a little further by reading this blog.

Regards,
Ivan