#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Sql azure data services OData
1. Ing. Eduardo Castro Martínez
ecastro@grupoasesor.net
http://tinyurl.com/comunidadwindows
2. ARC306. Open Data For The Enterprise.
Jonathan Carter
DEV323. Best Practices: Creating OData
Services using WCF Data Servic. Alex
James
DEV325. Best Practices for Building
Custom Open Data Protocol (OData)
Services with Windows Azure. Alex James
3.
4. Microsoft SQL Azure
Information Platform as a Service
Managed Service Scale on Demand Innovate Faster
Platform capabilities delivered
as a service (Database, Data Database as a utility with Innovate with new data
Sync, Reporting…) pay as you grow scaling application patterns
Reduced complexity, greater Rely on Business-ready Build cloud-based data
flexibility SLAs solutions on a familiar
relational model
Easy provisioning and Enable multi-tenant
deployment solutions Build on existing developer
skills and familiar Transact-
Auto High availability and Manage multiple servers SQL syntax
fault tolerant
5. Subscription
Used to map service usage to the billing instrument
Users may have many subscriptions
Logical Server
Akin to SQL Server Instance
Unit of Geo-Location & Billing
1:1 Subscription & server
User Database
Restricted T-SQL surface area
Additional catalog views provided e.g.
sys.billing, sys.firewall_rules, etc
6. A relational DB in the cloud
SQL Azure Database
Data Hub
Others (Future)
.NET Services
SQL Services
Applications
Relational database as a service
Live Services
Windows Azure
Highly available, automatically maintained
Extension of the SQL Server Data Platform
Applications
Windows Windows Windows Others
Server Vista/XP Mobile
8. Reference Data Sync
Data
Symmetric Programming Model Data Hub Aggregation
• Initial services – core RDBMS capabilities with SQL Azure Database,
Data Sync
• Future Offerings
• Additional data platform capabilities: Reporting, BI
• New services: Reference Data
9. Clear Feedback: “I want a database in the Cloud”
Familiar SQL Server relational model
Uses existing APIs & tools
Built for the Cloud with availability and scale
Accessible to all from PHP, Ruby, and Java
Focus on combining the best features of SQL Server
running at scale with low friction
10. Application Application Application
Browser Browser
ODBC, OLEDB,
Application Application
REST Client REST Client SQL Client* ADO.Net PHP,
Ruby, …
Cloud Cloud
Evolves
HTTP+REST
HTTP+REST
HTTP
HTTP
TDS
Windows Azure Windows Azure
Data Center
Data Center
Web App REST (Astoria) Web App
REST Client ADO.Net + EF SQL Client*
REST/SOAP + ACE Model TDS + TSQL Model
SDS Current SDS Next
* Client access enabled using TDS for ODBC,
ADO.Net, OLEDB, PHP-SQL, Ruby, …
11. SQL Azure Database
Others (Future)
SQL Azure
Applications
Windows Azure
AppFabric
Windows Azure
Applications
Windows Others
13. SQL Azure Database
Database
Application
Max database
Database size is 50 GB
Database
Application
Database
14. Applications use standard SQL client libraries:
ODBC, ADO.Net, PHP, …
Application
Internet
Azure
Cloud
TDS (tcp)
Security Boundary
Load balancer forwards „sticky‟ sessions to TDS
LB protocol tier
TDS (tcp)
Gateway Gateway Gateway Gateway Gateway Gateway
Gateway: TDS protocol gateway, enforces AUTHN/AUTHZ policy; proxy to CloudDB
TDS (tcp)
L SQL SQL SQL SQL
Scalability and Availability: Fabric, Failover, Replication, and Load balancing
15. Subscription
Coordinated across all Azure services
Executed in parallel w/retries
Server
May occur between data centers
Point where Geo-location is established
Database
Always occurs within a single data center
Cross node operations executed during this
process e.g. add new db to sys.databases on the
master
16. Live DNS Cluster
Customer Live DNS
Browser Svc
1
Datacenter (Sub-Region) 5
Portal LB Gateway LB
2
4
3 6
Front-end Node Front-end Node Front-end Node Front-end Node
Admin Portal Admin Portal Gateway Gateway
7
Backend Node Backend Node Backend Node
SQL Server SQL Server SQL Server
Mgmt. Mgmt. Mgmt.
Services Fabric Services Fabric Services
Fabric
17. 1
TDS Gateway
Front-end Node
TDS Session Protocol Parser
2
3
Gateway Logic
Master Cluster
Master Node
4
Master Node
Components
7
5 8 6
Backend Node 1 Backend Node 2 Backend Node 3
SQL Instance SQL Instance SQL Instance
SQL DB SQL DB SQL DB
Scalability and and Availability: Fabric,Failover,Replication, and Load balancing
Scalability Availability: Fabric, Failover, Replication, and Load balancing
19. Build a custom OData Service?
Configure and Deploy your OData Service?
Reach your audience?
Share only what you want?
Plan for the future?
20. OData is the easiest way to share data
Do it wrong and it will cost you
Mobile and JavaScript clients are important
Sharing too much can hurt your career
Things change.
27. For development you need:
Windows Azure SDK and Windows Azure
Tools for VS
Azure account with at least:
One Storage Account
One Hosted Service
Registered Certificate
SQL Azure Database
28. Options
Use SSIS
Script Database and run script in new
database
Code in your app to initialize database
(Coming Soon)
http://www.sqlazurelabs.com/ImportExport.aspx
(EXPORT) DacImportExportCli.exe
-s serverName
-d databaseName
-f C:filePathexportFileName.bacpac
-x -e
(IMPORT) DacImportExportCli.exe
-s serverName.database.windows.net
-d databaseName
-f C:filePathexportFileName.bacpac
-i
32. AuthN
Windows Auth – simple for in the enterprise
services
Basic Auth – maximum reach
Forms Auth – purely for integration
OAuth – most flexible – but needs custom
code
OAuth HttpModule
Custom client code to acquire credentials
34. Try to Authenticate
someone@mycorp.c
om
someone@mycorp.com
Authenticates and sets: HttpContext.Current.User
35. need to access
x@y.com‟s data
token: x@y.com
token: x@y.com canread
canread
Authenticates and sets: HttpContext.Current.User
36.
37. With
DataServiceContext.IgnoreMissingProperti
es:
You can safely
Add a new optional property
Remove a property – Read Only
Add unrelated new types
But lots of things can go wrong.
Add a required property or navigation
Remove a property – Read/Write
Rename a property (fail).
Remove a type / feed
Realistic Solution
V1/service.svc/
V2/service.svc/
38. You just learned how to:
The easiest way to build a web-api
The easiest way to host a web-api
How to do it the right way:
Configuration
Security & Reach
Versioning
You know how to create a REAL service…
39. Windows Azure SDK and Windows Azure Tools for
Microsoft Visual Studio http://bit.ly/mMcoc3
JSONP component (with recent bug fix)
http://bit.ly/mbk04c
Using ASP.NET Output Caching with WCF Data Services
http://bit.ly/gXmbdE
Authentication posts on the OData team blog
http://bit.ly/gXmbdE
The New Hands-on Lab on ACS + WP7 + OAuth2.0
OData Service http://bit.ly/h8gcJV