SlideShare a Scribd company logo
1 of 20
Download to read offline
RaleighFS | RaleighDB
A bs tra c t   St o rag e   La ye r
What is a File-Systems
Is a Method of storing and organizing data
    to make it easy to find and access.




...to interact with an object
  You name it, and you say
      what you want it do.



  The Filesystem takes the name you give
  Looks through disk to find the object
  Gives the object your request to do
  something.
                                           Image taken from namesys Reiser4
What is a File-Systems



On Disk Format (...serialized struct)
ext2, ext3, reiserfs, btrfs...


Namespace
(Mapping between name and content)
/home/th30z/, /usr/local/share/test.c, ...


Runtime Service: open(), read(), write(), ...
...A bit of History

Multics 1965 (File-System Paper)
A General-Purpose File System For Secondary Storage
Unix Late 1969
Sun Microsystem 1984
2010 ...Till Now, no significant changes
                                              User Program

                  User Space

                 Kernel Space

                                          System Call Layer


                                   Vnode/VFS Layer

                                FS 1   FS 2    FS 3   FS 4   ...   FS N
The File-System
 A file is something that tries                       creat(path, mode)
 to look like a sequence of bytes.
                                                      open(path, flags)
      You can read the bytes, and write the bytes.


  pread(fd, buffer, nbytes, offset)                        You can specify what byte
                                                          to start to read/write from,
pwrite(fd, buffer, nbytes, offset)                   and the number of bytes to read/write.



 Cutting bytes out of the middle                          ftruncate(fd, length)
 or the beginning of a file,
 and inserting bytes into the middle of a file,
 are not permitted!
                                                           Metadata   (ctime, mtime, mode, ...)
                                                                           (Block Pointers)

                                     (Data Blocks)
Decompose a File-System
Semantic Layer
    User Request
                                            ...to interact with an object
                                               You name it, and you say
      Resolve
     Semantic Layer                                what you want it do.
  (Path/Query to Key)



                                   For the end user this name has a meaning and this
  Lookup Key                       meaning should be captured by the Semantic Layer,
                                  while the rest of the Storage Layer is not interested
                                                           in the meaning of the name.
     Metadata                    User defined name has generally a variable length and
     Semantic Layer
Lookup Metadata from Key            tends to be verbose, while the storage layer needs
                             something fixed size and short, to ensure a quick lookup.
                           To do this, objects names are converted in keys that can be
Object Pointer              a simple hash of the name or something more elaborated.
for Read/Write
   Requests
Semantic Layer
    User Request



      Resolve                 The semantic layer takes names
     Semantic Layer
  (Path/Query to Key)          and converts them into keys,

                                the Storage Layer take keys
  Lookup Key
                                   and finds the objects

     Metadata
     Semantic Layer
                                                     Operations
Lookup Metadata from Key
                                    create(): Create a new object, Unix place this object in
                                              parent directory object, Set Unix Stat, ...
                                    open():   Open specified object.
                                    lookup(): Lookup Key of specified object.

Object Pointer                      move(): Change name or location of specified object.

for Read/Write                      unlink(): specified object, Unix remove this object
                                               from parent directory object.
   Requests
Semantic Layer
            unix      Seman ti c


root ‘/’ is the entry point

                              Every object
                         must be in one directory


                                Parse Object Name
                              traverse each directory
                                 check permission
                                    and open it.
Semantic Layer
                               Flat                  S emant ic


                                                     Same Level
                                                 for every Objects
                     No Directory                            No forced Hierarchy
                      Traversal                                    open(‘mytable’)
            Lookup item                                      open(‘office-documents/stats’)
            just by name

                                                                  A B+Tree can be used
                                                                   to map Object Key
                                                                     to its Metadata
Root node     Internal nodes   Leaf nodes (Stat/Meta data)
Object Layer
  An object
   contains           Different Data                      Mimic
  your data            Types have                   Languages Types
                         different                   set, dict, list, ...
                      methods and
                           needs

  Log Object (Append Only)                      Operations
   KV Object (Hashtable)         create():   Initialize object data structure for creation.
                                 open():     Initialize object data structure for open.
  Set Object (Think at Dirs)     close():    Uninitialize object data structure.

