SlideShare a Scribd company logo
Sketch of the ZXFS
By @ZxMYS
http://www.slideshare.net/ZxMYS
What’s it
• ZXFS - Zhu Xiao’s File System
• A file system that satisfy all Ben’s
  requirements
• Similar to the design of the UNIX file
  system
• Implementable, Efficient and Simple
LAYERS

THE BASICS.
Layers in ZXFS
Layer                           Propose

Symbolic link layer             Integrate multiple file systems
                                with symbolic links.


High level scope (HLS) layer    Provide a root for the naming
                                                                   user-oriented names
                                hierarchies.


Scope layer                     Organize files into naming
                                hierarchies.
Tag layer                       Provide human-oriented tags for
                                                                  machine-user interface
                                files.
Inode Number layer              Provide machine-oriented names
                                for files.

                                                                  machine-oriented names
File layer                      Organize blocks into files.

Block layer                     Identify disk blocks.
Layers in ZXFS
Layer                           Propose
Due to compatible design in lower layers, we can take this layer directly.
Symbolic link layer             Integrate multiple file systems
                                with symbolic links.


High level scope (HLS) layer    Provide a root for the naming
                                                                   user-oriented names
                                hierarchies.


Scope layer                     Organize files into naming
                                hierarchies.
Tag layer                       Provide human-oriented tags for
                                                                  machine-user interface
                                files.
Inode Number layer              Provide machine-oriented names
                                for files.

                                                                  machine-oriented names
File layer                      Organize blocks into files.

Block layer                     Identify disk blocks.
Layers in ZXFS
Layer                           Propose

Symbolic link layer             Integrate multiple file systems
                                with symbolic links.
Mainly use these three layers to achieve the goal .
High level scope (HLS) layer    Provide a root for the naming
                                                                   user-oriented names
                                hierarchies.


Scope layer                     Organize files into naming
                                hierarchies.
Tag layer                       Provide human-oriented tags for
                                                                  machine-user interface
                                files.
Inode Number layer              Provide machine-oriented names
                                for files.

                                                                  machine-oriented names
File layer                      Organize blocks into files.

Block layer                     Identify disk blocks.
Layers in ZXFS
Layer                           Propose

Symbolic link layer             Integrate multiple file systems
                                with symbolic links.


High level scope (HLS) layer    Provide a root for the naming
                                                                   user-oriented names
                                hierarchies.


Scope layer                 Organize files into naming
                            hierarchies.
Tag layer                   Provide human-oriented tags for
Need some modification in implementation                          machine-user interface
                            files.
Inode Number layer          Provide machine-oriented names
                            for files.

                                                                  machine-oriented names
File layer                      Organize blocks into files.

Block layer                     Identify disk blocks.
Layers in ZXFS
Layer                           Propose

Symbolic link layer             Integrate multiple file systems
                                with symbolic links.


High level scope (HLS) layer    Provide a root for the naming
                                                                   user-oriented names
                                hierarchies.


Scope layer                     Organize files into naming
                                hierarchies.
Tag layer                       Provide human-oriented tags for
                                                                  machine-user interface
                                files.
Inode Number layer              Provide machine-oriented names
                                for files.
Take them directly
                                                                  machine-oriented names
File layer                      Organize blocks into files.

Block layer                     Identify disk blocks.
Layers in ZXFS - the Tag layer
• Definition:
Tag: Some (name, value) pairs attached to files
• All files are located (in the final step) by tags,
  thus the tag layer has similar functionality like
  old file name layer.
• A file can have multi-tags, but must has at
  least one tag, otherwise it should be deleted.
• Some traditional metadata, such as ctime,
  mime and atime, are dealt as file.
Layers in ZXFS - the Scope Layer
• Definition:
Scope: A set of something. In this layer we discuss
‘scope for file’, which is a set of files, and ‘scope for
tag’, a set of files tagged with a certain tag.
• Each tag has it’s scope.
• Use scopes to string (group) files, like directory.
• Scope can be static or dynamic. Can present them
   in memory.
• Device store scopes for all tags on that device.
Layers in ZXFS - the High Level Scope
              (HLS) Layer
