Need Suggestions to implement custom API to expose assets and metadata for third Party Portal | Community
Skip to main content
Level 4
October 3, 2023
Solved

Need Suggestions to implement custom API to expose assets and metadata for third Party Portal

  • October 3, 2023
  • 3 replies
  • 1387 views

I have to create  one API which will provide dam assets [I am using dynamic media to expose assets] along with metadata to third party systems [assuming pagination will be there at both ends and will get max 50 assets in one call] . Let's say there is a huge load of concurrent users on a third party portal where my API is used , just want to know if anything needs to be done for caching or make my API optimized.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

Hi @an1-3 

Sitemap generator is one of the example where sitemap generator by scheduler. https://experienceleague.adobe.com/docs/experience-manager-learn/sites/seo/sitemaps.html?lang=en 

For memory cache you can use ACS Commons or guava cache https://www.linkedin.com/pulse/enhancing-aem-performance-http-cache-acs-commons-divanshu-goyal/  

3 replies

Level 4
October 3, 2023

Hi Anoop,

 

There are lot of things that you can keep in your mind while designing and developing your APIs. Some of the important once are

: CDN based caching (it will allow the data to load faster)

: Use of Load Balancing tool 

: Compress responses to reduce transfer time

: Abuse Prevention - The best way to avoid these problems is to implement a rate-limiting strategy. By measuring the number of transactions per second, per IP address, or token (if each client is authorized before accessing the API), you can cut off API clients that make excessive requests and prevent DDoS-like slowdowns from accidentals.

: Perform load test of APIs on tools such as  Jmeter, webLoad

: Code optimization

Here are some useful articles on the same:

https://prismic.io/blog/api-response-times

https://loadninja.com/articles/optimize-api-performance/

 

Dipti_Chauhan
Community Advisor
Community Advisor
October 3, 2023

Hi Anoop

   You will be serving meta data from publishers and binary from dynamic media?

 

Thanks

Dipti

An1-3Author
Level 4
October 3, 2023

Thanks Dipti !

Yes,  assets from Dynamic Media and Metadata from Publisher instance. 

 

Third party portal is looking

  1. API having dynamic media URL of assets along with metadata for render
  2. API to perform search operations on metadata
  3. Assets download API- This can be manageable either using dynamic media or AEM download service.

Looking for pointers to design in more optimized and performance oriented.

 

Note: User don't want to use asset share commons portal. 

arunpatidar
Community Advisor
Community Advisor
October 3, 2023

Hi @an1-3 
Addition to @poojac_2204 's response :

During off-peak hours, consider pre-generating responses and then caching them, either in memory cache or JCR, for complete sets of asset JSONs.

Arun Patidar
An1-3Author
Level 4
October 3, 2023

Thanks Arun ! Do you have any example which I can refer ?

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
October 4, 2023

Hi @an1-3 

Sitemap generator is one of the example where sitemap generator by scheduler. https://experienceleague.adobe.com/docs/experience-manager-learn/sites/seo/sitemaps.html?lang=en 

For memory cache you can use ACS Commons or guava cache https://www.linkedin.com/pulse/enhancing-aem-performance-http-cache-acs-commons-divanshu-goyal/  

Arun Patidar