-
Notifications
You must be signed in to change notification settings - Fork 138
Microservices: shared-db for java #2142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
guides/deployment/microservices.md
Outdated
| ``` | ||
| ::: | ||
|
|
||
| <div class="impl node"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there nothing similar for Java?
| git submodule add https://github.com/capire/common-java | ||
| git submodule add https://github.com/capire/bookshop-java | ||
| git submodule add https://github.com/capire/data-viewer-java | ||
| git submodule update --init |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When will those be available? Asking to make sure we don't merge this PR before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a supportive code review enhanced by AI assistance. These suggestions offer potential improvements and insights to consider, though they're recommendations rather than requirements. You have full control over which feedback to implement based on your project's needs and goals. The AI analysis is here to complement your expertise and help streamline your development process.
Model: claude-sonnet-4-20250514 | Prompt Tokens: 5859 | Completion Tokens: 574
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a collaborative code review enhanced by AI assistance. These suggestions offer potential improvements and insights to consider, though they're recommendations rather than requirements. You have full creative control over your code—AI simply provides additional perspective to support your decision-making process. Use whatever feels valuable and aligns with your project goals.
Model: claude-sonnet-4-20250514 | Prompt Tokens: 5860 | Completion Tokens: 893
guides/deployment/microservices.md
Outdated
| ``` | ||
| > The outcome of this looks and behaves exactly as the monorepo layout in *[cap/samples](https://github.com/capire/samples)*, so we can exercise the subsequent steps in there... | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the extra blank line to maintain consistent spacing.
| > The outcome of this looks and behaves exactly as the monorepo layout in *[cap/samples](https://github.com/capire/samples)*, so we can exercise the subsequent steps in there... | ||
|
|
||
| 3. Test-drive locally: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a blank line before the numbered list item for better readability and consistency with markdown formatting.
| ::: | ||
|
|
||
| Each microservice can be started independently. If you start each microservice, one after the other in a different terminal, the connection is already established. | ||
| In Node.js, each microservice can be started independently. If you start each microservice, one after the other in a different terminal, the connection is already established. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace "In Node.js," with "For Node.js," to maintain consistency with the Java section that follows and improve clarity.
guides/deployment/microservices.md
Outdated
| [@capire/samples](https://github.com/capire/samples#readme) already has an all-in-one deployment implemented. Similar steps are necessary to convert projects with multiple CAP applications into a shared database deployment. | ||
| For Node.js, [@capire/samples](https://github.com/capire/samples#readme) already has an all-in-one deployment implemented. Similar steps are necessary to convert projects with multiple CAP applications into a shared database deployment. | ||
|
|
||
| <font color=red size=+2>TODO</font> For CAP Java, [@capire/samples-java](https://github.com/capire/samples-java#readme) already has an all-in-one deployment implemented. Similar steps are necessary to convert projects with multiple CAP applications into a shared database deployment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the HTML font tag and replace with proper markdown formatting. Use a standard note or warning format instead:
::: warning TODO
For CAP Java, [@capire/samples-java](https://github.com/capire/samples-java#readme) already has an all-in-one deployment implemented. Similar steps are necessary to convert projects with multiple CAP applications into a shared database deployment.
:::| ::: | ||
|
|
||
| Add build commands for each module to be deployed: | ||
| In Node.js, add build commands for each module to be prepared for deployment: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change "In Node.js, add" to "For Node.js, add" to maintain consistency with the terminology used throughout the document.
|
|
||
| The messaging service is used to organize asynchronous communication between the CAP services. | ||
|
|
||
| #### In Node.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add "For" before "Node.js" to maintain consistency with other section headings in the document.
|
|
||
| ::: | ||
|
|
||
| #### In CAP Java |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change "In CAP Java" to "For CAP Java" to maintain consistency with the Node.js section heading format.
| { | ||
| "version": "1.1.0", | ||
| "emname": "samples-emname", // [!code --] | ||
| "version": "1.1.0", | ||
| "namespace": "default/samples/1", // [!code --] | ||
| "options": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the duplicate "version" property and the commented-out lines to clean up the JSON example:
{
"version": "1.1.0",
"options": {
"management": true,
"messagingrest": true,
"messaging": true
},
guides/deployment/microservices.md
Outdated
| ``` | ||
| ::: | ||
|
|
||
| Add messaging resource in mta.yaml with parametrized `emname` and `namespace` properties: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change "Add messaging resource" to "Add a messaging resource" for proper grammar.
guides/deployment/microservices.md
Outdated
|
|
||
| ::: details CAP Java: Configure each app for cloud readiness | ||
|
|
||
| To access remote OData services, you need to add a dependency to the *cds-feature-remote-odata* [application plugin](https://cap.cloud.sap/docs/java/developing-applications/building#standard-modules) and provide the latest available version. Additionally, to retrieve destination configurations using the destination service, you must include a *com.sap.cloud.sdk.cloudplatform* dependency with artifact ID *scp-cf*, as described in the following steps: [Cloud SDK Integration](https://cap.cloud.sap/docs/java/cqn-services/remote-services#cloud-sdk-dependencies). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change "To access remote OData services, you need to add a dependency" to "To access remote OData services, add a dependency" to use active voice and present tense as per the guidelines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a supportive code review enhanced by AI assistance. These insights offer suggestions and observations that may help guide your development process. Please consider them as recommendations rather than definitive requirements. Your expertise and judgment remain the most important factors in making decisions about your code. The AI analysis is simply here to provide additional perspective and support your work.
Model: claude-sonnet-4-20250514 | Prompt Tokens: 5860 | Completion Tokens: 620
guides/deployment/microservices.md
Outdated
| ``` | ||
| > The outcome of this looks and behaves exactly as the monorepo layout in *[cap/samples](https://github.com/capire/samples)*, so we can exercise the subsequent steps in there... | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the extra blank line to maintain consistent spacing.
| > The outcome of this looks and behaves exactly as the monorepo layout in *[cap/samples](https://github.com/capire/samples)*, so we can exercise the subsequent steps in there... | ||
|
|
||
| 3. Test-drive locally: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a blank line before the numbered list item for better readability and consistency with markdown formatting.
guides/deployment/microservices.md
Outdated
| [@capire/samples](https://github.com/capire/samples#readme) already has an all-in-one deployment implemented. Similar steps are necessary to convert projects with multiple CAP applications into a shared database deployment. | ||
| For Node.js, [@capire/samples](https://github.com/capire/samples#readme) already has an all-in-one deployment implemented. Similar steps are necessary to convert projects with multiple CAP applications into a shared database deployment. | ||
|
|
||
| <font color=red size=+2>TODO</font> For CAP Java, [@capire/samples-java](https://github.com/capire/samples-java#readme) already has an all-in-one deployment implemented. Similar steps are necessary to convert projects with multiple CAP applications into a shared database deployment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace the TODO placeholder with proper documentation or remove it if not ready for publication. The red font styling is inappropriate for technical documentation.
| ``` | ||
| ::: | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the extra blank line to maintain consistent spacing.
| npm i @cap-js/hana --workspace reviews | ||
| ``` | ||
|
|
||
| ::: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a blank line after the details block for better readability.
|
|
||
| For each project add the **cds-starter-cloudfoundry** [starter bundle](https://cap.cloud.sap/docs/java/developing-applications/building#starter-bundles). | ||
|
|
||
| ::: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the extra blank line to maintain consistent spacing.
| Note that we use the *--ws-pack* option for some modules. It's important for node modules referencing other repository-local node modules. | ||
| ::: | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the extra blank line to maintain consistent spacing.
| "version": "1.1.0", | ||
| "emname": "samples-emname", // [!code --] | ||
| "version": "1.1.0", | ||
| "namespace": "default/samples/1", // [!code --] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a duplicate "version": "1.1.0", line. Remove one of them to fix the JSON syntax error.
| </dependency> | ||
| ... | ||
| ``` | ||
| ::: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a blank line after the details block for better readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a supportive code review enhanced by AI assistance. These suggestions offer potential improvements and insights to consider, though they're recommendations rather than requirements. You have full control over which feedback to implement based on your project's specific needs and goals. The AI analysis is here to complement your expertise and help streamline your development process.
Model: claude-sonnet-4-20250514 | Prompt Tokens: 5830 | Completion Tokens: 706
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a collaborative code review enhanced by AI assistance. These insights offer suggestions and patterns we've identified, though your expertise and judgment remain essential. Consider these recommendations as starting points for discussion rather than definitive solutions. You know your project best, so please adapt any suggestions to fit your specific needs and goals. We're here to support your development process.
Model: claude-sonnet-4-20250514 | Prompt Tokens: 5819 | Completion Tokens: 1015
| echo "{\"name\":\"@capire/samples\",\"workspaces\":[\"*\"]}" > package.json | ||
| ``` | ||
|
|
||
| 2. Add the previously mentioned projects as `git` submodules: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider improving clarity by specifying what "previously mentioned projects" refers to. Since this appears to be step 2, it would be helpful to reference step 1 or provide more context.
Suggestion:
2. Add the projects mentioned in step 1 as `git` submodules:| ::: | ||
|
|
||
| Each microservice can be started independently. If you start each microservice, one after the other in a different terminal, the connection is already established. | ||
| In Node.js, each microservice can be started independently. If you start each microservice, one after the other in a different terminal, the connection is already established. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sentence structure can be improved for better clarity and flow.
Suggestion:
In Node.js, you can start each microservice independently. When you start each microservice one after the other in different terminals, the connection is already established.| For Node.js, [@capire/samples](https://github.com/capire/samples#readme) already has an all-in-one deployment implemented. Similar steps are necessary to convert projects with multiple CAP applications into a shared database deployment. | ||
|
|
||
| For CAP Java, [@capire/samples-java](https://github.com/capire/samples-java#readme) already has an all-in-one deployment implemented. Similar steps are necessary to convert projects with multiple CAP applications into a shared database deployment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider improving the sentence structure for better readability and consistency.
Suggestion:
For Node.js, [@capire/samples](https://github.com/capire/samples#readme) already has an all-in-one deployment implemented. You need similar steps to convert projects with multiple CAP applications into a shared database deployment.
For CAP Java, [@capire/samples-java](https://github.com/capire/samples-java#readme) already has an all-in-one deployment implemented. You need similar steps to convert projects with multiple CAP applications into a shared database deployment.| ::: | ||
|
|
||
| Add build commands for each module to be deployed: | ||
| In Node.js, add build commands for each module to be prepared for deployment: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sentence structure can be improved for better clarity and to use active voice.
Suggestion:
In Node.js, add build commands for each module to prepare it for deployment:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a collaborative code review enhanced by AI assistance. These suggestions offer potential improvements and insights to consider, though they're recommendations rather than requirements. You have full creative control over your code—AI simply provides additional perspective to support your decision-making process. Use whatever feels valuable and aligns with your project goals.
Model: claude-sonnet-4-20250514 | Prompt Tokens: 5828 | Completion Tokens: 587
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a collaborative code review enhanced by AI assistance. These suggestions offer potential improvements and insights to consider, though they're recommendations rather than requirements. You have full creative control over your code—AI simply provides additional perspective to support your decision-making process. Use whatever feels valuable and aligns with your project goals.
Model: claude-sonnet-4-20250514 | Prompt Tokens: 5824 | Completion Tokens: 929
| gen | ||
| ``` | ||
| > The outcome of this looks and behaves exactly as the monorepo layout in *[cap/samples](https://github.com/capire/samples)*, so we can exercise the subsequent steps in there... | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the extra blank line to maintain consistent spacing throughout the document.
| 3. Test-drive locally: | ||
| ```sh | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a blank line after step 3 for consistent formatting with other numbered steps in the document.
| ::: | ||
|
|
||
| Each microservice can be started independently. If you start each microservice, one after the other in a different terminal, the connection is already established. | ||
| In Node.js, each microservice can be started independently. If you start each microservice, one after the other in a different terminal, the connection is already established. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sentence structure can be improved for clarity. Consider revising to: "In Node.js, you can start each microservice independently. When you start each microservice one after the other in different terminals, the connection is automatically established."
| ``` | ||
| ::: | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the extra blank line to maintain consistent spacing.
| Note that we use the *--ws-pack* option for some modules. It's important for node modules referencing other repository-local node modules. | ||
| ::: | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the extra blank line to maintain consistent spacing.
| ::: | ||
|
|
||
| ::: details Configure each app for cloud readiness | ||
| ::: details Node.js: Configure each app for cloud readiness |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a blank line after the :::details directive for consistency with other sections.
|
|
||
| ::: | ||
|
|
||
| #### In CAP Java |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a blank line after this heading for consistency with the Node.js section above.
| ``` | ||
| ::: | ||
|
|
||
| ::: details CAP Java: Configure each app for cloud readiness |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a blank line after the :::details directive for consistency with other sections.
| ... | ||
| ``` | ||
|
|
||
| ::: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a blank line after this line for consistency with other sections.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a supportive code review enhanced by AI assistance. These observations offer helpful suggestions and insights, though some are AI-generated predictions rather than definitive conclusions. Please consider what feels most valuable for your project. You remain the expert decision-maker—AI simply provides additional perspective to support your development process.
Model: claude-sonnet-4-20250514 | Prompt Tokens: 5821 | Completion Tokens: 588
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a supportive code review enhanced by AI assistance. These insights offer suggestions and possibilities rather than definitive answers, so please take what resonates with your approach. You remain the expert and decision-maker—AI simply provides additional perspective to complement your expertise and help explore potential improvements.
Model: claude-sonnet-4-20250514 | Prompt Tokens: 5823 | Completion Tokens: 655
| ::: code-group | ||
| ```sh [Node.js] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a brief explanation of what code groups are and why they're being used here to help readers understand the new structure.
| gen | ||
| ``` | ||
| > The outcome of this looks and behaves exactly as the monorepo layout in *[cap/samples](https://github.com/capire/samples)*, so we can exercise the subsequent steps in there... | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the extra blank line to maintain consistent spacing throughout the document.
| 3. Test-drive locally: | ||
| ```sh | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a blank line after step 3 for better readability and consistency with the document structure.
| ::: | ||
|
|
||
| Each microservice can be started independently. If you start each microservice, one after the other in a different terminal, the connection is already established. | ||
| In Node.js, each microservice can be started independently. If you start each microservice, one after the other in a different terminal, the connection is already established. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sentence structure is awkward. Consider revising to: "In Node.js, you can start each microservice independently. When you start each microservice one after the other in different terminals, the connection is automatically established."
| ``` | ||
| ::: | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the extra blank line to maintain consistent spacing.
| npm i @cap-js/hana --workspace reviews | ||
| ``` | ||
|
|
||
| ::: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a blank line after the closing ::: for better visual separation between sections.
| ::: | ||
|
|
||
| Add build commands for each module to be deployed: | ||
| In Node.js, add build commands for each module to be prepared for deployment: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sentence is unclear and uses passive voice. Consider revising to: "Add build commands to prepare each module for deployment:"
| Note that we use the *--ws-pack* option for some modules. It's important for node modules referencing other repository-local node modules. | ||
| ::: | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the extra blank line to maintain consistent spacing.
| ... | ||
| ``` | ||
|
|
||
| ::: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a blank line after the closing ::: for better visual separation between sections.


No description provided.