• Definition:
HLS: ‘scope for scope’
• A set of scopes, providing root for scopes
• Like ‘/’ in traditional UNIX FS
• Each device has it’s scope. When system start
  up, system merge them into memory and get
  an overall HLS
Layers in ZXFS - Path Name Stimulating
           with these 3 layers
• To be more compatible with traditional UNIX
  FS and enable symbolic links.
• Consider following path:
/(mount point of ZXFS)/tag_expression1/tag_
expression2/...../tag_expressionN
• Tag Expression is some expression used to
  locate file using tag, like SQL or XPath
• latter N-1 ‘/’ perform AND logic here
Layers in ZXFS - Path Name Stimulating
           with these 3 layers
• Example
/mnt/zxfs1/`ctime` greater than #2011-4-19#/`atime`
equal to #2011-4-20#/
• Looks strange but can work
• Resulting in a scope contains all files have tag ctime
  and atime satisfying the expression
• If this scope has multiple files, return a directory (or
  something like it)
• Else, return the file or null
• NOTE: THE DESIGN OF TAG EXPRESSION IS NOT A PART
  OF THE DESIGN OF ZXFS. SO ONLY MENTION IT HERE.
EXAMPLE LAYER IMPLEMENTATION
LET’S CALL IT ZXFS 0.1
Sketch
Sketch




Stored in disk
exactly like file data
Basic Knowledge – B+ tree
• a B+ tree or B plus tree is a type of tree which
  represents sorted data in a way that allows for
  efficient insertion, retrieval and removal of
  records
• The primary value of a B+ tree is in storing data
  for efficient retrieval in a block-oriented storage
  context—in particular, file systems. Because it can
  reduce the number of I/O operations required to
  find an element in the tree.
Basic Data Structure - inode
struct inode
     integer type, refcnt, filesize, userid, groupid, mode //type = FILE_TYPE or SCOPE_TYPE
     integer block_numbers_for_file[N]                  //blocks used to save file
     union
          struct
                    integer tagsize                     //size of the tags
                    integer block_numbers_for_tags[M-1]      //if type==FILE_TYPE. blocks used to
                                                             //save tags for this file
          integer rest_block_numbers_for_file[M] //if type== SCOPE_TYPE or other type that have no
                                                   //tags, the rest space of this inode block can be
                                                   //used to store more inode number for files



Change inode structure into this, to implement tags and scopes
Basic Data Structure – tag_data

struct tag_data
     integer size                      //indicate the size of this tag_data
     integer inode_number_for_scope //pointer to the scope fot this tag
     string tag_value


  Every file has a B+ tree, in which
  (key, value)=(tag name, tag_data)
  And this B+ tree is called tag data of this file
Basic Data Structure – scope_data

struct scope_data
          string tag_name     //tag name of this scope
          B_plus_tree files   //B+ tree which store info about file tagged with this tag


 The scope_data represent scope.
 B+ tree here has
 (key, value) = (tag value, file inode number)
 (in device)
 or
 (key, value) = (tag value, (deviceID, file inode number))
 (in memory)
Basic Data Structure
HLS is a B+ tree with
(key, value) = (tag name, inode of scope for that tag)
(in device)
Or
(key, value) = (tag name, (deviceID, inode in that device of
scope for that tag))
(in memory)
Sketch, again
THE ZXFS API

VERY EASY IF YOU HAVE A NICE LAYER DESIGN
Outline Of API
• Most UNIX API can be implemented on ZXFS
• ALL Ben’s API can be implemented on ZXFS
Part of API description table
API                                            description
search(device ID, tag name list, destination   Search for files that have tagged with given tag. Device ID=0 indicates
scope ID)                                      overall HLS of system
search(device ID or scope ID, tag expression   Search for files satisfying given tag expressions. ID=0 indicates overall
list, destination scope ID)                    HLS of system
create(device ID)                              Return a file ID for a new file on given device.
delete(device ID, file ID)                     Remove all tags on that file, and delete that file.
read/write (device ID, file ID, offset, buf,   Read/Write file
length)
list(scope ID)                                 Returns a list of (device ID, file ID) tuples for files in that scope.
                                               Implement by Iterating B+ tree.
