Where to save 3rd Party Nodes in the JCR, AEM 6.4+ | Adobe Higher Education
Skip to main content
July 28, 2020
解決済み

Where to save 3rd Party Nodes in the JCR, AEM 6.4+

  • July 28, 2020
  • 4 の返信
  • 1837 ビュー

Hello, I'm planning to write a schedular in AEM that calls an 3rd party api, then saves the data everyday at 2am. The data is then used to render pages. My Question, where in the JCR would I save these these nodes, what would the best practice JCR structure look like?

Is the /etc folder a good place to keep these nodes... as they are always being updated everyday at 2am?

The 200OK response JSON structure looks like this:

[ { "Name":"chevrolet chevelle malibu", "Miles_per_Gallon":18, "Cylinders":8, "Displacement":307, "Horsepower":130, "Weight_in_lbs":3504, "Acceleration":12, "Year":"1970-01-01", "Origin":"USA" }, { "Name":"buick skylark 320", "Miles_per_Gallon":15, "Cylinders":8, "Displacement":350, "Horsepower":165, "Weight_in_lbs":3693, "Acceleration":11.5, "Year":"1970-01-01", "Origin":"USA" }, { "Name":"plymouth satellite", "Miles_per_Gallon":18, "Cylinders":8, "Displacement":318, "Horsepower":150, "Weight_in_lbs":3436, "Acceleration":11, "Year":"1970-01-01", "Origin":"USA" }, { "Name":"amc rebel sst", "Miles_per_Gallon":16, "Cylinders":8, "Displacement":304, "Horsepower":150, "Weight_in_lbs":3433, "Acceleration":12, "Year":"1970-01-01", "Origin":"USA" } ]

 

このトピックへの返信は締め切られました。
ベストアンサー Kunal_Gaba_

My recommendation would be to store it under /content node only as this data represents content. AEM 6.4 onwards it is recommended to move all content nodes from /etc folder to /content folder. Any code under /etc should go to /apps or /libs folder.

This is important as per new AEM cloud as a service offering and for sustainable upgrades in future. The AEM cloud as a service offering leverages composite node store for seperating application state and code. All code should live under /apps and /libs and all content shared across multiple AEM instances should live under /content hierarchy only. This is essential for auto scaling AEM publish instances in the cloud.

 

This is what the doc says-

https://docs.adobe.com/content/help/en/experience-manager-65/deploying/restructuring/repository-restructuring.html

"To that end, beginning in AEM 6.4 and to be continued in future releases, content is being restructured out of /etc to other folders in the repository, along with guidelines on what content goes where, adhering to the following high-level rules:

  • AEM product code will always be placed in /libs, which must not be overwritten by custom code
  • Custom code should be placed in /apps, /content, and /conf"

4 の返信

Kunal_Gaba_
July 29, 2020

My recommendation would be to store it under /content node only as this data represents content. AEM 6.4 onwards it is recommended to move all content nodes from /etc folder to /content folder. Any code under /etc should go to /apps or /libs folder.

This is important as per new AEM cloud as a service offering and for sustainable upgrades in future. The AEM cloud as a service offering leverages composite node store for seperating application state and code. All code should live under /apps and /libs and all content shared across multiple AEM instances should live under /content hierarchy only. This is essential for auto scaling AEM publish instances in the cloud.

 

This is what the doc says-

https://docs.adobe.com/content/help/en/experience-manager-65/deploying/restructuring/repository-restructuring.html

"To that end, beginning in AEM 6.4 and to be continued in future releases, content is being restructured out of /etc to other folders in the repository, along with guidelines on what content goes where, adhering to the following high-level rules:

  • AEM product code will always be placed in /libs, which must not be overwritten by custom code
  • Custom code should be placed in /apps, /content, and /conf"
Shashi_Mulugu
Community Advisor
Community Advisor
July 29, 2020

@17378453 I would say it depends on what type of data it is and where are you using it. If data should not be available to outside world directly, I would not recommend it to be under /content instead you can store it under /var/ if you only using it for backend processing. 

Ankur_Khare
Community Advisor
Community Advisor
July 29, 2020

I would suggest to store the stuff under /content/dam<project>/json and not under etc.

VeenaVikraman
Community Advisor
Community Advisor
July 29, 2020

@17378453 I would say content should always be saved under /content.