WinFS - PowerPoint PPT Presentation

1 / 34
About This Presentation
Title:

WinFS

Description:

Represents a radio stream that a radio station provides. RadioStreams ... Blog: http://developers.de/blogs/damir_dobric/default.aspx. DAENET team blog: http: ... – PowerPoint PPT presentation

Number of Views:71
Avg rating:3.0/5.0
Slides: 35
Provided by: devel9
Category:
Tags: winfs

less

Transcript and Presenter's Notes

Title: WinFS


1
WinFS Future Technologies
  • Damir Dobric
  • DAENET
  • http//developers.de/blogs/damir_dobric/default.as
    px

2
Sponzori
3
(No Transcript)
4
Sadržaj predavanja
  • WInFS history and Motivation
  • WinFS Data model
  • WinFS Type System
  • Item Lifetime
  • Item Extensions
  • Item Relations
  • Future of WinFS
  • QA

5
History of WinFS
  • Started in the early 1990s.
  • Dubbed Object File System (OFS)
  • it was supposed to be included as part of Cairo.
  • Later during the development of COM, a storage
    system
  • 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
  • Available to MSDN subscribers.
  • It worked on Windows XP
  • It was refreshed on December 1, 2005 to be
    compatible with version 2.0 of the .NET
    Framework.

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 -gt Relational data
  • Traditional Fileystems Three
  • WinFS -gt Directed Acyclic Graph (DAG)
  • WinFS -gt HighLevel database

9
WinFS - Data Model
  • Schemas
  • Types
  • Items
  • Attributes
  • Fragments
  • Extensions
  • Associations

Item
Attr1
Attr2
Attr N
relationship
Item
Item
Attr1
Attr2
Attr N
Attr1
Attr2
Attr 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

lt?xml version"1.0"?gt ltSchema Version"0.2.0"
Alias"Contacts" Namespace "System.Storage.Con
tactsxmlns"http//schemas.micr osoft.com/winfs/2
003/09/schema" gt ltUsing Version"0.1"
Alias"WinFS" Namespace"System.Storage" /gt
ltUsing Version"0.1" Alias"Core"
Namespace"System.Storage.Core" /gt ltEntityType
Name"Contact" BaseType"WinFS.Item" gt ltProperty
Name"EAddresses" Type"Array(Core.EAddress)"
Nullable"true" ChangeUnit"EAddressesCu"gt
lt/Propertygt ...
12
Types in WinFS
  • Scalar Types
  • Enumeration Types
  • Inline Types
  • I.e. FullName
  • Entity Types
  • Item
  • Link
  • ItemFragment
  • Set of other types
  • Extensions