mkscope()                                      Creates an empty scope and return it’s ID. Only for scopes in memory.
merge_scope(source scope ID, destination       Merge two scopes. Destination scope can only be in memory
scope ID)
tag_add/tag_remove (device ID, file ID, tag    Add/Remove tag on a file.
name)
tag_get(device ID, file ID)                    List all tags on that file. Implement by reading tagdata of that file.
get_ HLS (device ID)                           Get HLS. When the device ID is 0, get the system (overall) HLS
device_list()                                  Returns the list of currently plugged-in devices
Some Of API Implementation under
               ZXFS 0.1
• SEARCH (TAG NAME LIST)
Just do search on B+ tree of HLS. If user gives a
device ID, use HLS of that tag

• SEARCH (TAG EXPRESSION)
Use a tag expression interpreter to interpret the
expression first, and then do search on HLS, find
corresponding scopes for tags, do another search
on them. Still, the search is performed on B+ tree
(thus very quick)
Some Of API Implementation under
               ZXFS 0.1
• CREATE
Just find an empty inode and tag it with basic
tags like atime/ctime and mtime, update
corresponding scopes

• DELETE
Call tag_remove to remove all tags on that file.
The last remove action will cause the file be
removed.
Some Of API Implementation under
               ZXFS 0.1
• TAG_ADD/TAG_REMOVE

By changing tag data of that file and update
corresponding scope (including HLS if necessary).
If a new tag name is introduced, make a new
scope for it on the device. If all tag of a file is
removed, remove that file.
ANALYSIS


THE TIME TO CHECK UP
Performance?
• The performance can’t be very bad since we
  use B+ tree for searching, creating or
  removing tag.
• Tag data has pointers back to scope, so
  updating tag_value or the removal of a tag is
  fast.
A Trade-off
• If we want to change a tag’s name, all file
  tagged with that must be modified as well as
  some coherence should be considered.
• However, put tag name inside tag data enable
  us to find a certain tag quickly.
• We assume that finding a tag for a file
  happens more often than changing name of a
  tag.
Another Trade-off
• Storing tag name in every tag data require large
  space.
  – Assume user will NOT use long tag name for many
    files.
• B+ tree is very large, comparing to other data
  structure, in memory.
• Duplicate pointers to file in scopes for
  ctime/mtime/atime, etc.

SOLUTION: ZXFS prefer time to space!
OTHER THINGS


MAYBE WE HAVE FORGOTTEN SOMETHING?
The practicability of tag-based FS
• If the user is hardworking in adding tags for
  files, It’s OK.
• What if user is lazy?
  – We need advanced AI to help, or do it by itself, to
    add tags for files, according to the content of that
    file.
  – In near future? Maybe.
THE END


DO YOU HAVE QUESTIONS?

More Related Content

What's hot

File system
File systemFile system
File system
Mohd Arif
 
11. dfs
11. dfs11. dfs
Unix File System
Unix File SystemUnix File System
Unix File System
student(MCA)
 
5231 140-hellwig
5231 140-hellwig5231 140-hellwig
5231 140-hellwig
sprdd
 
Xfs file system for linux
Xfs file system for linuxXfs file system for linux
Xfs file system for linux
Ajay Sood
 
Ch11 file system implementation
Ch11 file system implementationCh11 file system implementation
Ch11 file system implementation
Abdullah Al Shiam
 
ITFT_File system interface in Operating System
ITFT_File system interface in Operating SystemITFT_File system interface in Operating System
ITFT_File system interface in Operating System
Sneh Prabha
 
OSCh11
OSCh11OSCh11
Unix training session 1
Unix training   session 1Unix training   session 1
Unix training session 1
Anil Kumar Kapil,PMP®
 
Sunadmin
SunadminSunadmin
File system interface Pre Final
File system interface Pre FinalFile system interface Pre Final
File system interface Pre Final
marangburu42
 
Types of files
Types of filesTypes of files
Types of files
Amar Jukuntla
 
Ch10 file system interface
Ch10   file system interfaceCh10   file system interface
Ch10 file system interface
Welly Dian Astika
 
directory structure and file system mounting
directory structure and file system mountingdirectory structure and file system mounting
directory structure and file system mounting
rajshreemuthiah
 
File management
File managementFile management
File management
Mohd Arif
 
