Download WinFS

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Data vault modeling wikipedia , lookup

File locking wikipedia , lookup

Business intelligence wikipedia , lookup

Computer file wikipedia , lookup

Relational model wikipedia , lookup

Clusterpoint wikipedia , lookup

Operational transformation wikipedia , lookup

Psychometric software wikipedia , lookup

Versant Object Database wikipedia , lookup

Database model wikipedia , lookup

WinFS wikipedia , lookup

Transcript
WinFS: Product Development
Experience
Alexander Vaschillo
Microsoft
Why Microsoft
Wide variety of software projects in all
areas
Wide expertise of people
Ability to do large complex projects
Ability to integrate
Technical management up to the very top
History
Windows
Repository
English Query
NetDocs
Hailstorm
Web Services
Exchange database
Sharepoint server
WinFS
File system
Database
Sharing framework
File belongs to application
Standard file is known to class of applications
WinFS Item is understandable by everybody
Application integration
Programming model
Categorize and Relate Information
Search
Is it about Searching?
I want Windows to find an address of John
Smith. I entered it somewhere.
Understanding semantics of data
Knowing where to look for data
Knowing how to represent the result
Querying instead of searching - much
richer
WinFS Database is managing data
Indexing common expected queries
Process data as it arrives
Data model considerations
Provide basic operations on “files”
Copy, create, delete, synchronize, security,
serialization
Relationships as first class objects
Enable schemas for everyday life objects
People, Documents, Messages,
Appointments, Pictures,
Allow extensibility
Convenient modern programming model
Data Model
Plain Relational is too storage oriented
File copy operation is too unnatural
Relationships are second-class
Object inflation is expensive
Need richer abstraction: Item
Person
Address
id
Pid
Item
Unit of operation
Person
Document
Message
…
Good for queries
Object inflation is expensive
Person
Address
id
Pid
Item as UDT
Entire item is stored as one record in Item
table
UDT (CLR-based) technology is used
Very easy to inflate an object
Operation with Item is very fast
Indexing on item fields is done by UDTs
Nested table to store Address
Item
id
UDT
Relationships
Relating two independent items
Relationship is a separate UDT
Lifetime control by relationship
Containing
Holding
Reference
Document
Person
id
id
Author
File system
Replace or enrich?
Can not schematize everything
System files
Semantics of file operations
WinFS Items viewed as files in Explorer
Rich DB relational storage in Windows OS
WinFS data is typed
Items and files
Pure files – unstructured data
System files
Program Files
Cache files
Custom files (non-schematizeable)
File-backed Items – somewhat structured
Document (OLEDoc bag)
JPEG (EXIF tags)
Pure WinFS Items – structured data
Contact
WinFS – Win32 conversions
Promotion
Word 2000 continues writing to old .doc format
WinFS API Application needs to access
properties without knowing .doc format
Schema legacy – promoter as a mapping tool
Demotion
Changes made by WinFS Apps are reflected
in the file system
WinFS App does not need to know whether
this is a file-backed Item
Serialization format for non-WinFS Stores
Folders
Folders as a tool to organize and
categorize data
Can Item belong to several folders?
My wife rearranged my pictures again
Can folder contain both Items and Files?
Each Item must belong to at least one
folder
Item as a folder
WinFS Shares \\<machine>\Store\...
Schemas
Usable by everybody
How complex can we go?
The key is to relate everything
No vertical schemas
Extensions
Application specific schemas
Common metadata
Re-enables semantic processing (English
query)
Message Schema Clients
Outlook
Outlook Express
Hotmail
Exchange
IM
Fax Server
Phone Server
Message Schema Version 1
Message
Subject
Body
Attachment
From
To
Cc
Bcc
TimeSent
TimeReceived
IsRead
Importance
…
:String
:Binary
:Binary
:String
:String
:String
:String
:DateTime
:DateTime
:Boolean
:Integer
To: “John Smith <[email protected]>; Ivan
Petrov <[email protected]>”
Message Schema Version 2
Message
Subject
TimeSent
TimeReceived
IsRead
Importance
…
Body
:String
:DateTime
:DateTime
:Boolean
:Integer
Document
…
Attachment
Document
…
Participant
Type:
From
To
Cc
Bcc
Contact
…
Contact schema
Contact
Image
FullName
Title
GivenName
MiddleName
Surname
Sufffix
NickName
EAddress [0..*]
DisplayName
Address
StartDate
EndDate
PostalAddress [..*]
AddressLine
AdministrativeDivision
City
SecondaryCity
CountryRegion
PostalCode
Photo
Notes
Document
Message Schema
Outlook
Extension
Body
Document
Attachment
Document
Message
(Envelope)
Email
Participant
Type
DisplayName
AddressUsed
Fax
Phone
IM
Contact
APIs to work with the data
Simplicity
Embedded SQL
Object-oriented
Invent a new language
Language integrated query
Programming model
Collections of objects, not recordsets
File based APIs
WinFS API
Objects, not SQL tuples
Can not require SQL language knowledge
Client API as a set of managed code
assemblies residing in the application
Talk to Database through SQLClient (TDS)
Client side query?
Application
WinFS API
SQLClient
WinFS DB
API to query
using (StorageContext sc1 = new
StorageContext()) {
StorageSearcher<PersonItem> searcher =
sc1.Items.FilterByType<PersonItem>().
Filter("DisplayName like 'S%'");
foreach (PersonItem person in searcher) {
Console.WriteLine("{0}", person.DisplayName);
}
}
API to change data
PersonItem person =
sc.Items.FilterByType<PersonItem>().GetFirst();
person.Gender = Gender.Male;
PostalAddress address = new PostalAddress();
address.AddressLine = "One Microsoft Way";
address.PrimaryCity = "Redmond";
address.AdministrativeDivision = "WA";
address.PostalCode = "98052";
address.CountryRegion = "USA";
p.PostalAddresses.Add(address);
sc.SaveChanges();
API to navigate
StorageSearcher<OrganizationItem> organizations =
sc.Items.WithType<OrganizationItem>().
Filter("Keywords.Filter(Value='Financial')");
StorageSearcher<PersonItem> employees =
EmploymentRelation.GetEmployees(organizations);
StorageSearcher<DocumentItem> documents =
DocumentAuthorRelation.GetDocuments(employees);
foreach( DocumentItem document in documents) {
...
}
Projection API
StorageSearcher<MessageItem> messages =
sc.Items.FilterByType<MessageItem>()
.Filter("Subject LIKE '%WinFS%'");
StorageSearcher<StorageRecord> projection =
messages.Project("Subject, ModifiedDate.Month
as Month").Sort("Month desc");
foreach( StorageRecord record in projection)
{
string displayName = record["Subject"];
int month = record["Month"];
}
Multiple computers
Relations across domains
Dangling links
Local copies
Synchronizing copies of data
Talking to Non-WinFS stores
Consistency and conflicts
Synchronization
Level of WinFS schema, not tables
Multiple changes to Item aggregated in
one final change
Item is consistency unit
Change Units within Item
Granularity
Conflicts
Schema authors decide based on semantics
Synchronization
Each replica has ID and version + rich
state (knowledge)
Sync application tells WinFS what to sync,
how to resolve conflicts, etc.
This is what I know
WinFS 1
WinFS 2
Here is new knowledge
Synchronization conflicts
Different changes to the same Item
Changes to different items violate integrity
constraints
Conflict strategy
Reject (headless servers)
Automatically resolve
Local copy
Remote copy
Last timestamp
Deterministic winner
Log
Custom App uses Sync APIs to decide on merge
Sync for Non-WinFS stores
Exchange, Sharepoint, AD
Implement Sync Adapters
WinFS provides framework and APIs
Heterogeneous networks
Non-WinFS store talks to two different WinFS
Stores
WinFS – Win32 Adapter
File shares
Applications
Find a presentation I wrote last month and
sent to John
Show me all I know about Mike
My wife is calling me. Why?
Who is this guy in the picture?
I remember reading about new rules of
spec writing recently. Where? Email,
document, fax, presentation?
Populating WinFS Database
WinFS is a platform, not an application
WinFS provides technology
Applications provide Data
Word .doc properties made useful
File already has name, extension, location
Natural API
Easier than serialization
Some properties automatic, some manual