cancel
Showing results for 
Search instead for 
Did you mean: 

CAP Runtime & database support

martin-kl
Explorer

Hello everyone, especially the CAP team,

we are currently getting started with a CAP project and after some tryouts we ran into some general questions regarding CAP:

Runtime

  • The first and most important question for us is: which runtime environment should we commit ourselves to?
    I went over quite some similar questions and the consensus seems to be "whatever the team is more comfortable with". That's why we started our prototype with Java but as we progressed, we noticed that most of the available information and examples are in Node.js. Furthermore, new features seem to be available for Node.js first (like the very new Hybrid testing or Streaming & Media types which were only available in Node.js earlier this year).
    Therefore, we are now thinking of changing to Node.js where Typescript would also be an option, but an early test showed that this is also not that straightforward to setup and use and there isn't much content available yet to help us (hoping that improves over the next months...).

Database support

  1. If we understand this correctly, Hana is the only supported database for productive use on the BTP?
  2. For our project, a Hana database would be more than overkill which is why I looked into the cds-pg and cds-dbm projects. On a first look at the CAP Database Support this adapter seems to only support the Node.js runtime. But after quite some trial and error and adaptions of various build and deployment steps, I finally managed to deploy a CAP Java application with the PostgreSQL, hyperscaler option (thanks to gregorw for the really helpful pg-beershop btw). For anyone interested: I had to remove the "cds" commands from the cds-maven-plugin, adapt the build of the service module in mta.yaml to use cds-dbm and use most of the db-deployer-apt from the beershop project. Most of this was caused by the fact that I could not fully customize the "cds cds" and therefore "cds build" tasks, which also entails that I could not use the cds-maven-plugin as intended since it only uses "cds" and cannot be changed to "cds-dbm". If we look at the current Readme of cds-dbm and the CAP Changelog it seems that this changed with cds@5.3.0 and we can now fully customize these tasks, including a change to use cds-dbm instead of cds, is this correct?
    Cause if I understand that correctly, we are then able to integrate this into the cds-maven-plugin and therefore get PostgreSQL support also for projects using the Java runtime. (unfortunately I could not test this yet as I have compatibility problems with @sap/cds >5.1.5 with postgres...)
  3. This gets us to another question: is a support for other databases planned? Or is it the current take that anyone should use HANA in production and Postgres is only possible via a community project without any official support (as it is the case now)?
    And what about MongoDB, where an out of the box support is marked as "in progress" for the Java runtime? That would be an interesting option but I cannot find any further information about this. Can you tell us something about it? Like is there a planned timeline for a release and does that entail that we may see new, non-Hana, DB offerings on the BTP or is this supposed to work with offerings directly from the hyperscalers?

Best regards
Martin

View Entire Topic
robinjayasinghe
Advisor
Advisor

BTW: at least for hybrid testing we now have basic support for the Java stack: please check or documentation for hybrid-testing. Deeper integration e.g. for better IDE support is possible and on the roadmap.