Java Coding Conventions
Java Coding ConventionsJava Coding Conventions
Java Coding Conventions
Rodel Barcenas
 
Operating Systems - Implementing File Systems
Operating Systems - Implementing File SystemsOperating Systems - Implementing File Systems
Operating Systems - Implementing File Systems
Mukesh Chinta
 
Ch01
Ch01Ch01

What's hot (18)

File system
File systemFile system
File system
 
11. dfs
11. dfs11. dfs
11. dfs
 
Unix File System
Unix File SystemUnix File System
Unix File System
 
5231 140-hellwig
5231 140-hellwig5231 140-hellwig
5231 140-hellwig
 
Xfs file system for linux
Xfs file system for linuxXfs file system for linux
Xfs file system for linux
 
Ch11 file system implementation
Ch11 file system implementationCh11 file system implementation
Ch11 file system implementation
 
ITFT_File system interface in Operating System
ITFT_File system interface in Operating SystemITFT_File system interface in Operating System
ITFT_File system interface in Operating System
 
OSCh11
OSCh11OSCh11
OSCh11
 
Unix training session 1
Unix training   session 1Unix training   session 1
Unix training session 1
 
Sunadmin
SunadminSunadmin
Sunadmin
 
File system interface Pre Final
File system interface Pre FinalFile system interface Pre Final
File system interface Pre Final
 
Types of files
Types of filesTypes of files
Types of files
 
Ch10 file system interface
Ch10   file system interfaceCh10   file system interface
Ch10 file system interface
 
directory structure and file system mounting
directory structure and file system mountingdirectory structure and file system mounting
directory structure and file system mounting
 
File management
File managementFile management
File management
 
Java Coding Conventions
Java Coding ConventionsJava Coding Conventions
Java Coding Conventions
 
Operating Systems - Implementing File Systems
Operating Systems - Implementing File SystemsOperating Systems - Implementing File Systems
Operating Systems - Implementing File Systems
 
Ch01
Ch01Ch01
Ch01
 

Viewers also liked

Stay Anonymous app report
Stay Anonymous app reportStay Anonymous app report
Stay Anonymous app report
Zx MYS
 
Shopping buddy report
Shopping buddy reportShopping buddy report
Shopping buddy report
Zx MYS
 
中国愤青群体心理研究 Chinese FenQin(angry youth) mentality (Chinese)
中国愤青群体心理研究 Chinese FenQin(angry youth) mentality (Chinese)中国愤青群体心理研究 Chinese FenQin(angry youth) mentality (Chinese)
中国愤青群体心理研究 Chinese FenQin(angry youth) mentality (Chinese)
Zx MYS
 
xkcd viewer report
xkcd viewer reportxkcd viewer report
xkcd viewer report
Zx MYS
 
Hi tune sharing
Hi tune sharingHi tune sharing
Hi tune sharing
Zx MYS
 
Bookio report
Bookio reportBookio report
Bookio report
Zx MYS
 
Event Coordinator
Event CoordinatorEvent Coordinator
Event Coordinator
Zx MYS
 
Universal login
Universal loginUniversal login
Universal login
Zx MYS
 
a Google Glass app presentation
a Google Glass app presentationa Google Glass app presentation
a Google Glass app presentation
Zx MYS
 

Viewers also liked (9)

Stay Anonymous app report
Stay Anonymous app reportStay Anonymous app report
Stay Anonymous app report
 
Shopping buddy report
Shopping buddy reportShopping buddy report
Shopping buddy report
 
中国愤青群体心理研究 Chinese FenQin(angry youth) mentality (Chinese)
中国愤青群体心理研究 Chinese FenQin(angry youth) mentality (Chinese)中国愤青群体心理研究 Chinese FenQin(angry youth) mentality (Chinese)
中国愤青群体心理研究 Chinese FenQin(angry youth) mentality (Chinese)
 
xkcd viewer report
xkcd viewer reportxkcd viewer report
xkcd viewer report
 
Hi tune sharing
Hi tune sharingHi tune sharing
Hi tune sharing
 
Bookio report
Bookio reportBookio report
Bookio report
 
Event Coordinator
Event CoordinatorEvent Coordinator
Event Coordinator
 
Universal login
Universal loginUniversal login
Universal login
 
