11
votes

The way I am using Magento is like this:

  • We are using Magento admin/dashboard to setup store, catalog and related stuff
  • We are using Magento's SOAP & RPC API interface for our customer facing storefront i.e. listing store, catalog, products, purchase, reviews etc in our UI layer is done by calling various Magento APIs.

What we have noticed that our customer facing storefront is pretty slow since Magento SOAP & RPC API are taking pretty long time to return the data even with the sample data that comes with Magento download. Even after we have enabled all the available caching in Magento admin panel we noticed that Magento is sending every query to the MySQL database and those queries tend to slow whole thing down under constant heavy load.

So I was wondering whether I have setup everything right or missed something? I repeat here we are not using Magento UI but have our own remote UI layer built using Java EE, Spring MVC etc that communicates with Magento using its SOAP & RPC API interface.

Is there some other form of caching to be enabled for these API calls? And how to avoid database calls from Magento using some sort of caching support?

1
Hi Anubhava, I have a similar situation and would like to know more about your experiences. Were you able to resolve the issue? - 142857
@142857: No I could not find any native Magento way of caching to avoid DB calls while using Magento SOAP APIs. We ended up putting a proxy in front of Magento to support this kind of caching. - anubhava
I have came to know from another user that magento apis are slow as compared to theming, hence not a preferred way of development. Did you notice such difference? Also, would request your comments at stackoverflow.com/questions/12640491/… - 142857
@142857: Thanks, I commented on your question and upvoted it too. - anubhava

1 Answers

8
votes

Magento use configuration (XML) cache in API as well in normal frontend access. The cost of retrieve the data from MySQL using API is the same than use the frontend access. There is no native API response cache yet, just XMLs and MySQL Query Cache. You have to add a proxy or anything else by your own.

In my humble opinion, receive cached data will be painful, you can get late and mismatching data. I'll start with a good MySQL and HTTP Server performance tunning like is described in http://info.magento.com/rs/magentocommerce/images/Magento_PerformanceWhitepaper-EEv1-9.1.pdf.