7

Is there any difference in the underlying approach of retrieving content from broker by using odata service vs using content delivery api? Does Odata service internally use content delivery api to fetch the record? I am doing a POC and trying to understand the performance in two possible approach.

  1. Using odata service with java script base framework to display content on web application

  2. Using content delivery api (may be using dd4t as wrapper) and using either mvc.net or js based framework for the front end.

I have worked on multiple implementations using content delivery API but only few POC on odata hence wanted to understand if there is any limitation in using ODATA service.

Also does ODATA service provide any OOB cache mechanism like the content delivery API object cache?

5

--Update based on Nuno's comment below --

OData does not internally use the CD API. It has a different implementation, but like the CD API, is also based on the JPA standard.

--end update--

OData caches the results, so does the CD API. However, you must consider where the caches reside and the trip your data has to make to reach the end user upon request. With the CD API, the cached results sit in the applications memory known as the Object Cache. This is very fast to retrieve and serve up to the client. With OData, the cached data sits in OData service's Object Cache. Hence, the data still has to make a trip from the OData server to your consuming application over HTTP. There is expected standard HTTP and network latency there just like with any other web service.

So if using OData, it is common to cache the results on the consuming application's side by using something like EHCache (on java) or MemCache (on .NET). This would be a custom implementation, or if using DD4T then it's already built-in.

The only limitation that I've run into using OData is querying multiple custom metas. There are a few posts describing how to overcome it: http://www.tridiondeveloper.com/odata-how-to-query-multiple-custom-metas and http://yatb.mitza.net/2013/06/url-syntax-for-odata-query-extension.html

| improve this answer | |
  • 5
    That's a bold (and slightly incorrect) statement about it not using the API :) – Nuno Linhares Mar 12 '15 at 19:25
  • Hmm, that was the first question I asked when OData came out and the answer I got was that it didn't use Query and Criteria classes to pull the data out of the DB, but had it's own new and revised way of doing it. Also when Mihai presented his OData extension in the webinar, we discussed that he had to fall back on using the publically exposed Query and Criteria classes to do it, and couldn't bolt on to the new internal classes that OData used. – Nickoli Roussakov Mar 12 '15 at 20:26
  • It changed substantially in 2013 and 2013 SP1 (the internals of it) mostly to make better use of our caching – Nuno Linhares Mar 12 '15 at 21:05
  • Thanks Nick,Odata fits well as I need content as a service as well, but what about XPM, can I still get XPM functionality while using ODATA. Also, I checked the CT4T framework(by Mihai,Alex,Will) using odata, which was quite a replica of DD4T at client side but it was never promoted later on and is as it is for last 2 years. – rdhaundiyal Mar 13 '15 at 2:02
  • Yes you can, but this would need to be another Q&A. – Nickoli Roussakov Mar 13 '15 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.