winfs: product development experience alexander vaschillo microsoft alexander vaschillo microsoft

34
WinFS: Product Development Experience Alexander Vaschillo Microsoft

Upload: jonas-payne

Post on 26-Dec-2015

233 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

WinFS: Product Development ExperienceWinFS: Product Development Experience

Alexander VaschilloMicrosoftAlexander VaschilloMicrosoft

Page 2: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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

Page 3: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

HistoryHistory

WindowsRepositoryEnglish QueryNetDocsHailstormWeb ServicesExchange databaseSharepoint server

WindowsRepositoryEnglish QueryNetDocsHailstormWeb ServicesExchange databaseSharepoint server

Page 4: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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

Page 5: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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

Page 6: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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

Page 7: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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

Page 8: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

ItemItem

Unit of operationPersonDocumentMessage…

Good for queriesObject inflation is expensive

Unit of operationPersonDocumentMessage…

Good for queriesObject inflation is expensive

id PidPerson Address

Page 9: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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

Page 10: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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

Page 11: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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

Page 12: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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

Page 13: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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

Page 14: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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\...

Page 15: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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)

Page 16: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

Message Schema ClientsMessage Schema Clients

OutlookOutlook ExpressHotmailExchangeIMFax ServerPhone Server

OutlookOutlook ExpressHotmailExchangeIMFax ServerPhone Server

Page 17: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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]>”

Page 18: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

Message Schema Version 2Message Schema Version 2Message

Subject :StringTimeSent :DateTimeTimeReceived :DateTimeIsRead :BooleanImportance :Integer…

Document

Document

Body

Attachment

Contact

Participant Type: From

ToCcBcc

Page 19: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

Contact schemaContact schemaContactFullName

TitleGivenNameMiddleNameSurnameSufffixNickName

EAddress [0..*]DisplayNameAddressStartDateEndDate

PostalAddress [..*]AddressLineAdministrativeDivisionCitySecondaryCityCountryRegionPostalCode

ImagePhoto

DocumentNotes

Page 20: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

Message SchemaMessage Schema

Message (Envelope)

Document

Document

Body

Attachment

ContactParticipantTypeDisplayNameAddressUsed

Email

Fax

Phone

IM

Outlook Extension

Page 21: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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

Page 22: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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

Page 23: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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);

}}

Page 24: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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();

Page 25: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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) {

...}

Page 26: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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"];}

Page 27: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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

Page 28: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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

Page 29: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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

Page 30: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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

Page 31: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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

Page 32: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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?

Page 33: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft

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

Page 34: WinFS: Product Development Experience Alexander Vaschillo Microsoft Alexander Vaschillo Microsoft