Flow Object (Write Anywhere)     read():
                                 write():
                                             Read specified object data.
                                             Write specified data to object.

Table Object (Database Table)    append():
                                 remove():
                                             Append Data to object.
                                             Remove specified data from object.

  Record Object (C Struct)       truncate(): Truncate or extend object to specified length.
                                 inject():   Inject block data to a specified object.
              ...                chop():     Remove block data from specified object.
Flow Object
Extent list,
Pointers to data...                         Insert/Remove
                                          Block Every-Where


 •   read(offset, length)

 •   write(offset, length)
                                    Like a regular ‘80s file
 •   inject(offset, length)
                                   but with more flexibility
 •   remove(offset, length)

 •   truncate(size)
Dir Object
Pages list,
Object Names...                                               Keep track
                      Object-A
                                               Object-A
                                                           of objects stored
                      Object-B
                      Object-C                 Object-X
                         ...     table/users   Object-Y

                                                               (names)
                                 table/addrs   Object-Z
                                      ...         ...




 •   read(index, n)
                                                       Semantic Layer
 •   append(name)
                                                      doesn’t guarantee
 •   remove(index)                                 to keep Objects Names
 •   remove(name)



              Wait! Wait! Dir Object is just a Set!
RecNo Object
Extent Record list,
Pointers to data...                       Insert/Remove
                                       Record Every-Where


 •   read(recno)
                                   Like Flow Object
 •   write(recno)                 but with a fixed size
 •   inject(recno)               user defined structure
 •   remove(recno)

 •   truncate(n)        Metadata keep tract
                       fields sizes and names
Device Layer
Where data is Stored?
              Memory                                                 Block Allocation
             Disk (Raid?)                                                 Bitmap
           Somewhere (DFS)                                                Extents?
                                                          Blocks
                                                          Fixed Size
                                                         Variable Size

                Operations
alloc():   Allocate a block (touch bitmap/space-map)
                                                               Different Layout
dealloc(): Deallocate a block (touch bitmap/space-map)
                                                                  for different types
read():    Read some data from disk
write():   Write data on disk
                                                               for different workloads
insert(): Insert Key/Value to the B+Tree
remove(): Remove Key/Value from the B+Tree
lookup(): Retrive Key Value from the B+Tree
Device Layer
         kee p            tr ac k              o f          Bl o ck s

    What do you need?
Small Variable Size Files (B+Tree)
Large Variable Size Files (Extents)




                                     Best case              Worst case                  ‘Normal’ case
                                     Contiguous             One block                    Large or Tail

                                   Root node      Internal nodes   Extent nodes   Raw Data (leaf/blob)



                (Block Pointers)
                                   Choose your Block
                                     4k, 16k, 64M
       (Data Blocks)
Device Layer
                   B a ck                 Ref eren ce s

why fsck takes the whole day?
         Who owns the block X?
                                                          Metadata   (ctime, mtime, mode, ...)
                                                                          (Block Pointers)

                                          (Data Blocks)



Put a back Ref into Data blocks!
   Metadata   (ctime, mtime, mode, ...)
                    (Block Pointers)

                                       (Data Blocks)
RaleighFS Structure
       RPC Server

                                                   Observers

                                                           register
                             RaleighFS                    unregister
                                                            notify
                        create
                         open
                         sync



Semantic Layer                   Objects                       Device Layer


Flat        Unix                                     Memory            Files      Disk
                     Flow          Set     Map
  create                                                  create    read
                    SeqMap       RecNo     Table                                insert
   open move                                               open     write
                                                                               remove
   close unlink                                            close    alloc
                                                                               lookup
   sync                 create                             sync    dealloc
                                      insert
                         open query update
                         close ioctl append
                         sync        remove
RaleighFSv5
                                                     Matteo Bertozzi
                                                         2005-2010


     A b s t r a c t         S t o r a g e         L a y e r

To interact with an Object           create
 you name it, and you say             open         insert
   what you want it do.               close       update
                                      sync        append

Semantic Layer                      lookup
                                       key
                                                  remove
                                                   query
                                     move           ioctl
Objects Layer                        unlink

                                sync                 insert
 Device Layer                   read
                                write
                                         alloc
                                        dealloc
                                                    remove
                                                    lookup
