winfs: product development experience alexander vaschillo microsoft alexander vaschillo microsoft
TRANSCRIPT
WinFS: Product Development ExperienceWinFS: Product Development Experience
Alexander VaschilloMicrosoftAlexander VaschilloMicrosoft
Why MicrosoftWhy Microsoft
Wide variety of software projects in all areasWide expertise of peopleAbility to do large complex projectsAbility to integrateTechnical management up to the very top
Wide variety of software projects in all areasWide expertise of peopleAbility to do large complex projectsAbility to integrateTechnical management up to the very top
HistoryHistory
WindowsRepositoryEnglish QueryNetDocsHailstormWeb ServicesExchange databaseSharepoint server
WindowsRepositoryEnglish QueryNetDocsHailstormWeb ServicesExchange databaseSharepoint server
WinFSWinFSFile systemDatabaseSharing framework
File belongs to applicationStandard file is known to class of applicationsWinFS Item is understandable by everybody
Application integrationProgramming modelCategorize and Relate InformationSearch
File systemDatabaseSharing framework
File belongs to applicationStandard file is known to class of applicationsWinFS Item is understandable by everybody
Application integrationProgramming modelCategorize and Relate InformationSearch
Is it about Searching?Is it about Searching?
I want Windows to find an address of John Smith. I entered it somewhere.Understanding semantics of dataKnowing where to look for dataKnowing how to represent the resultQuerying instead of searching - much richerWinFS Database is managing data
Indexing common expected queriesProcess data as it arrives
I want Windows to find an address of John Smith. I entered it somewhere.Understanding semantics of dataKnowing where to look for dataKnowing how to represent the resultQuerying instead of searching - much richerWinFS Database is managing data
Indexing common expected queriesProcess data as it arrives
Data model considerationsData model considerations
Provide basic operations on “files”Copy, create, delete, synchronize, security, serialization
Relationships as first class objectsEnable schemas for everyday life objects
People, Documents, Messages, Appointments, Pictures,Allow extensibility
Convenient modern programming model
Provide basic operations on “files”Copy, create, delete, synchronize, security, serialization
Relationships as first class objectsEnable schemas for everyday life objects
People, Documents, Messages, Appointments, Pictures,Allow extensibility
Convenient modern programming model
Data ModelData Model
Plain Relational is too storage oriented
File copy operation is too unnaturalRelationships are second-classObject inflation is expensive
Need richer abstraction: Item
Plain Relational is too storage oriented
File copy operation is too unnaturalRelationships are second-classObject inflation is expensive
Need richer abstraction: Item
id PidPerson Address
ItemItem
Unit of operationPersonDocumentMessage…
Good for queriesObject inflation is expensive
Unit of operationPersonDocumentMessage…
Good for queriesObject inflation is expensive
id PidPerson Address
Item as UDTItem as UDT
Entire item is stored as one record in Item tableUDT (CLR-based) technology is usedVery easy to inflate an objectOperation with Item is very fastIndexing on item fields is done by UDTsNested table to store Address
Entire item is stored as one record in Item tableUDT (CLR-based) technology is usedVery easy to inflate an objectOperation with Item is very fastIndexing on item fields is done by UDTsNested table to store Address
id UDTItem
RelationshipsRelationships
Relating two independent itemsRelationship is a separate UDTLifetime control by relationship
ContainingHoldingReference
Relating two independent itemsRelationship is a separate UDTLifetime control by relationship
ContainingHoldingReference
id idDocument Person
Author
File systemFile system
Replace or enrich?Can not schematize everythingSystem filesSemantics of file operationsWinFS Items viewed as files in ExplorerRich DB relational storage in Windows OSWinFS data is typed
Replace or enrich?Can not schematize everythingSystem filesSemantics of file operationsWinFS Items viewed as files in ExplorerRich DB relational storage in Windows OSWinFS data is typed
Items and filesItems and files
Pure files – unstructured dataSystem filesProgram FilesCache filesCustom files (non-schematizeable)
File-backed Items – somewhat structured
Document (OLEDoc bag)JPEG (EXIF tags)
Pure WinFS Items – structured dataContact
Pure files – unstructured dataSystem filesProgram FilesCache filesCustom files (non-schematizeable)
File-backed Items – somewhat structured
Document (OLEDoc bag)JPEG (EXIF tags)
Pure WinFS Items – structured dataContact
WinFS – Win32 conversionsWinFS – Win32 conversions
PromotionWord 2000 continues writing to old .doc formatWinFS API Application needs to access properties without knowing .doc formatSchema legacy – promoter as a mapping tool
DemotionChanges made by WinFS Apps are reflected in the file systemWinFS App does not need to know whether this is a file-backed ItemSerialization format for non-WinFS Stores
PromotionWord 2000 continues writing to old .doc formatWinFS API Application needs to access properties without knowing .doc formatSchema legacy – promoter as a mapping tool
DemotionChanges made by WinFS Apps are reflected in the file systemWinFS App does not need to know whether this is a file-backed ItemSerialization format for non-WinFS Stores
FoldersFolders
Folders as a tool to organize and categorize dataCan 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 folderItem as a folderWinFS Shares \\<machine>\Store\...
Folders as a tool to organize and categorize dataCan 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 folderItem as a folderWinFS Shares \\<machine>\Store\...
SchemasSchemas
Usable by everybodyHow complex can we go?The key is to relate everything
No vertical schemas
ExtensionsApplication specific schemas
Common metadataRe-enables semantic processing (English query)
Usable by everybodyHow complex can we go?The key is to relate everything
No vertical schemas
ExtensionsApplication specific schemas
Common metadataRe-enables semantic processing (English query)
Message Schema ClientsMessage Schema Clients
OutlookOutlook ExpressHotmailExchangeIMFax ServerPhone Server
OutlookOutlook ExpressHotmailExchangeIMFax ServerPhone Server
Message Schema Version 1Message Schema Version 1
Message
Subject :StringBody :BinaryAttachment :BinaryFrom :StringTo :StringCc :StringBcc :StringTimeSent :DateTimeTimeReceived :DateTimeIsRead :BooleanImportance :Integer…
To: “John Smith <[email protected]>; Ivan Petrov <[email protected]>”
To: “John Smith <[email protected]>; Ivan Petrov <[email protected]>”
Message Schema Version 2Message Schema Version 2Message
Subject :StringTimeSent :DateTimeTimeReceived :DateTimeIsRead :BooleanImportance :Integer…
Document
…
Document
…
Body
Attachment
Contact
…
Participant Type: From
ToCcBcc
Contact schemaContact schemaContactFullName
TitleGivenNameMiddleNameSurnameSufffixNickName
EAddress [0..*]DisplayNameAddressStartDateEndDate
PostalAddress [..*]AddressLineAdministrativeDivisionCitySecondaryCityCountryRegionPostalCode
ImagePhoto
DocumentNotes
Message SchemaMessage Schema
Message (Envelope)
Document
Document
Body
Attachment
ContactParticipantTypeDisplayNameAddressUsed
Fax
Phone
IM
Outlook Extension
APIs to work with the dataAPIs to work with the data
SimplicityEmbedded SQLObject-orientedInvent a new languageLanguage integrated query
Programming modelCollections of objects, not recordsets
File based APIs
SimplicityEmbedded SQLObject-orientedInvent a new languageLanguage integrated query
Programming modelCollections of objects, not recordsets
File based APIs
WinFS APIWinFS APIObjects, not SQL tuplesCan not require SQL language knowledgeClient API as a set of managed code assemblies residing in the applicationTalk to Database through SQLClient (TDS)Client side query?
Objects, not SQL tuplesCan not require SQL language knowledgeClient API as a set of managed code assemblies residing in the applicationTalk to Database through SQLClient (TDS)Client side query?
WinFS DBApplication WinFS API SQLClient
API to queryAPI 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);
}}
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 dataAPI to change dataPersonItem 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();
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 navigateAPI to navigateStorageSearcher<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) {
...}
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 APIProjection APIStorageSearcher<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"];}
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 computersMultiple computers
Relations across domainsDangling linksLocal copies
Synchronizing copies of dataTalking to Non-WinFS storesConsistency and conflicts
Relations across domainsDangling linksLocal copies
Synchronizing copies of dataTalking to Non-WinFS storesConsistency and conflicts
SynchronizationSynchronization
Level of WinFS schema, not tablesMultiple changes to Item aggregated in one final changeItem is consistency unitChange Units within Item
GranularityConflictsSchema authors decide based on semantics
Level of WinFS schema, not tablesMultiple changes to Item aggregated in one final changeItem is consistency unitChange Units within Item
GranularityConflictsSchema authors decide based on semantics
SynchronizationSynchronization
Each replica has ID and version + rich state (knowledge)Sync application tells WinFS what to sync, how to resolve conflicts, etc.
Each replica has ID and version + rich state (knowledge)Sync application tells WinFS what to sync, how to resolve conflicts, etc.
WinFS 1 WinFS 2
This is what I know
Here is new knowledge
Synchronization conflictsSynchronization conflicts
Different changes to the same ItemChanges to different items violate integrity constraintsConflict strategy
Reject (headless servers)Automatically resolve
Local copyRemote copyLast timestampDeterministic winner
LogCustom App uses Sync APIs to decide on merge
Different changes to the same ItemChanges to different items violate integrity constraintsConflict strategy
Reject (headless servers)Automatically resolve
Local copyRemote copyLast timestampDeterministic winner
LogCustom App uses Sync APIs to decide on merge
Sync for Non-WinFS storesSync for Non-WinFS stores
Exchange, Sharepoint, ADImplement Sync Adapters
WinFS provides framework and APIs
Heterogeneous networksNon-WinFS store talks to two different WinFS Stores
WinFS – Win32 AdapterFile shares
Exchange, Sharepoint, ADImplement Sync Adapters
WinFS provides framework and APIs
Heterogeneous networksNon-WinFS store talks to two different WinFS Stores
WinFS – Win32 AdapterFile shares
ApplicationsApplications
Find a presentation I wrote last month and sent to JohnShow me all I know about MikeMy 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?
Find a presentation I wrote last month and sent to JohnShow me all I know about MikeMy 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 DatabasePopulating WinFS Database
WinFS is a platform, not an application
WinFS provides technologyApplications provide Data
Word .doc properties made usefulFile already has name, extension, locationNatural APIEasier than serializationSome properties automatic, some manual
WinFS is a platform, not an application
WinFS provides technologyApplications provide Data
Word .doc properties made usefulFile already has name, extension, locationNatural APIEasier than serializationSome properties automatic, some manual