a Google Glass app presentation
a Google Glass app presentationa Google Glass app presentation
a Google Glass app presentation
 

Similar to Sketch of the ZXFS

File system interface
File system interfaceFile system interface
File system interface
Dayan Ahmed
 
Operating System
Operating SystemOperating System
Operating System
Subhasis Dash
 
OS_Ch11
OS_Ch11OS_Ch11
Ch11 OS
Ch11 OSCh11 OS
Ch11 OS
C.U
 
Unit 3 chapter 1-file management
Unit 3 chapter 1-file managementUnit 3 chapter 1-file management
Unit 3 chapter 1-file management
Kalai Selvi
 
SQLBits X SQL Server 2012 Rich Unstructured Data
SQLBits X SQL Server 2012 Rich Unstructured DataSQLBits X SQL Server 2012 Rich Unstructured Data
SQLBits X SQL Server 2012 Rich Unstructured Data
Michael Rys
 
file management_osnotes.ppt
file management_osnotes.pptfile management_osnotes.ppt
file management_osnotes.ppt
HelalMirzad
 
DFSNov1.pptx
DFSNov1.pptxDFSNov1.pptx
DFSNov1.pptx
EngrNabidRayhanKhale
 
ISUG 113: File stream
ISUG 113: File streamISUG 113: File stream
ISUG 113: File stream
sqlserver.co.il
 
prefix based labelling scheme for xml data
prefix based labelling scheme for xml dataprefix based labelling scheme for xml data
prefix based labelling scheme for xml data
akash1391
 
Namespace.pdf
Namespace.pdfNamespace.pdf
Namespace.pdf
João Manuel Correia
 
file management_part2_os_notes.ppt
file management_part2_os_notes.pptfile management_part2_os_notes.ppt
file management_part2_os_notes.ppt
HelalMirzad
 
CH11.pdf
CH11.pdfCH11.pdf
CH11.pdf
ImranKhan880955
 
Linux 4 you
Linux 4 youLinux 4 you
Linux 4 you
Shashwat Shriparv
 
Chapter 8 distributed file systems
Chapter 8 distributed file systemsChapter 8 distributed file systems
Chapter 8 distributed file systems
AbDul ThaYyal
 
Unit 3 file management
Unit 3 file managementUnit 3 file management
Unit 3 file management
Kalai Selvi
 
SQL Server 2012 Beyond Relational Performance and Scale
SQL Server 2012 Beyond Relational Performance and ScaleSQL Server 2012 Beyond Relational Performance and Scale
SQL Server 2012 Beyond Relational Performance and Scale
Michael Rys
 
Microsoft's distributed file system
Microsoft's distributed file systemMicrosoft's distributed file system
Microsoft's distributed file system
SimranSharma215
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
Pratik Tambekar
 
Hadoop HDFS Architeture and Design
Hadoop HDFS Architeture and DesignHadoop HDFS Architeture and Design
Hadoop HDFS Architeture and Design
sudhakara st
 

Similar to Sketch of the ZXFS (20)

File system interface
File system interfaceFile system interface
File system interface
 
Operating System
Operating SystemOperating System
Operating System
 
OS_Ch11
OS_Ch11OS_Ch11
OS_Ch11
 
Ch11 OS
Ch11 OSCh11 OS
Ch11 OS
 
Unit 3 chapter 1-file management
Unit 3 chapter 1-file managementUnit 3 chapter 1-file management
Unit 3 chapter 1-file management
 
SQLBits X SQL Server 2012 Rich Unstructured Data
SQLBits X SQL Server 2012 Rich Unstructured DataSQLBits X SQL Server 2012 Rich Unstructured Data
SQLBits X SQL Server 2012 Rich Unstructured Data
 
file management_osnotes.ppt
file management_osnotes.pptfile management_osnotes.ppt
file management_osnotes.ppt
 
DFSNov1.pptx
DFSNov1.pptxDFSNov1.pptx
DFSNov1.pptx
 
ISUG 113: File stream
ISUG 113: File streamISUG 113: File stream
ISUG 113: File stream
 
prefix based labelling scheme for xml data
prefix based labelling scheme for xml dataprefix based labelling scheme for xml data
prefix based labelling scheme for xml data
 