Q&A
      RaleighFSv5
                                                       Matteo Bertozzi
                                                           2005-2010


       A b s t r a c t         S t o r a g e         L a y e r

  To interact with an Object           create
   you name it, and you say             open         insert
     what you want it do.               close       update
                                        sync        append

  Semantic Layer                      lookup
                                         key
                                                    remove
                                                     query
                                       move           ioctl
  Objects Layer                        unlink

                                  sync                 insert
   Device Layer                   read
                                  write
                                           alloc
                                          dealloc
                                                      remove
                                                      lookup

More Related Content

What's hot

java API for XML DOM
java API for XML DOMjava API for XML DOM
java API for XML DOMSurinder Kaur
 
openFrameworks freakDay S03E02 Diederick Huijbers - C++/Physics/Cloth Animati...
openFrameworks freakDay S03E02 Diederick Huijbers - C++/Physics/Cloth Animati...openFrameworks freakDay S03E02 Diederick Huijbers - C++/Physics/Cloth Animati...
openFrameworks freakDay S03E02 Diederick Huijbers - C++/Physics/Cloth Animati...roxlu
 
Defining classes-part-i-constructors-properties
Defining classes-part-i-constructors-propertiesDefining classes-part-i-constructors-properties
Defining classes-part-i-constructors-propertiesCtOlaf
 
An introduction into Spring Data
An introduction into Spring DataAn introduction into Spring Data
An introduction into Spring DataOliver Gierke
 
Object oriented programming with python
Object oriented programming with pythonObject oriented programming with python
Object oriented programming with pythonArslan Arshad
 
Class and object in c++
Class and object in c++Class and object in c++
Class and object in c++NainaKhan28
 
Xml Path Language1.0
Xml Path Language1.0Xml Path Language1.0
Xml Path Language1.0LiquidHub
 
PYTHON-Chapter 3-Classes and Object-oriented Programming: MAULIK BORSANIYA
PYTHON-Chapter 3-Classes and Object-oriented Programming: MAULIK BORSANIYAPYTHON-Chapter 3-Classes and Object-oriented Programming: MAULIK BORSANIYA
PYTHON-Chapter 3-Classes and Object-oriented Programming: MAULIK BORSANIYAMaulik Borsaniya
 
Data access 2.0? Please welcome: Spring Data!
Data access 2.0? Please welcome: Spring Data!Data access 2.0? Please welcome: Spring Data!
Data access 2.0? Please welcome: Spring Data!Oliver Gierke
 
iPhone Seminar Part 2
iPhone Seminar Part 2iPhone Seminar Part 2
iPhone Seminar Part 2NAILBITER
 
03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slots03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slotsmha4
 
DDS-PSM-Cxx and simd-cxx
DDS-PSM-Cxx and simd-cxxDDS-PSM-Cxx and simd-cxx
DDS-PSM-Cxx and simd-cxxAngelo Corsaro
 

What's hot (20)

java API for XML DOM
java API for XML DOMjava API for XML DOM
java API for XML DOM
 
Dom
DomDom
Dom
 
core java
core javacore java
core java
 
openFrameworks freakDay S03E02 Diederick Huijbers - C++/Physics/Cloth Animati...
openFrameworks freakDay S03E02 Diederick Huijbers - C++/Physics/Cloth Animati...openFrameworks freakDay S03E02 Diederick Huijbers - C++/Physics/Cloth Animati...
openFrameworks freakDay S03E02 Diederick Huijbers - C++/Physics/Cloth Animati...
 
201005 accelerometer and core Location
201005 accelerometer and core Location201005 accelerometer and core Location
201005 accelerometer and core Location
 
Defining classes-part-i-constructors-properties
Defining classes-part-i-constructors-propertiesDefining classes-part-i-constructors-properties
Defining classes-part-i-constructors-properties
 
Lecture 04
Lecture 04Lecture 04
Lecture 04
 
An introduction into Spring Data
An introduction into Spring DataAn introduction into Spring Data
An introduction into Spring Data
 
Object oriented programming with python
Object oriented programming with pythonObject oriented programming with python
Object oriented programming with python
 
Class and object in c++
Class and object in c++Class and object in c++
Class and object in c++
 
