4. ODATA PROTOCOL
OVERVIEW
OData stands for Open Data Protocol
(http://www.odata.org)
• is based on REST principles
• supports JSON and AtomPub data formats
• Implementations available in
• .NET, Java, JavaScript, Ruby, PHP and ObjectiveC
5. Binary API doesn’t work over
the Internet
(ODBC,ADO.NET, JDBC…)
!
Internet is HTTP!
!
HTTP + SQL
!
OData as the
SQL for the Web
RDBMS
Data
Files
Data
XML
Data
NoSQL
Data
SQL API Parser API Query API
Applications
OData
http
UNLOCK
DATA SILOS
7. Project Astoria
(Microsoft internal)
ADO.NET Data Services
(Microsoft)
WCF Data Services
(Microsoft)
OData 2.0
(Microsoft Open
Specification Promisse)
OData 3.0
(public)
OData 4.0
(OASIS TC)
8. STRUCTURE OF ODATA
Architecture
REST
Protocol
HTTP
Data Formats
(Serialization)
AtomPub
JSON
Metadata
CSDL
(Conceptual Data
Definition Language)
Data as Resources
GET, PUT … DELETE
Cache, Proxies URI
Addressable Data
Flexible Syntax
Entity Data Model (Chen’s 1976)
Entities == Resources
Associations == Links
CRUD Create, Read, Update, Delete
GET - Read Resource
POST - Create Resource
PUT - Change Resource
DELETE - Delete Resource
9. ENTITY DATA MODEL (EDM)
Entity Container
Entity Set
Entity
Property Property
Entity
Property Property
Entity Set
Entity
Property Property
Entity
Property
Navigation
Property
Entity
Property
Navigation
Property
Association
Association
11. OData
Resource
Is Described in an Entity Data Model by
Collection
• Entity Set
• A navigation property on an entity type that identifies a collection of
entities
•
Entry
• EntityType
• Note: EntityTypes may be part of a type hierarchy
Property of an
entry
• Primitive or Complex EntityType Property
ComplexType • ComplexType
Link • A Navigation Property defined on an EntityType
Service
Operation
• Function Import
17. OASIS ODATA 4.0
Design Goals
• A "web of structured data" without boundaries between isolated services
• Request exactly the desired subset of data with as few roundtrips as possible
• Keep the query language simple and intuitive
• Make all features of OData combine well with each other
• Keep each single feature as simple as possible
• Avoid having several ways to achieve the same goal
18. • Model Evolution (Versioning)
• Model Reuse and Cross-Service Navigation
• Deltas
• Asynchronous Requests and Callbacks
• Vocabularies and Annotations
• Actions and Functions
• Improved Query Language ($search, CrossJoin, Lambda …)
• ImprovedType System
• Entity References
• New JSON
• MISC (stream properties, geo data types, any()/all() operators …)