Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Can anyone please explain about the below note on AEM cloud?

Prince_Shivhare
Community Advisor
Community Advisor

I know about this Article - Apart from this if any other information.

https://medium.com/adobetech/introduction-to-aem-as-a-cloud-service-asset-upload-http-api-fc560ffd72...

No Reverse Replication Agents

Reverse replication from Publish to Author is not supported in AEM as a Cloud Service. If such a strategy is needed, you can use an external persistence store that is shared amongst the farm of Publish instances and potentially the Author cluster.

 

Capture.PNG

1 Accepted Solution
markus_bulla_adobe
Correct answer by
Employee
Employee

Hi @Prince_Shivhare!

Your post refers to two different topics for AEM as a Cloud Service (AEMaCS):

  1. Reverse Replication (referenced in your quote)
  2. Processing and streaming of assets (referenced in the screenshot and the article)

IMO, these are not or at least very loosely connected

 

Reverse Replication

AEMaCS does not provide Reverse Replication of content as it has been known from AEM 6.5 (and earlier). The feature was mainly used for user generated content (UGC), e. g. comments, posts, ratings that your end users could leave at your website. This content would then be replicated from the publish instance where it was initially created back to the authoring instance and re-distributed to all publish instances in place (potentially running through a moderation process on the author side before being distributed).

This practice is no longer supported for AEMaCS. If you need to store user generated content (or have similar use case) the recommendation for AEMaCS is to use a dedicated, shared storage (e. g. external database) or leverage alternative integration patterns (e. g. client-side integration of external services).

 

Processing and streaming of assets

The process of asset handling has changed quite a bit for AEMaCS compared to non-cloud AEM setups. Asset processing is now being handled by the Asset Compute Microservice and assets are stored in a binary cloud storage that has a dedicated content delivery network (CDN). For non-cloud AEM, assets are processed within the AEM instance and delivered from there (unless you have Dynamic Media in place for asset delivery). For AEMaCS this comes with a changed pattern of how you can (and should) access asset binaries in your code (as mentioned in the development guidelines in your screenshot).

 

Did this answer your question?

If not, please add some details on what information you are looking for.

 

Hope that helps!

View solution in original post

9 Replies
markus_bulla_adobe
Correct answer by
Employee
Employee

Hi @Prince_Shivhare!

Your post refers to two different topics for AEM as a Cloud Service (AEMaCS):

  1. Reverse Replication (referenced in your quote)
  2. Processing and streaming of assets (referenced in the screenshot and the article)

IMO, these are not or at least very loosely connected

 

Reverse Replication

AEMaCS does not provide Reverse Replication of content as it has been known from AEM 6.5 (and earlier). The feature was mainly used for user generated content (UGC), e. g. comments, posts, ratings that your end users could leave at your website. This content would then be replicated from the publish instance where it was initially created back to the authoring instance and re-distributed to all publish instances in place (potentially running through a moderation process on the author side before being distributed).

This practice is no longer supported for AEMaCS. If you need to store user generated content (or have similar use case) the recommendation for AEMaCS is to use a dedicated, shared storage (e. g. external database) or leverage alternative integration patterns (e. g. client-side integration of external services).

 

Processing and streaming of assets

The process of asset handling has changed quite a bit for AEMaCS compared to non-cloud AEM setups. Asset processing is now being handled by the Asset Compute Microservice and assets are stored in a binary cloud storage that has a dedicated content delivery network (CDN). For non-cloud AEM, assets are processed within the AEM instance and delivered from there (unless you have Dynamic Media in place for asset delivery). For AEMaCS this comes with a changed pattern of how you can (and should) access asset binaries in your code (as mentioned in the development guidelines in your screenshot).

 

Did this answer your question?

If not, please add some details on what information you are looking for.

 

Hope that helps!

View solution in original post

Prince_Shivhare
Community Advisor
Community Advisor

Hello Markus,
Thanks for your reply.
sorry for the wrong content but the screenshot was correct. so I got your comment that we should not stream the binary.
So I will explain my issue, I am using bazaarvoice in my application for product ratings & reviews.
We are trying to integrate the AEM cloud with the SFTP server. where we can send and get the file from the SFTP server. now once we have those files into AEM, we are using the node jcr:data to read the content which requires the below code.
So can we use this in AEM as a cloud service? like doing getBinary().getStream().
we are keeping reviews and rating files under the /etc and using system users to read. additionally, we are also keeping a backup of 14 days for the files.
Can you please help me here?

Node fileNameNode = jcrsession.getNode(filePath + "/jcr:content/renditions/original");
Node contentNode = fileNameNode.getNode("jcr:content");
inputstream = contentNode.getProperty("jcr:data").getBinary().getStream();

 