Object oriented programming in python
Object oriented programming in pythonObject oriented programming in python
Object oriented programming in python
 
Xml Path Language1.0
Xml Path Language1.0Xml Path Language1.0
Xml Path Language1.0
 
PYTHON-Chapter 3-Classes and Object-oriented Programming: MAULIK BORSANIYA
PYTHON-Chapter 3-Classes and Object-oriented Programming: MAULIK BORSANIYAPYTHON-Chapter 3-Classes and Object-oriented Programming: MAULIK BORSANIYA
PYTHON-Chapter 3-Classes and Object-oriented Programming: MAULIK BORSANIYA
 
Data access 2.0? Please welcome: Spring Data!
Data access 2.0? Please welcome: Spring Data!Data access 2.0? Please welcome: Spring Data!
Data access 2.0? Please welcome: Spring Data!
 
iPhone Seminar Part 2
iPhone Seminar Part 2iPhone Seminar Part 2
iPhone Seminar Part 2
 
Introduction to php oop
Introduction to php oopIntroduction to php oop
Introduction to php oop
 
C++ And Object in lecture3
C++  And Object in lecture3C++  And Object in lecture3
C++ And Object in lecture3
 
03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slots03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slots
 
DDS-PSM-Cxx and simd-cxx
DDS-PSM-Cxx and simd-cxxDDS-PSM-Cxx and simd-cxx
DDS-PSM-Cxx and simd-cxx
 
Unit i
Unit iUnit i
Unit i
 

Similar to RaleighFS | RaleighDB Abstract Storage Layer

(C Program to Simulate a UNIX-based filesystem) My goal is to implem.docx
(C Program to Simulate a UNIX-based filesystem) My goal is to implem.docx(C Program to Simulate a UNIX-based filesystem) My goal is to implem.docx
(C Program to Simulate a UNIX-based filesystem) My goal is to implem.docxajoy21
 
Hive Object Model
Hive Object ModelHive Object Model
Hive Object ModelZheng Shao
 
Serialization in java
Serialization in javaSerialization in java
Serialization in javaJanu Jahnavi
 
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 DataMichael Rys
 
Sketch of the ZXFS
Sketch of the ZXFSSketch of the ZXFS
Sketch of the ZXFSZx MYS
 
Object oriented programming tutorial
Object oriented programming tutorialObject oriented programming tutorial
Object oriented programming tutorialGhulam Abbas Khan
 
Hibernate Training Session1
Hibernate Training Session1Hibernate Training Session1
Hibernate Training Session1Asad Khan
 
ASP.NET Session 7
ASP.NET Session 7ASP.NET Session 7
ASP.NET Session 7Sisir Ghosh
 
Xsl Tand X Path Quick Reference
Xsl Tand X Path Quick ReferenceXsl Tand X Path Quick Reference
Xsl Tand X Path Quick ReferenceLiquidHub
 
Fuse'ing python for rapid development of storage efficient FS
Fuse'ing python for rapid development of storage efficient FSFuse'ing python for rapid development of storage efficient FS
Fuse'ing python for rapid development of storage efficient FSChetan Giridhar
 
OrientDB introduction - NoSQL
OrientDB introduction - NoSQLOrientDB introduction - NoSQL
OrientDB introduction - NoSQLLuca Garulli
 

Similar to RaleighFS | RaleighDB Abstract Storage Layer (20)

Hibernate 3
Hibernate 3Hibernate 3
Hibernate 3
 
Hibernate
HibernateHibernate
Hibernate
 
Cis166 Final Review C#
Cis166 Final Review C#Cis166 Final Review C#
Cis166 Final Review C#
 
(C Program to Simulate a UNIX-based filesystem) My goal is to implem.docx
(C Program to Simulate a UNIX-based filesystem) My goal is to implem.docx(C Program to Simulate a UNIX-based filesystem) My goal is to implem.docx
(C Program to Simulate a UNIX-based filesystem) My goal is to implem.docx
 
Introduction to odbms
Introduction to odbmsIntroduction to odbms
Introduction to odbms
 
Database
DatabaseDatabase
Database
 
Hive Object Model
Hive Object ModelHive Object Model
Hive Object Model
 
