Expand my Community achievements bar.

SOLVED

Concern - Data Store and AEM DAM Implementation for large sized images

Avatar

Level 10

Hello,

 I read in AEM documentation, ", if you store a 300KB JPG image in your repository somewhere, the JPG contents, being above the threshold size (4096 bytes, by default), will be stored in the datastore, and it will be placed into file with just the contents of that one JPG image, with no encoding or obfuscation. If you were to find the individual file, it will be the JPG image."

1. If the contents of the jpg file is stored in the data store, how exactly is the image component picking up the binary data of that image/asset while rendering?

I notice, that by default the image component looks for the binary data in the jcr:data of the original file.

2. If the contents are stored in the data store then what does aem store in the  jcr:data of the original file.?

Please let me know

Regards,

NZ

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi,

The DataStore is an implementation detail. Whether a particular binary property is stored in the DataStore or not is not something your application needs to be concerned about as it is all handled at the low-level repository level, i.e. well below the point where the image component or any other component is executing.

Regards,

Justin

View solution in original post

5 Replies

Avatar

Correct answer by
Employee

Hi,

The DataStore is an implementation detail. Whether a particular binary property is stored in the DataStore or not is not something your application needs to be concerned about as it is all handled at the low-level repository level, i.e. well below the point where the image component or any other component is executing.

Regards,

Justin

Avatar

Level 10

justin_at_adobe wrote...

Hi,

The DataStore is an implementation detail. Whether a particular binary property is stored in the DataStore or not is not something your application needs to be concerned about as it is all handled at the low-level repository level, i.e. well below the point where the image component or any other component is executing.

Regards,

Justin

 

Regarding  performance, i plan on having assets stored at some location in another environment, I would get it into AEM(by uploading), generate renditions, metadata and then delete the binary data , and have it referenced to an external url where the binary data is stored.

I came to a point where i could upload the asset and generate metadata and renditions along with setting a url property to reference the asset from a remote location, but when i wanted to delete the jcr:data, it threw an error that was a mandatory property and cannot be null,

so i was wondering if i could get an approach just the way aem stores binary data elsewhere but references in  AEM(say the image component) so that i could work along similar lines to implement above use case

 

In addition to that , if the binary data is stored in the data store,  what gets stored in the jcr:data of the original file?

Avatar

Employee

You should not try to manually inject binary data into the DataStore nor should you try to manually remove data from the DataStore. As I said, it is an implementation detail of the repository.

From your application's perspective, a binary property is just a stream of bits. You don't know that it comes from the DataStore or the TarPM.

Avatar

Level 10

justin_at_adobe wrote...

You should not try to manually inject binary data into the DataStore nor should you try to manually remove data from the DataStore. As I said, it is an implementation detail of the repository.

From your application's perspective, a binary property is just a stream of bits. You don't know that it comes from the DataStore or the TarPM.

 

Thank you Justin, but I a, not trying to manipulate anything with the data store i am trying to understand the implementation, so that i could have assets in AEM DAM with renditions and metadata and a reference to the asset's binary data but without any binary data stored in AEM, just the way data store operates.

That is why i am trying to understand the flow.