Download presentation
Presentation is loading. Please wait.
Published byDortha Stanley Modified over 9 years ago
1
WinFS – Future Technologies Damir Dobric DAENET http://developers.de/blogs/damir_dobric/default.aspx
2
Sponzori
4
Sadržaj predavanja WInFS history and Motivation WinFS Data model WinFS Type System Item Lifetime Item Extensions Item Relations Future of WinFS Q&A
5
History of WinFS Started in the early 1990s. Dubbed Object File System (OFS) it was supposed to be included as part of Cairo. Cairo Later during the development of COM, a storage system COM Called Storage+, Based on then-upcoming SQL Server 8.0, Relational File System, was conceived to be launched with SQL Server 2000, but as SQL Server 2000 ended up being a minor upgrade to SQL Server 7.0, RFS On August 29, 2005, Microsoft quietly made Beta 1 August 292005August 292005 Available to MSDN subscribers. It worked on Windows XP Windows XPWindows XP It was refreshed on December 1, 2005 to be compatible with version 2.0 of the.NET Framework. December 12005December 12005
6
WinFS Motivation Unify Structured – DB Semi-structured - XML Unstructured – Flat file Organize Think beyond the rigid hierarchy of the traditional folder model Explore Efficient exploration of information, powerful queries Innovate. New data platform for application developers
7
What is WinFS? Active Storage Platform Active storage platform for organizing, searching, and sharing all kinds of information Rich data model on the top of a relational storage engine Flexible programming model – WinFS API File System For file-based data (text documents, audio tracks, video clips..) Efficient indexing and streaming capabilities
8
Some key points Traditional DB -> Relational data Traditional Fileystems: Three WinFS -> Directed Acyclic Graph (DAG) WinFS -> HighLevel database
9
WinFS - Data Model SchemasTypesItemsAttributesFragmentsExtensionsAssociations Item Attr1Attr2Attr N relationship Item Attr1Attr2Attr N Item Attr1Attr2Attr N
10
Organization of the data By types and attributes Predefined Types (Person, Contact, Document,..) Custom Types (Type Definition Language) By Relationship (Item Associations) Containment Relationships Links Sharing of common values By grouping in categories
11
Type Definition Language XML Vocabulary...
12
Types in WinFS Scalar Types Enumeration Types Inline Types I.e. FullName Entity Types ItemLinkItemFragment Set of other types Extensions
13
Type System - Examples WinFSCLR type String BinaryByte[] Boolean Byte Int16 Int32 Int64 Single Double Decimal DateTime Guid
14
WinFS Item Item is the smallest unit of data Imagine Item as a vector Item is strongly typed Item is a root in the hierarchy Item is abstract class: public abstract class Item : Entity
15
Currently defined items ClassDescription Audio.RadioStationRepresents a radio station that may provide streams of radio. RadioStreamsRepresents a radio stream that a radio station provides. ScheduleA collection of events, appointments, or meetings associated with a user. ScheduleEntryAn item that records the occurrence of something in the environment. ContactRepresents either an organization or a person OpaqueItemRepresents the opaque binary data. DocumentAn item that represents content that is authored FolderA Folder item is a container of items.. GenericFileRepresents a generic file item. DocumentRepresents audio documents, such as tracks and albums. MessageRepresents any message in the system. RuleAn abstract base class for all "WinFS" rule objects. ShareRepresents information about a "WinFS" share. StoreInfoRepresents information about a "WinFS" store. Sync.ConflictProvides custom methods for the conflict object NonSynchronizedItemAll item types deriving from this type and all entities located below this item Video.VideoClipRepresents a video clip.
16
Life time of an Item public static void CreateItem() { using (WinFSData store = new WinFSData()) { Document doc1 = new Document(); doc1.DisplayName = "docX"; Document doc2 = new Document(); doc2.DisplayName = "docX"; Folder root = store.GetRootItem() as Folder; root.Children.Add(doc1); root.Children.Add(doc2); store.SaveChanges(); }
17
DEMO: Item Lifetime
18
Item Extensions public void AppendKeyword(string keyWord) { Folder folder = store.Items.FilterByType (). Filter("DisplayName == 'ExtensionHandling'"). GetFirst(); Document doc = new Document(folder); doc.NamespaceName = "KeyWordTest.doc"; doc.DisplayName = "KeyWordTest"; doc.Title = "Daenet Keyword Test"; Keyword keyW = new Keyword(keyWord); ItemKeywords kwds = new ItemKeywords(); kwds.Keywords.Add(keyW); doc.Extensions.Add(kwds); store.SaveChanges(); } string filterExpression = "Exists(Extensions.FilterByType(@0).Filter(Exists(Keywords.Filter(Value==@1))))";
19
DEMO: Item Extensions
20
Item Relations Links Relation between Entities Defined by Source and Target Link is physical construct in store Associations Entity based (Links) None Entity based Association is not a physical construct in store API generator creates Helper class
21
Links System.Object System.Storage.StoreObject System.Storage.Entity System.Storage.Link System.Storage.Calendar.ScheduledEntryLink System.Storage.FolderToStoreInfoLink System.Storage.Messages.AttachmentLink System.Storage.Video.Clips System.Storage.StoreObjectSystem.Storage.EntitySystem.Storage.Calendar.ScheduledEntryLinkSystem.Storage.FolderToStoreInfoLinkSystem.Storage.Messages.AttachmentLinkSystem.Storage.Video.ClipsSystem.Storage.StoreObjectSystem.Storage.EntitySystem.Storage.Calendar.ScheduledEntryLinkSystem.Storage.FolderToStoreInfoLinkSystem.Storage.Messages.AttachmentLinkSystem.Storage.Video.Clips Item 1 Attr1Attr2Attr N Link Item 2 Attr1Attr2Attr N
22
Linking of items public void CreateDocumentsAndRelations() { // Create documents and one message. Document document1 = new Document(folder); Message message = new Message(folder); document1.DisplayName = "Document1"; document1.NamespaceName = "Document1"; message.DisplayName = "Message1"; message.NamespaceName = "Message1"; // Create the link. AttachmentLink link1 = new AttachmentLink(message, document1); store.SaveChanges(); }
23
Searching for Links StorageSearcher linkSearcher = store.Links.FilterByType ().Filter("Exists(Target.NamespaceName like '@0')", "Document%)"); foreach (AttachmentLink l in linkSearcher) { if (l.Source != null && l.Target != null) { Console.WriteLine(l.Target.NamespaceName + " - " + l.Source.NamespaceName); }
24
DEMO: Linking of items
25
API Generator Three entities: Link, Source and Target LinkRelation Helper Class Entity Based Associations GetLinksGivenSource Finds all links associated with a single source item. This method is not CLS-compliant. GetLinksGivenSourcesFinds all links associated with a collection of sources. This method is not CLS-compliant. GetLinksGivenTargetFinds all links associated with a single target. This method is not CLS-compliant. GetLinksGivenTargetsFinds all links associated with a collection of targets. This method is not CLS-compliant. GetSourcesGivenLinksFinds all sources associated with a collection of links. This method is not CLS-compliant. GetSourcesGivenTargetFinds all sources associated with a single target. This method is not CLS-compliant. GetSourcesGivenTargetsFinds all sources associated with a collection of targets. This method is not CLS-compliant. GetTargetsGivenLinksFinds all targets associated with a collection of links. This method is not CLS-compliant. GetTargetsGivenSourceFinds all targets associated with a single source. This method is not CLS-compliant. GetTargetsGivenSourcesFinds all targets associated with a collection of sources. This method is not CLS-compliant.
26
None Entity Based Associations None Entity Based Associations UserTask PrimaryTask = new UserTask(); PrimaryTask.DisplayName = "Birthday UserTask"; PrimaryTask.NamespaceName = "Birthday UserTask"; PrimaryTask.CorrelationId = new CorrelationId("PrimaryTaskId"); exampleFolder.Children.Add(PrimaryTask); UserTask SubTask1 = new UserTask(); SubTask1.DisplayName = "Arrange Hall"; SubTask1.NamespaceName = "Arrange Hall"; SubTask1.TaskParentTask = new CorrelationId("PrimaryTaskId"); exampleFolder.Children.Add(SubTask1); StorageSearcher ParentTaskSearcher = TaskParentTasks.GetParentTasksGivenTask(t);
27
WinFS Services RsFxSvc.Exe, RsFxDrv.Sys C:\RsFxName\MachineName\DefaultStore Coordinate file services E.g.: >pushd WinFS.exe C:\System Volume Information\WinFS\{15836D96- 5B44-4DB9-AD69-3C76B99C8571}\ \Database.mdf\Database.ldf WinFS Search service WinFS File Promotion manager WinFS Sync WinFS Rule Engine
28
WinFS Architecture
29
WinFS vs. NTFS? Relational Storage Engine Expanded to stores streams Called: File Backed Items WinFS works with Item only Win32 API works with streams only MetadataServices keeps consistency (stream item) Promotion, Demotion
30
NTFS File Sparsing HANDLE hFile = ::CreateFile("file.dat:alt",... ::DeleteFile("file.dat:alt"); >echo "alternative stream" > SparseMainStream.txt:AltStream.Txt >notepad SparseMainStream.txt:AltStream.Txt
31
DEMO: Copy a File Between NTFS and WinFS
32
WinFS Performance foreach (Person person in peopleSearcher) { // Avoid such queries ! foreach (ContactCard card in person.ContactCards) { Console.WriteLine(" " + card.Label); } StorageSearcher searcher = wData.Items.FilterByType ().Filter( "Container.ItemId = @0", exampleFolder.ItemId).Project("it as Person, ContactCards as ContactCards"); foreach (StorageRecord record in searcher) { Person person = (Person)record["Person"]; IList contactCards = (IList )record["ContactCards"]; foreach (ContactCard card in contactCards) { Console.WriteLine(" " + card.Label); }
33
Future of WinFS WinFS Beta 2 is planned for May 1, 2006. May 12006May 12006 It will include integration with Windows Desktop Search, Windows Desktop SearchWindows Desktop Search It will also include integration with ADO.NET API. ADO.NET A third Beta is scheduled for November 2006. November2006November2006 The final release is not likely to be available until late 2007. It is not clear at this time whether the final release of WinFS will be included with Windows Server "Longhorn" or not. Windows Server "Longhorn"Windows Server "Longhorn"
34
www.daenet.de www.daenet.ba Damir Dobric Blog: http://developers.de/blogs/damir_dobric/default.aspxhttp://developers.de/blogs/damir_dobric/default.aspx DAENET team blog: http://Developers.dehttp://Developers.de Job at DAENET: http://homepage.daenet.de/portal/templates/jobmail.htmhttp://homepage.daenet.de/portal/templates/jobmail.htm Damir Dobric DAENET GmbH www.daenet.de mailto:ddobric@daenet.de
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.