Serialization in java
Serialization in javaSerialization in java
Serialization in java
 
Javasession6
Javasession6Javasession6
Javasession6
 
About Python
About PythonAbout Python
About Python
 
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
 
Dynamic Python
Dynamic PythonDynamic Python
Dynamic Python
 
Sketch of the ZXFS
Sketch of the ZXFSSketch of the ZXFS
Sketch of the ZXFS
 
Object oriented programming tutorial
Object oriented programming tutorialObject oriented programming tutorial
Object oriented programming tutorial
 
Hibernate Training Session1
Hibernate Training Session1Hibernate Training Session1
Hibernate Training Session1
 
ASP.NET Session 7
ASP.NET Session 7ASP.NET Session 7
ASP.NET Session 7
 
Filepointers1 1215104829397318-9
Filepointers1 1215104829397318-9Filepointers1 1215104829397318-9
Filepointers1 1215104829397318-9
 
Xsl Tand X Path Quick Reference
Xsl Tand X Path Quick ReferenceXsl Tand X Path Quick Reference
Xsl Tand X Path Quick Reference
 
Fuse'ing python for rapid development of storage efficient FS
Fuse'ing python for rapid development of storage efficient FSFuse'ing python for rapid development of storage efficient FS
Fuse'ing python for rapid development of storage efficient FS
 
OrientDB introduction - NoSQL
OrientDB introduction - NoSQLOrientDB introduction - NoSQL
OrientDB introduction - NoSQL
 

Recently uploaded

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 

Recently uploaded (20)

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