13
Type System - Examples
WinFS CLR type
String String
Binary Byte
Boolean Boolean
Byte Byte
Int16 Int16
Int32 Int32
Int64 Int64
Single Single
Double Double
Decimal Decimal
DateTime DateTime
Guid 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
Class Description
Audio.RadioStation Represents a radio station that may provide streams of radio.
RadioStreams Represents a radio stream that a radio station provides.
Schedule A collection of events, appointments, or meetings associated with a user.
ScheduleEntry An item that records the occurrence of something in the environment.
Contact Represents either an organization or a person
OpaqueItem Represents the opaque binary data.
Document An item that represents content that is authored
Folder A Folder item is a container of items..
GenericFile Represents a generic file item.
Document Represents audio documents, such as tracks and albums.
Message Represents any message in the system.
Rule An abstract base class for all "WinFS" rule objects.
Share Represents information about a "WinFS" share.
StoreInfo Represents information about a "WinFS" store.
Sync.Conflict Provides custom methods for the conflict object
NonSynchronizedItem All item types deriving from this type and all entities located below this item
Video.VideoClip Represents 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.FilterByTypeltFol
dergt(). 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.Filt
erByType(_at_0).Filter(Exists(Keywords.Filter(Value
_at_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
Item 1
Attr1
Attr2
Attr N
Link
Item 2
Attr1
Attr2
Attr N
  • System.Object    System.Storage.StoreObject
         System.Storage.Entity       System.Storage.
    Link         System.Storage.Calendar.ScheduledEnt
    ryLink          System.Storage.FolderToStoreInfoL
    ink          System.Storage.Messages.AttachmentLi
    nk          System.Storage.Video.Clips

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(messag
e, document1) store.SaveChanges()

23
Searching for Links
StorageSearcherltAttachmentLinkgt linkSearcher
store.Links .FilterByTypeltAttachme
ntLinkgt() .Filter("Exists(Target.N
amespaceName like '_at_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
Entity Based Associations
GetLinksGivenSource Finds all links associated with a single source item. This method is not CLS-compliant.
GetLinksGivenSources Finds all links associated with a collection of sources. This method is not CLS-compliant.
GetLinksGivenTarget Finds all links associated with a single target. This method is not CLS-compliant.
GetLinksGivenTargets Finds all links associated with a collection of targets. This method is not CLS-compliant.
GetSourcesGivenLinks Finds all sources associated with a collection of links. This method is not CLS-compliant.
GetSourcesGivenTarget Finds all sources associated with a single target. This method is not CLS-compliant.
GetSourcesGivenTargets Finds all sources associated with a collection of targets. This method is not CLS-compliant.
GetTargetsGivenLinks Finds all targets associated with a collection of links. This method is not CLS-compliant.
GetTargetsGivenSource Finds all targets associated with a single source. This method is not CLS-compliant.
GetTargetsGivenSources Finds all targets associated with a collection of sources. This method is not CLS-compliant.
  • API Generator
  • Three entities Link, Source and Target
  • LinkRelation Helper Class

26
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)
StorageSearcherltUserTaskgt ParentTaskSearcher
TaskParentTasks.GetParentTasksGivenTask(t)
27
WinFS Services
  • RsFxSvc.Exe, RsFxDrv.Sys
  • C\RsFxName\MachineName\DefaultStore
  • Coordinate file services
  • E.g. gtpushd
  • 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 lt-gt
    item)
  • Promotion, Demotion

30
NTFS File Sparsing
  • HANDLE hFile CreateFile("file.datalt", ...
  • DeleteFile("file.datalt")

gtecho "alternative stream" gt SparseMainStream.txt
AltStream.Txt gtnotepad SparseMainStream.txtAltS
tream.Txt
31
DEMO Copy a File Between NTFS and WinFS
32
WinFS Performance
StorageSearcherltStorageRecordgt searcher
wData.Items.FilterByTypeltPersongt() .Filter(
"Container.ItemId _at_0", exampleFolder.ItemId) .Pr
oject("it as Person, ContactCards as
ContactCards") foreach (StorageRecord record in
searcher) Person person
(Person)record"Person" IListltContactCardgt
contactCards (IListltContactCardgt)record"Con
tactCards" foreach (ContactCard card in
contactCards) Console.WriteLine(" "
card.Label)
foreach (Person person in peopleSearcher) //
Avoid such queries ! foreach (ContactCard card
in person.ContactCards)
Console.WriteLine(" " card.Label)
33
Future of WinFS
  • WinFS Beta 2 is planned for May 1, 2006.
  • It will include integration with Windows Desktop
    Search,
  • It will also include integration with ADO.NET
    API.
  • A third Beta is scheduled for November 2006.
  • 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.

34
  • www.daenet.de
  • www.daenet.ba
  • Damir Dobric Blog http//developers.de/blogs/dami
    r_dobric/default.aspx
  • DAENET team blog http//Developers.de
  • Job at DAENET http//homepage.daenet.de/portal/te
    mplates/jobmail.htm

Damir Dobric DAENET GmbH www.daenet.de mailtoddob
ric_at_daenet.de
Write a Comment
User Comments (0)
About PowerShow.com