Integrating semi-structured information is one of a primary hurdles of a burgeoning collection of
Web 2.0 APIs. Whether a information originates in a consumer focus or in craving Web services,
it is required to find a least-common information denominator to capacitate on-premise or cloud-based
services to know one another.
The RESTful Open Data Protocol — improved famous as a OData API — has a intensity to
interconnect cloud-based craving Software as a Service offerings and Platform as a Service projects, as a doing now for big data services
like a whole Netflix film catalog and a Windows Azure Marketplace DataMarket.
More on APIs and a cloud:
Cloud
computing programming API tutorial
Weighing
the cloud computing standards dilemma
Compatibility
concerns in a expansion of cloud computing APIs
Structured information sources — such as relational databases, spreadsheets and files containing
comma-separated values — rest on a entire Open Database Connectivity (ODBC) data-access API,
which Microsoft blending from a SQLAccess Group’s Call Level Interface (CLI) and expelled in 1992.
Sun Microsystems expelled a Java Database Connectivity (JDBC) v1 API in 1997 and after combined it
to a Java Standard Edition. A JDBC-to-ODBC overpass enables JDBC connectors to ODBC-accessible
databases. ODBC and JDBC APIs capacitate estimate SQL SELECT queries, as good as INSERT, UPDATE and
DELETE statements, opposite tabular information and can govern stored procedures. Microsoft’s OLE DB and
ActiveX Data Objects (ADO) began to addition ODBC in late 1996 as members of a Microsoft Data
Access Components (MDAC.) ODBC and JDBC, however, sojourn a lingua franca of structured
data connectivity for client/server environments.
The conspicuous expansion of a apportion of semi-structured data, mostly Web-based HTML and XHTML
documents, combined a direct for a Web-friendly, cloud-compatible information entrance API equivalent to
ODBC/JDBC. In 2002, Dave Weiner expelled a Really Simple Syndication (RSS) 2.0 API, that he
derived from Netscape’s RDF Site Summary and Rich Site Summary APIs. Wikipedia describes RSS as a
“a family of Web feed formats used to tell frequently updated works — such as blog entries,
news headlines, audio, and video — in a standardised format.”
In 1993, Sam Ruby set adult a wiki to plead refinements to RSS, that captivated a vast and vocal
group of Web focus developers and calm publishers. Wiki members published Atom v0.2 and
v0.3 in 2003; Google adopted Atom as a syndication format for Blogger, Google News and Gmail. In
2004, a Internet Engineering Task Force (IETF) shaped a AtomPub operative organisation — co-chaired by
Tim Bray and Paul Hoffman — to order a Atom format. In late 2005, IETF released a Proposed
Standard for a Atom Syndication Format v1.0 as IETF RFC 4287. IETF released a Proposed Standard
for a Atom Publishing Protocol (AtomPub) as a Proposed RFC 5023 in Oct 2007. Google’s GData
format is formed on Atom and AtomPub v1.0.
Pablo Castro, a Microsoft information architect, due a set of Web information use extensions to
AtomPub called Codename “Astoria” in an “Accessing Data Services in a Cloud” event during a MIX
07 discussion hold in Las Vegas during Apr 2007. Design goals for these services were:
- Web friendly, only plain HTTP
- Uniform patterns for varying schemas
- Focus on data, not formats
- Stay high-level, epitome a store
One of Astoria’s pivotal facilities was a ability to entrance any information component — called an entity –
by a Uniform Resource Identifier (URI), as good as associated entities by navigating a graph of
associations. Microsoft’s Entity Data Model v1 tangible a accessible entities, including information types
and associations. The Astoria group also specified URI-compatible query options to capacitate filtering,
sorting, paging and navigating.
Initially, Astoria upheld plain XML (POX), RDF+XML, and JavaScript Object Notation (JSON)
formats. The Astoria group began questioning AtomPub and Web3S to reinstate POX and RDF+XML, and
settled on AtomPub as a default and JSON as an choice format for AJAX applications in
February 2008. Microsoft launched Astoria as a ADO.NET Data Services Framework Beta 1, together
with a ADO.NET Entity Framework Beta 1, as elements of .NET 3.5 Beta 1 and Visual Studio 2008 SP1
in May 2008. Astoria’s name altered from ADO.NET Data Services to Windows Communication Foundation
(WCF) Data Services in Nov 2009 during Microsoft’s Professional Developers Conference 2009.
Microsoft renamed ADO.NET Data Services’ formats to OData in early 2010.
So what accurately is OData
The Open Data Protocol is a REST-based custom for behaving create, read, refurbish and delete
(CRUD) operations on collections of Web-accessible resources configured as “data services.”
Microsoft determined a OData.org
website in Mar 2010 and published a stream [MS-ODATA]:
Open Data Protocol (OData) Specification in May 2011.
According to a OData FAQ, “OData might be
submitted to a standards physique during some indicate in a destiny formed on feedback from a community. In
the meantime, a Open Data Protocol selection is accessible underneath a Microsoft Open
Specification Promise (OSP), permitting third parties, including open source projects, to build
Data Services for any runtime as good as clients to devour such services.”
Most renouned browsers arrangement OData feeds directly. A URI for the
Order Details table of a SDK’s Sample Read-Only Northwind Service earnings a AtomPub
representation of a initial Order_Details object shown in Figure 1.
Figure 1. IE 9 displaying an OData feed of a initial of 50 Order Details annals from the
Northwind illustration database. (Requires branch off Feed Reading view)
It’s clear from Figure 1 that OData is a really prolix custom with a estimable volume of
XML overhead. The initial 50 Order Details entries are 65,536 bytes in length. The following
URI for a Order Details list of a SDK’s Sample Read-Only Northwind Service provider with a
$format=json query choice appended earnings a following JSON illustration of the
first Order_Details item:
{ "d" : { "results": [ { "__metadata": { "uri":
"https://odata.sqlazurelabs.com/OData.svc/v0.1/jc650b4zaf/Northwind/Order_Details(OrderID=10248,ProductID=11)",
"type": "Northwind.Order_Details" }, "Discount": 0, "OrderID": 10248, "ProductID": 11, "Quantity":
12, "UnitPrice": "14.0000", "Order": { "__deferred": { "uri":
"https://odata.sqlazurelabs.com/OData.svc/v0.1/jc650b4zaf/Northwind/Order_Details(OrderID=10248,ProductID=11)/Order"
} }, "Product": { "__deferred": { "uri":
"https://odata.sqlazurelabs.com/OData.svc/v0.1/jc650b4zaf/Northwind/Order_Details(OrderID=10248,ProductID=11)/Product"
} } }, … }
The initial 50 JSON entries devour 29,859 bytes and are 45.6% a distance of a AtomPub version.
Queries opposite a SQL Azure Labs’ OData Service lapse a limit of 50 entries. If a data
source has some-more than 50 rows, a $skiptoken specifies a object to skip past to start
the unbroken information page. Microsoft announced a accessibility of data.js, a JavaScript library for OData and HTML 5 features
such as internal storage, underneath a MIT permit on Jun 29
WCF Data Services is a .NET customer (Consumer) library for OData that’s an discretionary information source
for Visual Studio LightSwitch applications. The Windows Azure SDK’s
Microsoft.Windows.Azure.StorageClient library is another .NET customer library for OData that
presents information sources as ADO.NET collections. As of Jun 2011, a provides links to additional client
libraries for Silverlight 4, PHP, Java, Ruby, Objective-C (iPhone), Android, Windows Phone 7, .NET
Compact Framework 3.5, Joomla and Drupal.
Current OData Producers embody SAP
NetWeaver 2.0 Gateway, IBM Web Sphere, GeoREST, Microsoft Excel (via PowerPivot), SharePoint 2010
and SharePoint Online (see Figure 2), SQL Azure, Windows Azure Table Storage, Windows Azure Marketplace DataMarket, SQL Server Reporting
Services and Dynamics CRM. The OData SDK also provides links to server libraries, that enable
creating OData Producers. As of Jun 2011, a Producer libraries upheld .NET Framework 3.5 SP1,
.NET Framework 4.0, odata4j (Java), OData on Rails (a prerelease for Ruby) and MySQL OData.
Figure 2. IE 9 displaying an OData feed of a initial of 1,000 Order Details annals from
the Northwind illustration database imported
into equipment of a SharePoint Online list. (SharePoint throttles queries to a limit of 1,000
entries.)
Despite a stream Microsoft centricity, OData shows guarantee of gaining estimable mindshare
in other growth environments, generally Java and Ruby, for that both Consumer and Producer
libraries are accessible now. If we need to interconnect with craving information from a accumulation of
on-premises and cloud-based sources, give OData a exam drive. There’s no doubt that OData is
rapidly apropos ODBC for a Web.
ABOUT THE AUTHOR:
Roger Jennings is a data-oriented .NET developer and writer, a principal consultant of OakLeaf
Systems and curator of a OakLeaf
Systems blog. He’s also a author of 30+ books on a Windows Azure Platform, Microsoft
operating systems (Windows NT and 2000 Server), databases (SQL Azure, SQL Server and Access), .NET
data access, Web services and InfoPath 2003. His books have some-more than 1.25 million English copies
in imitation and have been translated into 20+ languages.
This was initial published in Jul 2011
Article source: http://www.pheedcontent.com/click.phdo?i=68b4842e068905a0709007405ebf344d