Live services as you all knows allows you to access share and synchronize your data.
Once you add your devices to the mesh you can synchronize your data and application between your devices. share your data with your friends and family and access the data from anywhere using the live desktop.
This is remarkable. To enable that there must be a shared data model between all your devices and the cloud.
In this post I want to describe the Live services resource model.
The following famous diagram describes the model:
Let us explain.
The Live Framework Resource Model describes various resources and their relationships to other resources. It is based on a simple Property, Entity, Collection based information model. Each resource is an entity which contains various properties and a set of entities make up a collection. Every collection and entity is uniquely addressable and is identified by a URL. The relationships between entries are represented through hyperlinks. This allows for navigation from one resource to the related resource (entity) or collection of resources (collection). Note that such an entity/collection based model can be transformed trivially to an item/feed based information model of RSS or ATOM.
At the heart of the resource model is Data Entry. Data Entry is the representation of a single unit of data such as photo, a document, a blog post etc. Each data entry contains textual information which describes the data and the link to the binary information – the media (video, photo, etc).
Media related to the data entry is linked via the “EditMediaLink” property and is stored under Media Resources.
A Data Feed is a collection of data entries. In most cases a data feed will be a logical collection of similar / related data entries, however, the content and type of data entries present as part of a data feed is whatever you want it to be.
A collection of data feeds can be represented by a container which we call as a Mesh Object. Usually data feeds grouped under a Mesh Object will be logically related but there is no such binding.
Mesh objects are the basic unit of extensibility, data synchronization and sharing in the Live Framework Resource Model.
All of a user’s data is represented by a collection of such mesh objects and they can be referenced via the user’s Mesh.
Each mesh object not only exposes the collection of data feeds which contains user data (MeshObjects) but also some other important collections :
Every mesh object can be synchronized to multiple devices in a user’s mesh. Information on devices on which a given mesh object is synchronized is available via the mappings feed where each entry provides information on a single device where this mesh object is present.
Every mesh object can be shared with multiple people in various capacities.
Every entry in the members feed provide information on every user who has access to the given mesh object
and the type of access they have.
Whenever a data entry is added, updated or deleted under a given mesh object, the system automatically generates news events.
These are also generated whenever there is an addition / deletion to the members feed or mappings feed for the mesh object.
Each such news event forms an entry in the news feed for the given mesh object.
Users can subscribe to changes to mesh objects such that they can be notified and can potentially take appropriate actions.
Other important resources exposed via Mesh in addition to Mesh Objects are
Information on all the devices on which all or some of the mesh objects are synchronized is available via the devices feed where each entry in the feed provides information on a single device.
Collective information on all the Mesh enabled applications deployed on the mesh for that particular user.
Collective information on all the news entries for all the mesh objects and global news related to the user is available via the news feed where every entry represents a single news event.
A collection of queues that receives notifications about changes to a certain resources. When registering for notification to a particular resource a notification queue is created. It is possible to create a queue for notifications about multiple resources.