Namespace.pdf
Namespace.pdfNamespace.pdf
Namespace.pdf
 
file management_part2_os_notes.ppt
file management_part2_os_notes.pptfile management_part2_os_notes.ppt
file management_part2_os_notes.ppt
 
CH11.pdf
CH11.pdfCH11.pdf
CH11.pdf
 
Linux 4 you
Linux 4 youLinux 4 you
Linux 4 you
 
Chapter 8 distributed file systems
Chapter 8 distributed file systemsChapter 8 distributed file systems
Chapter 8 distributed file systems
 
Unit 3 file management
Unit 3 file managementUnit 3 file management
Unit 3 file management
 
SQL Server 2012 Beyond Relational Performance and Scale
SQL Server 2012 Beyond Relational Performance and ScaleSQL Server 2012 Beyond Relational Performance and Scale
SQL Server 2012 Beyond Relational Performance and Scale
 
Microsoft's distributed file system
Microsoft's distributed file systemMicrosoft's distributed file system
Microsoft's distributed file system
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Hadoop HDFS Architeture and Design
Hadoop HDFS Architeture and DesignHadoop HDFS Architeture and Design
Hadoop HDFS Architeture and Design
 

More from Zx MYS

Camevent
CameventCamevent
Camevent
Zx MYS
 
iBoard presentation
iBoard presentationiBoard presentation
iBoard presentation
Zx MYS
 
Delicious – A Recipe Share App
Delicious – A Recipe Share AppDelicious – A Recipe Share App
Delicious – A Recipe Share App
Zx MYS
 
Oculus presentation
Oculus presentationOculus presentation
Oculus presentation
Zx MYS
 
Cloud-based smart classroom
Cloud-based smart classroomCloud-based smart classroom
Cloud-based smart classroom
Zx MYS
 
Carrier pigeon presentation
Carrier pigeon presentationCarrier pigeon presentation
Carrier pigeon presentation
Zx MYS
 
Columbia connect project rep
Columbia connect project repColumbia connect project rep
Columbia connect project rep
Zx MYS
 

More from Zx MYS (7)

Camevent
CameventCamevent
Camevent
 
iBoard presentation
iBoard presentationiBoard presentation
iBoard presentation
 
Delicious – A Recipe Share App
Delicious – A Recipe Share AppDelicious – A Recipe Share App
Delicious – A Recipe Share App
 
Oculus presentation
Oculus presentationOculus presentation
Oculus presentation
 
Cloud-based smart classroom
Cloud-based smart classroomCloud-based smart classroom
Cloud-based smart classroom
 
Carrier pigeon presentation
Carrier pigeon presentationCarrier pigeon presentation
Carrier pigeon presentation
 
Columbia connect project rep
Columbia connect project repColumbia connect project rep
Columbia connect project rep
 

Recently uploaded

Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 

Recently uploaded (20)

Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 

