best way to increase performance | Community
Skip to main content
harsha__
Level 2
June 12, 2017
Solved

best way to increase performance

  • June 12, 2017
  • 15 replies
  • 4281 views

What is the best Way to increase performance in AEM?

I need to call restful services from AEM frequently. I am planning to save the frequently getting response in javax.servlet.http.HttpSession(from request) or Cookie. But confused of which aproach to follow. Need some assistance from who have implemented either in their production systems.

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 Feike_Visser1

Also remember AEM is stateless, so there is no session-failover.

15 replies

harsha__
harsha__Author
Level 2
June 13, 2017

smacdonald2008 Thanks for your answer. But I am ok with Restful calling and getting the response code part.

I am looking to save the response in Session or Cookie to avoid hitting the restfull service frequently. but confused about which one to prefer for storing Response, such as should I use Session setattribute to save the respoIse or should i use cookies in browsers to save the response?

rodolfoe6195251
Level 2
June 13, 2017

If needed you can also cache the response from the rest calls on the backend for example using Guava Cache

smacdonald2008
Level 10
June 13, 2017

AEM sessions are not like J2EE sessions. There are Sessions to the JCR. I would not try to store data there.

In AEM - why use Cookies? If you want to store data from a Restful service - i recommend storing the data in the JCR.

harsha__
harsha__Author
Level 2
June 18, 2017

As per our client he wants all the data to be stored used Restful service and not in Jcr.. but for temporary use I am using cookies to store data. I see cookies and Guava Cache has advantages over javax.servlet.http.HttpSession(from request) storage. So will be implementing them. smacdonald2008​ Thank you

harsha__
harsha__Author
Level 2
June 18, 2017

Thanks rodolfoe61952519 for your suggestion. it seems like a best choice