RaleighFS | RaleighDB Abstract Storage Layer

  • 1. RaleighFS | RaleighDB A bs tra c t St o rag e La ye r
  • 2. What is a File-Systems Is a Method of storing and organizing data to make it easy to find and access. ...to interact with an object You name it, and you say what you want it do. The Filesystem takes the name you give Looks through disk to find the object Gives the object your request to do something. Image taken from namesys Reiser4
  • 3. What is a File-Systems On Disk Format (...serialized struct) ext2, ext3, reiserfs, btrfs... Namespace (Mapping between name and content) /home/th30z/, /usr/local/share/test.c, ... Runtime Service: open(), read(), write(), ...
  • 4. ...A bit of History Multics 1965 (File-System Paper) A General-Purpose File System For Secondary Storage Unix Late 1969 Sun Microsystem 1984 2010 ...Till Now, no significant changes User Program User Space Kernel Space System Call Layer Vnode/VFS Layer FS 1 FS 2 FS 3 FS 4 ... FS N
  • 5. The File-System A file is something that tries creat(path, mode) to look like a sequence of bytes. open(path, flags) You can read the bytes, and write the bytes. pread(fd, buffer, nbytes, offset) You can specify what byte to start to read/write from, pwrite(fd, buffer, nbytes, offset) and the number of bytes to read/write. Cutting bytes out of the middle ftruncate(fd, length) or the beginning of a file, and inserting bytes into the middle of a file, are not permitted! Metadata (ctime, mtime, mode, ...) (Block Pointers) (Data Blocks)
  • 7. Semantic Layer User Request ...to interact with an object You name it, and you say Resolve Semantic Layer what you want it do. (Path/Query to Key) For the end user this name has a meaning and this Lookup Key meaning should be captured by the Semantic Layer, while the rest of the Storage Layer is not interested in the meaning of the name. Metadata User defined name has generally a variable length and Semantic Layer Lookup Metadata from Key tends to be verbose, while the storage layer needs something fixed size and short, to ensure a quick lookup. To do this, objects names are converted in keys that can be Object Pointer a simple hash of the name or something more elaborated. for Read/Write Requests
  • 8. Semantic Layer User Request Resolve The semantic layer takes names Semantic Layer (Path/Query to Key) and converts them into keys, the Storage Layer take keys Lookup Key and finds the objects Metadata Semantic Layer Operations Lookup Metadata from Key create(): Create a new object, Unix place this object in parent directory object, Set Unix Stat, ... open(): Open specified object. lookup(): Lookup Key of specified object. Object Pointer move(): Change name or location of specified object. for Read/Write unlink(): specified object, Unix remove this object from parent directory object. Requests
  • 9. Semantic Layer unix Seman ti c root ‘/’ is the entry point Every object must be in one directory Parse Object Name traverse each directory check permission and open it.
  • 10. Semantic Layer Flat S emant ic Same Level for every Objects No Directory No forced Hierarchy Traversal open(‘mytable’) Lookup item open(‘office-documents/stats’) just by name A B+Tree can be used to map Object Key to its Metadata Root node Internal nodes Leaf nodes (Stat/Meta data)
  • 11. Object Layer An object contains Different Data Mimic your data Types have Languages Types different set, dict, list, ... methods and needs Log Object (Append Only) Operations KV Object (Hashtable) create(): Initialize object data structure for creation. open(): Initialize object data structure for open. Set Object (Think at Dirs) close(): Uninitialize object data structure. Flow Object (Write Anywhere) read(): write(): Read specified object data. Write specified data to object. Table Object (Database Table) append(): remove(): Append Data to object. Remove specified data from object. Record Object (C Struct) truncate(): Truncate or extend object to specified length. inject(): Inject block data to a specified object. ... chop(): Remove block data from specified object.
  • 12. Flow Object Extent list, Pointers to data... Insert/Remove Block Every-Where • read(offset, length) • write(offset, length) Like a regular ‘80s file • inject(offset, length) but with more flexibility • remove(offset, length) • truncate(size)
  • 13. Dir Object Pages list, Object Names... Keep track Object-A Object-A of objects stored Object-B Object-C Object-X ... table/users Object-Y (names) table/addrs Object-Z ... ... • read(index, n) Semantic Layer • append(name) doesn’t guarantee • remove(index) to keep Objects Names • remove(name) Wait! Wait! Dir Object is just a Set!
  • 14. RecNo Object Extent Record list, Pointers to data... Insert/Remove Record Every-Where • read(recno) Like Flow Object • write(recno) but with a fixed size • inject(recno) user defined structure • remove(recno) • truncate(n) Metadata keep tract fields sizes and names
  • 15. Device Layer Where data is Stored? Memory Block Allocation Disk (Raid?) Bitmap Somewhere (DFS) Extents? Blocks Fixed Size Variable Size Operations alloc(): Allocate a block (touch bitmap/space-map) Different Layout dealloc(): Deallocate a block (touch bitmap/space-map) for different types read(): Read some data from disk write(): Write data on disk for different workloads insert(): Insert Key/Value to the B+Tree remove(): Remove Key/Value from the B+Tree lookup(): Retrive Key Value from the B+Tree
  • 16. Device Layer kee p tr ac k o f Bl o ck s What do you need? Small Variable Size Files (B+Tree) Large Variable Size Files (Extents) Best case Worst case ‘Normal’ case Contiguous One block Large or Tail Root node Internal nodes Extent nodes Raw Data (leaf/blob) (Block Pointers) Choose your Block 4k, 16k, 64M (Data Blocks)
  • 17. Device Layer B a ck Ref eren ce s why fsck takes the whole day? Who owns the block X? Metadata (ctime, mtime, mode, ...) (Block Pointers) (Data Blocks) Put a back Ref into Data blocks! Metadata (ctime, mtime, mode, ...) (Block Pointers) (Data Blocks)
  • 18. RaleighFS Structure RPC Server Observers register RaleighFS unregister notify create open sync Semantic Layer Objects Device Layer Flat Unix Memory Files Disk Flow Set Map create create read SeqMap RecNo Table insert open move open write remove close unlink close alloc lookup sync create sync dealloc insert open query update close ioctl append sync remove
  • 19. RaleighFSv5 Matteo Bertozzi 2005-2010 A b s t r a c t S t o r a g e L a y e r To interact with an Object create you name it, and you say open insert what you want it do. close update sync append Semantic Layer lookup key remove query move ioctl Objects Layer unlink sync insert Device Layer read write alloc dealloc remove lookup
  • 20. Q&A RaleighFSv5 Matteo Bertozzi 2005-2010 A b s t r a c t S t o r a g e L a y e r To interact with an Object create you name it, and you say open insert what you want it do. close update sync append Semantic Layer lookup key remove query move ioctl Objects Layer unlink sync insert Device Layer read write alloc dealloc remove lookup