Sketch of the ZXFS

  • 1. Sketch of the ZXFS By @ZxMYS http://www.slideshare.net/ZxMYS
  • 2. What’s it • ZXFS - Zhu Xiao’s File System • A file system that satisfy all Ben’s requirements • Similar to the design of the UNIX file system • Implementable, Efficient and Simple
  • 4. Layers in ZXFS Layer Propose Symbolic link layer Integrate multiple file systems with symbolic links. High level scope (HLS) layer Provide a root for the naming user-oriented names hierarchies. Scope layer Organize files into naming hierarchies. Tag layer Provide human-oriented tags for machine-user interface files. Inode Number layer Provide machine-oriented names for files. machine-oriented names File layer Organize blocks into files. Block layer Identify disk blocks.
  • 5. Layers in ZXFS Layer Propose Due to compatible design in lower layers, we can take this layer directly. Symbolic link layer Integrate multiple file systems with symbolic links. High level scope (HLS) layer Provide a root for the naming user-oriented names hierarchies. Scope layer Organize files into naming hierarchies. Tag layer Provide human-oriented tags for machine-user interface files. Inode Number layer Provide machine-oriented names for files. machine-oriented names File layer Organize blocks into files. Block layer Identify disk blocks.
  • 6. Layers in ZXFS Layer Propose Symbolic link layer Integrate multiple file systems with symbolic links. Mainly use these three layers to achieve the goal . High level scope (HLS) layer Provide a root for the naming user-oriented names hierarchies. Scope layer Organize files into naming hierarchies. Tag layer Provide human-oriented tags for machine-user interface files. Inode Number layer Provide machine-oriented names for files. machine-oriented names File layer Organize blocks into files. Block layer Identify disk blocks.
  • 7. Layers in ZXFS Layer Propose Symbolic link layer Integrate multiple file systems with symbolic links. High level scope (HLS) layer Provide a root for the naming user-oriented names hierarchies. Scope layer Organize files into naming hierarchies. Tag layer Provide human-oriented tags for Need some modification in implementation machine-user interface files. Inode Number layer Provide machine-oriented names for files. machine-oriented names File layer Organize blocks into files. Block layer Identify disk blocks.
  • 8. Layers in ZXFS Layer Propose Symbolic link layer Integrate multiple file systems with symbolic links. High level scope (HLS) layer Provide a root for the naming user-oriented names hierarchies. Scope layer Organize files into naming hierarchies. Tag layer Provide human-oriented tags for machine-user interface files. Inode Number layer Provide machine-oriented names for files. Take them directly machine-oriented names File layer Organize blocks into files. Block layer Identify disk blocks.
  • 9. Layers in ZXFS - the Tag layer • Definition: Tag: Some (name, value) pairs attached to files • All files are located (in the final step) by tags, thus the tag layer has similar functionality like old file name layer. • A file can have multi-tags, but must has at least one tag, otherwise it should be deleted. • Some traditional metadata, such as ctime, mime and atime, are dealt as file.
  • 10. Layers in ZXFS - the Scope Layer • Definition: Scope: A set of something. In this layer we discuss ‘scope for file’, which is a set of files, and ‘scope for tag’, a set of files tagged with a certain tag. • Each tag has it’s scope. • Use scopes to string (group) files, like directory. • Scope can be static or dynamic. Can present them in memory. • Device store scopes for all tags on that device.
  • 11. Layers in ZXFS - the High Level Scope (HLS) Layer • Definition: HLS: ‘scope for scope’ • A set of scopes, providing root for scopes • Like ‘/’ in traditional UNIX FS • Each device has it’s scope. When system start up, system merge them into memory and get an overall HLS
  • 12. Layers in ZXFS - Path Name Stimulating with these 3 layers • To be more compatible with traditional UNIX FS and enable symbolic links. • Consider following path: /(mount point of ZXFS)/tag_expression1/tag_ expression2/...../tag_expressionN • Tag Expression is some expression used to locate file using tag, like SQL or XPath • latter N-1 ‘/’ perform AND logic here
  • 13. Layers in ZXFS - Path Name Stimulating with these 3 layers • Example /mnt/zxfs1/`ctime` greater than #2011-4-19#/`atime` equal to #2011-4-20#/ • Looks strange but can work • Resulting in a scope contains all files have tag ctime and atime satisfying the expression • If this scope has multiple files, return a directory (or something like it) • Else, return the file or null • NOTE: THE DESIGN OF TAG EXPRESSION IS NOT A PART OF THE DESIGN OF ZXFS. SO ONLY MENTION IT HERE.
  • 17. Basic Knowledge – B+ tree • a B+ tree or B plus tree is a type of tree which represents sorted data in a way that allows for efficient insertion, retrieval and removal of records • The primary value of a B+ tree is in storing data for efficient retrieval in a block-oriented storage context—in particular, file systems. Because it can reduce the number of I/O operations required to find an element in the tree.
  • 18. Basic Data Structure - inode struct inode integer type, refcnt, filesize, userid, groupid, mode //type = FILE_TYPE or SCOPE_TYPE integer block_numbers_for_file[N] //blocks used to save file union struct integer tagsize //size of the tags integer block_numbers_for_tags[M-1] //if type==FILE_TYPE. blocks used to //save tags for this file integer rest_block_numbers_for_file[M] //if type== SCOPE_TYPE or other type that have no //tags, the rest space of this inode block can be //used to store more inode number for files Change inode structure into this, to implement tags and scopes
  • 19. Basic Data Structure – tag_data struct tag_data integer size //indicate the size of this tag_data integer inode_number_for_scope //pointer to the scope fot this tag string tag_value Every file has a B+ tree, in which (key, value)=(tag name, tag_data) And this B+ tree is called tag data of this file
  • 20. Basic Data Structure – scope_data struct scope_data string tag_name //tag name of this scope B_plus_tree files //B+ tree which store info about file tagged with this tag The scope_data represent scope. B+ tree here has (key, value) = (tag value, file inode number) (in device) or (key, value) = (tag value, (deviceID, file inode number)) (in memory)
  • 21. Basic Data Structure HLS is a B+ tree with (key, value) = (tag name, inode of scope for that tag) (in device) Or (key, value) = (tag name, (deviceID, inode in that device of scope for that tag)) (in memory)
  • 23. THE ZXFS API VERY EASY IF YOU HAVE A NICE LAYER DESIGN
  • 24. Outline Of API • Most UNIX API can be implemented on ZXFS • ALL Ben’s API can be implemented on ZXFS
  • 25. Part of API description table API description search(device ID, tag name list, destination Search for files that have tagged with given tag. Device ID=0 indicates scope ID) overall HLS of system search(device ID or scope ID, tag expression Search for files satisfying given tag expressions. ID=0 indicates overall list, destination scope ID) HLS of system create(device ID) Return a file ID for a new file on given device. delete(device ID, file ID) Remove all tags on that file, and delete that file. read/write (device ID, file ID, offset, buf, Read/Write file length) list(scope ID) Returns a list of (device ID, file ID) tuples for files in that scope. Implement by Iterating B+ tree. mkscope() Creates an empty scope and return it’s ID. Only for scopes in memory. merge_scope(source scope ID, destination Merge two scopes. Destination scope can only be in memory scope ID) tag_add/tag_remove (device ID, file ID, tag Add/Remove tag on a file. name) tag_get(device ID, file ID) List all tags on that file. Implement by reading tagdata of that file. get_ HLS (device ID) Get HLS. When the device ID is 0, get the system (overall) HLS device_list() Returns the list of currently plugged-in devices
  • 26. Some Of API Implementation under ZXFS 0.1 • SEARCH (TAG NAME LIST) Just do search on B+ tree of HLS. If user gives a device ID, use HLS of that tag • SEARCH (TAG EXPRESSION) Use a tag expression interpreter to interpret the expression first, and then do search on HLS, find corresponding scopes for tags, do another search on them. Still, the search is performed on B+ tree (thus very quick)
  • 27. Some Of API Implementation under ZXFS 0.1 • CREATE Just find an empty inode and tag it with basic tags like atime/ctime and mtime, update corresponding scopes • DELETE Call tag_remove to remove all tags on that file. The last remove action will cause the file be removed.
  • 28. Some Of API Implementation under ZXFS 0.1 • TAG_ADD/TAG_REMOVE By changing tag data of that file and update corresponding scope (including HLS if necessary). If a new tag name is introduced, make a new scope for it on the device. If all tag of a file is removed, remove that file.
  • 30. Performance? • The performance can’t be very bad since we use B+ tree for searching, creating or removing tag. • Tag data has pointers back to scope, so updating tag_value or the removal of a tag is fast.
  • 31. A Trade-off • If we want to change a tag’s name, all file tagged with that must be modified as well as some coherence should be considered. • However, put tag name inside tag data enable us to find a certain tag quickly. • We assume that finding a tag for a file happens more often than changing name of a tag.
  • 32. Another Trade-off • Storing tag name in every tag data require large space. – Assume user will NOT use long tag name for many files. • B+ tree is very large, comparing to other data structure, in memory. • Duplicate pointers to file in scopes for ctime/mtime/atime, etc. SOLUTION: ZXFS prefer time to space!
  • 33. OTHER THINGS MAYBE WE HAVE FORGOTTEN SOMETHING?
  • 34. The practicability of tag-based FS • If the user is hardworking in adding tags for files, It’s OK. • What if user is lazy? – We need advanced AI to help, or do it by itself, to add tags for files, according to the content of that file. – In near future? Maybe.
  • 35. THE END DO YOU HAVE QUESTIONS?