ALLER Plus loin sur SSDS (SQL Server Data Services)...
Vous pouver lire le "Solution Overview" de 5 pages ou aller sur le blog https://blogs.msdn.com/ssds qui est déjà plein d'exemples de codes. Par exemple, comment accéder à SSDS en Java : Java code sample for SSDS
En substance :
Provisioning
Microsoft SSDS provisioning model is organized around the following hierarchy.
Customer { SSDS account (1..N) { Authority (1..N) { Container (0..N) { Entity (0..N)
- Customers are companies, organizations, individuals who want to use the SQL Server Data Services.
- Accounts are billing entities. Customers can open as many Microsoft SSDS accounts as they like. However, each account must use a unique LiveId. Each account has billing information associated with it.
- Authorities give billing entities a way to organize their usage for accounting, security and co-location purposes. All containers under a single authority are provisioned within the same data center. As such authorities are the unit of geo-scale and geo-location.
- Containers create contexts and scope for entity storage and query. For example, within its authorities, operations could choose to assign each member their own container, intended to contain a set of personal data for that member. Containers are the unit of consistency in the Microsoft SSDS service.
- Entities are the fundamental unit of storage in the system. For example, an individual member?s jobs, educational institutions, contacts, recommendations, etc. could all be modeled as entities.
The figure below shows the relationship of authorities, containers, and entities.
Data model
Microsoft SSDS supports a flexible data model with no schemas required. An entity is the smallest unit of consistency. It can be independently serialized, updated, etc.
Entities are “flat scalar property bags.” That is to say, entities have properties, properties have values, and those values are scalars. Every entity has service metadata properties as well as user defined properties.
There is no fixed typing of entities. From the point of view of the service, the set of properties associated with an entity are independent of the properties of any other entity. Further, the type of the value of a given property may vary from entity to entity. Any standardization of properties or property types across entities is under the control of the application developer.
The data types supported for properties are string, binary, Boolean, number, and date-time.
Data manipulation
The data manipulation model enables Create/Update/Delete operations on Authorities, Containers, and Entities. Microsoft SSDS will help enable the creation, modification, and deletion of Microsoft SSDS accounts and authorities via a Web site interface.
Data manipulation operations include:
? Creation and deletion of containers. There are no updatable container properties.
? Creation, replacement, and deletion of entities.
? Retrieval of a single container in a serialized format.
? Retrieval of a single entity in a serialized format.
Query language
Microsoft SSDS supports a text based query language. This language follows the LINQ pattern for C#.
The query language is designed to enable simple filtering scenarios. Queries can be addressed to single authorities or single containers as per the following rules.
? An authority can be queried for the containers within it matching a specified condition. In this case, query scope is limited to the single authority to which the query is submitted.
? A container can be queried for all entities within that container matching a specified condition. In this case, query scope is limited to the single container to which the query is submitted.
The query language supports the retrieval of complete entities only. Selection conditions are defined by boolean combination of primitive comparison operations. Boolean operators to be supported are AND, OR, NOT. Comparison operators to be supported are <, >, <=, >=, !=, ==. Comparison operator semantics are those provided for the SQL variant type. All comparisons have the form (property OP
constant_or_param).
For example, a query addressed to a container to retrieve all entities in that container having a
“City” property equal to “Seattle” and a “State” property equal to “WA” would be written as follows:
from e in entities
where e[“City”] == “Seattle” &&
e[“State”] == “WA”
select e
In this query „entities? binds to the target container for the query.
Resource-based query
**
Microsoft SSDS also supports resource query. Resource query navigates a path to a single entity or container of entities and allows filtering of the leaf item(s) found there.
For example, the REST URI below refers to the specific container ChildrensBooksContainer1 beneath the authority mydomain.ssds.microsoft.com. The URI returns all the entities in that container.
https://mydomain.ssds.microsoft.com/ChildrensBooksContainer1 This REST URI refers to a specific entity resource (SomeBook) in the container identified by the URI above. The URI returns the single entity if it exists.
https://mydomain.ssds.Microsoft.Com/ChildrensBooksContainer1/SomeBook
Security
Security is at the account, authority and container levels. Accounts are secured by a Windows Live Id.
Each authority is secured by a single “secret key” granting read/write access. Further, each container within an authority is secured by its own single “secret key” granting read/write access. Optionally the contents of a container can be made read-accessible to the public.
Comments
- Anonymous
January 01, 2003
Une petite synthèse des pointeurs intéressant à signaler sur le sujet : · Le «