Understanding OData (and its potential in the fast changing technology World)
This article primarily is an effort to understand the ‘problem’ and the technology that is making an effort to address this – OData aka 'Open Data Protocol'. The sole purpose of this article is to provide an overview on ‘OData’ offers links for further reading.
As one might imagine, in today’s world we have an increasing amount of data, different sources of data on the one hand and an increasing demand to be able to view the data through various means(browser, application, mobile devices) on the other. Increasingly businesses are also looking for easier means to combine data from various sources for analytics and market research.
The problem is not new, it is just that with businesses fast adopting to the ‘social’ model of influencing, marketing and doing business, this is becoming an important use case for most data driven application/product. The need is for a ‘standard’/’mechanism’ that is well accepted to ‘expose’ your data in a way that it can be easily be consumed by various data consumers, devices & tools.
One might ponder on the ‘classic’ web services model that provides a industry accepted model to expose data allowing consumers to consume/process/view the data. However, this does have some obvious drawbacks:
1) Each source of data might expose data in its own custom format or web services.
2) Also, often the data ‘sources’/’publishers’ may not have visibility/foresight on the slice & dice of data that the data ‘consumers’/’viewers’ may want. This could result in additional challenges of multiple calls to get the desired data.
All that’s needed is an agreement on a way to model data and a protocol for accessing that data. This is exactly what is defined by OData.
What is OData?
- The OData protocol is based on REST; at bottom, it's just HTTP.
- OData defines an abstract data model (EDM – same concept as defined by the ‘Microsoft Entity Framework’) and a protocol that lets any client access information exposed by any data source.
- The fundamental idea is that any OData client can access any OData data source. Rather than creating unique ways to expose and access data, data sources and their clients can instead rely on the single solution that OData provides.
The below figure shows how ‘client’ (data consumers) can use ‘OData libraries’ to access data exposed from various ‘data sources’ (that expose data in the form of OData services). The ‘common’ rules for exposing & accessing of data now makes it possible to combine data to an extent that would otherwise be lot more challenging to achieve.
OData is part of an ‘Open’ specification primarily driven by Microsoft and others. Ref: OData
Figure1: (Taken from MSDN)
Potential (for rapid adoption):
1) The OData protocol provides a means to define the data format for serialization (data on the wire) as either Atom/AtomPub or JSON. The latter (JSON) has greater industry acceptance due to:
b. JSON becoming the language of the web
c. Becoming predominant technology leveraged by NoSQL document stores
2) OData defines powerful easy-to-understand URI constructs allowing access to various dimensions of the data exposed through an OData Services.
3) On the Microsoft technology side, you can quickly build an OData service and client applications using WCF service & client application. A quick reference can be found here.