markus_bulla_adobe
Employee
Employee

Hi @Prince_Shivhare!
Unfortunately, I’m not familiar with that specific tool and don’t know how it works or is integrated. The files that you are exchanging through SFTP, are these data files that contain the generated content (UGC)? Where would that content be created in the first place (in AEM or on the service providers side)? Why would it be exchanged? What’s the purpose of that SFTP? 


A couple of remarks from my side, though: 


  • Storing this kind of data under the /etc hierarchy in the repository sounds inappropriate to me. Reviews and ratings are clearly user generated content and thus should be stored below /content (probably /content/ugc or similar). If you are importing this kind of content to AEM, I would also suggest to not store plain files in AEM but map the contents of these files to nodes in the content tree on import.
  • To me your outlined solution sounds like you are already implementing a dedicated, shared storage for UGC: your SFTP server. Is my understanding correct? This sounds a bit unconventional to me. I wouldn’t be sure about the implications, tbh.
  • If you store the files inside the JCR repository, you should be able to retrieve the content via getBinary().getStream() as long as the file is actually present in the repository. This may be the case for you because it does not sound like you are actually working with files that fall under the definition of “assets” that would be handled by the Asset Compute Microservice. The advice from the developer guidelines refers to the fact that processed assets may be hosted on the binary cloud storage, thus getting the stream through that API may fail. This should (as to my knowledge) not be the case for other types of “plain” files, although I’m not sure about that because I haven't had that case yet.

I’m sorry, but it’s a bit hard to give clear recommendations based on a quite limited picture of the solution.
I hope this input helps you anyways.

shelly-goel
Community Advisor
Community Advisor
@markus_bulla_adobe - On Similar lines of UGC and reverse replication, I would like to understand why can't we leverage Sling Content Distribution's reverse replication and sync distribution to sync between all publishers?
Prince_Shivhare
Community Advisor
Community Advisor

Hello Markus,

You have provided a detailed explanation and that is really helpful to me. we can change the location to /etc to /content. that won't be a big problem for us. so as per your comment on stream, we can read the jcr:data by doing .getStream right?

As per your questions -

1. are these data files that contain the generated content (UGC)?

Ans - Yes, data is generating dynamically on basis on jcr content node. we are collecting a data from content nodes and creating a xml. and once it is creatted we are sending it to the SFTP server for further implementation for bazaarvoice team.

2. Where would that content be created in the first place (in AEM or on the service providers side)?

Ans - From AEM TO SFTP - Content would be created first at AEM side. FROM SFTP to AEM - Content would be created first at Bazaarvoice side. FYI - Both are different files.

3. Why would it be exchanged?

Ans - AEM to SFTP - If there is any product has been created in AEM so we need to updated the same to Bazaarvoice team which we do it by creating a xml and sending it to SFTP server. SFTP to AEM - If there is any ratings added on the product by end user, then Bazaarvoice team approves it and add keep it on SFTP server. then later on it is reading into AEM.

4. What’s the purpose of that SFTP?

Ans - SFTP is used to keep the files on server level. which is secured platform having credentials to login and different environments like stage and prod.

Reviews and Ratings are totally handled by Bazaarvoice team. it's totally a 3rd party work that is why we have not created it as a jcr data.

Thanks,

Prince

markus_bulla_adobe
Employee
Employee

Thanks for sharign the insights, @Prince_Shivhare. So I learned something new about this 3rd party solution today as well. 🙂

@shelly-goel: Unfortunately, I have no insights into the reasoning behind this decision. Sorry!

Prince_Shivhare
Community Advisor
Community Advisor
Thanks Markus, so based on given scenarios we can still use the .getBinary.getStream() right?
shelly-goel
Community Advisor
Community Advisor

@Prince_Shivhare - Thanks for sharing the UGC approach. I needed few details: 1. When you're capturing the user rating, are you saving it in AEM publisher by any chance or directly sending it to bazaarvoice in the client code? If you'll capture it in AEM publisher, means you would send it to bazaarvoice from server and then receive it back via SFTP after approval. 2. Once you receive the approved rating, is it captured AEM author or publisher or both - is it on a scheduled basis using a scheduler?

Prince_Shivhare
Community Advisor
Community Advisor

@shelly-goel 
1. When you're capturing the user rating, are you saving it in AEM publisher by any chance or directly sending it to bazaarvoice in the client code? If you'll capture it in AEM publisher, means you would send it to bazaarvoice from server and then receive it back via SFTP after approval.
- Yes, We are saving it to the author and then sending it to the publisher by replicating it by code.
2. Once you receive the approved rating, is it captured AEM author or publisher or both - is it on a scheduled basis using a scheduler?

- yes, we are capturing on Author and replicating it to the publisher and all the task is included in scheduler only.