Hello Team,
My application is hosted on AEM as cloud service. For some functionality, I have created Adobe IO runtime project. Now, I want to consume content fragments from my Adobe IO runtime project.
Is there any way to consume ? even considering caching feature as well?
cc @arunpatidar @aanchal-sikka @AMANATH_ULLAH @AmitVishwakarma @sarav_prakash
Solved! Go to Solution.
Views
Replies
Total Likes
If you already have fixed paths of your content fragments, and they are very less likely to change or add new ones, you don't need to depend on events, you can fire aem api calls(rest or graphql) with those fixed CFs
But say if you have a folder with lot of sunflowers and cfs at each level, they subscribe to events is best option where in Adobe IO Runtime you can receive event and then store CFs paths and use it for API
@Mahesh_Gunaje To pull content from AEM into Adobe I/O Runtime, you can leverage the AEM Events feature, which allows you to send content updates or changes as events that can be captured by an Adobe I/O Runtime action, effectively pulling the latest content from AEM into your runtime environment whenever a modification occurs; this is typically achieved by setting up event subscriptions in the Adobe Developer Console and configuring a custom runtime action to process the received AEM events and retrieve the relevant content data.
As adobe io runtime is Javascript based on node.js runtime engine, you either pull content fragments via REST or GRAPHQL. Caching of this content will be maintained at dispatcher level and flushed upon replication.
Thanks @Shashi_Mulugu for your quick response. Much appreciated.
In my case,
1: I have created few content fragments. (Modification might be very very rare). Now, consider, I have created 10 content fragments.
2: After few days, from my Adobe IO runtime project, i wanted to consume the content fragment.
In this case, AEM events will help?
Regards
Mahesh
Views
Replies
Total Likes
If you already have fixed paths of your content fragments, and they are very less likely to change or add new ones, you don't need to depend on events, you can fire aem api calls(rest or graphql) with those fixed CFs
But say if you have a folder with lot of sunflowers and cfs at each level, they subscribe to events is best option where in Adobe IO Runtime you can receive event and then store CFs paths and use it for API
1: DAM path for the CF is fixed.
2: There will not be changes to CF data.
In this case, I think aem api calls(rest or graphql) is better.
Which is better in terms of
1: caching? rest call or graphQL?
2: For quick testing from my local system.
Thanks
Views
Replies
Total Likes
Rest call should be good.