Design my own file system

Discussion in 'Java' started by Yadagiri Rao KP, Aug 25, 2003.

  1. Sir,
    How to design a file system that allows heirarchy of directories and
    files in those directories.

    Basically the file system should work similarly like unix or linux or
    windows file system but using java as the main core language.



    Any ideas.....
    Ple share with me
    Regards
    Yadagiri
    Yadagiri Rao KP, Aug 25, 2003
    #1
    1. Advertising

  2. "Yadagiri Rao KP" <> wrote in message
    news:...
    > Sir,
    > How to design a file system that allows heirarchy of directories and
    > files in those directories.
    >
    > Basically the file system should work similarly like unix or linux or
    > windows file system but using java as the main core language.
    >
    >
    >
    > Any ideas.....
    > Ple share with me
    > Regards
    > Yadagiri


    Linux and BSD are open-sourced OSes that support filesystems. (with
    appropriates licenses, of course)

    A straightforward way of doing what you want is to port the C code for, say,
    the Ext2 file-system in Java. You will have some native code to write as
    well to interface with the storage hardware.

    HTH,

    --
    Shripathi Kamath
    NETAPHOR SOFTWARE INC.
    http://www.netaphor.com
    Shripathi Kamath, Aug 25, 2003
    #2
    1. Advertising

  3. Yadagiri Rao KP

    Tim Tyler Guest

    Roedy Green <> wrote:
    : (Yadagiri Rao KP) wrote or quoted :

    :>How to design a file system that allows heirarchy of directories and
    :>files in those directories.

    : see http://mindprod.com/projjavafilesystem.html

    I don't think a 10 gigabyte file is a sensible implementation plan -
    too much chance of damage.
    --
    __________
    |im |yler http://timtyler.org/
    Tim Tyler, Aug 26, 2003
    #3
  4. Yadagiri Rao KP

    Roedy Green Guest

    On Tue, 26 Aug 2003 14:01:42 GMT, Tim Tyler <> wrote or
    quoted :

    >I don't think a 10 gigabyte file is a sensible implementation plan -
    >too much chance of damage.


    Presumably your own implementation is more robust than the host
    system's.

    There are two things that can go wrong at the host level:

    1. directory wrecked

    2. track becomes unreadable.

    The fewer directory entries you have, the less your odds of being
    hurt. On the other hand, if you have two directory entries and lose
    one, you still have half your data, probably not all that useful.

    The damage from a lost track is the same, presuming your OS lets you
    recover the rest of the file.

    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
    Roedy Green, Aug 26, 2003
    #4
  5. Yadagiri Rao KP

    Tim Tyler Guest

    Roedy Green <> wrote:
    : Tim Tyler <> wrote or quoted :

    :>I don't think a 10 gigabyte file is a sensible implementation plan -
    :>too much chance of damage.

    : Presumably your own implementation is more robust than the host
    : system's.

    : There are two things that can go wrong at the host level:

    : 1. directory wrecked

    : 2. track becomes unreadable.

    : The fewer directory entries you have, the less your odds of being
    : hurt. [...]

    Surely a rather minor effect.

    : On the other hand, if you have two directory entries and lose
    : one, you still have half your data, probably not all that useful.

    Probably a /lot/ better than nothing ;-)

    : The damage from a lost track is the same, presuming your OS lets you
    : recover the rest of the file.

    Check what databases do. They almost invariably use multiple files -
    rather than one big one. It's a more robust solution - if the
    power is lost in the middle of a write operation, the damage is
    more likely to be localised.

    Indeed, a database would make a reasonable foundation for a modern
    filing system.
    --
    __________
    |im |yler http://timtyler.org/
    Tim Tyler, Aug 26, 2003
    #5
  6. Yadagiri Rao KP

    Roedy Green Guest

    On Tue, 26 Aug 2003 19:32:17 GMT, Tim Tyler <> wrote or
    quoted :

    >Indeed, a database would make a reasonable foundation for a modern
    >filing system.


    Yes, definitely. It seems so odd you can't even rapidly find a file
    by name rather than directory.

    The plan I had in my student project was to get your file system going
    hosted by some other OS. Eventually you could let it interface
    directly with the hardware, taking over at least an entire partition.

    At that point you don't really get a choice. You are one big file.

    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
    Roedy Green, Aug 26, 2003
    #6
  7. Yadagiri Rao KP

    Sudsy Guest

    FISH wrote:
    <snip>
    > Didn't Oracle try and push an idea like that a few years back?
    >
    > (Did anything come of it, or was it just more hot air from Larry?)
    >
    >
    > -FISH- ><>


    JFS (Journaled File System) uses database concepts to provide a more
    robust implementation. I recall that checking a JFS on AIX was much
    faster than running fsck. Repairs were also very quick.
    IIRC there's even a JFS implementation for Linux, although I have no
    personal experience with it so cannot say how well it works.
    Sudsy, Aug 27, 2003
    #7
  8. Yadagiri Rao KP

    Roedy Green Guest

    On Wed, 27 Aug 2003 10:19:58 -0400, Sudsy <>
    wrote or quoted :

    >JFS (Journaled File System) uses database concepts


    NTFS uses transactions to update some system structures. That is why
    the disk rarely is corrupt after a crash.

    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
    Roedy Green, Aug 28, 2003
    #8
  9. "Sudsy" <> wrote in message
    news:...
    > FISH wrote:
    > <snip>
    > > Didn't Oracle try and push an idea like that a few years back?
    > >
    > > (Did anything come of it, or was it just more hot air from Larry?)
    > >
    > >
    > > -FISH- ><>

    >
    > JFS (Journaled File System) uses database concepts to provide a more
    > robust implementation. I recall that checking a JFS on AIX was much
    > faster than running fsck. Repairs were also very quick.
    > IIRC there's even a JFS implementation for Linux, although I have no
    > personal experience with it so cannot say how well it works.


    Yup, ext3 supports journalling, as do XFS and some others. The server I
    co-own runs on it and well, it works fine. Saved a lot of time when it
    had to check a 120 GB RAID array... :)
    Michiel
    Michiel Konstapel, Aug 28, 2003
    #9
  10. Yadagiri Rao KP

    FISH Guest

    Sudsy <> wrote in message news:<>...
    > FISH wrote:
    > <snip>
    > > Didn't Oracle try and push an idea like that a few years back?
    > >
    > > (Did anything come of it, or was it just more hot air from Larry?)
    > >
    > >
    > > -FISH- ><>

    >
    > JFS (Journaled File System) uses database concepts to provide a more
    > robust implementation. I recall that checking a JFS on AIX was much
    > faster than running fsck. Repairs were also very quick.
    > IIRC there's even a JFS implementation for Linux, although I have no
    > personal experience with it so cannot say how well it works.



    I seem to recall what Oracle was talking about was replacing the
    filesystem, as we know it, entirely with a database. I don't recall
    reading anything about it myself, but I do remember listening to some
    Oracle DBA's discussing it as if it was the 'next big thing' (tm).

    This would have been back in the days when Oracle was loundly banging
    the drum for replacing desktop PCs with thin clients as a vision of
    the future (an idea which is close to Sun's heart too!). In such a
    disk-less environment (diskless for the end-user anyway!) storing and
    retrieving your work as records on a remote database might have been
    an interesting idea. Could you imagine no longer having directories,
    but 'views' which enable you to cluster related material ('files')
    together in many different ways, some static and some ad-hoc, based
    upon different search/sort criteria? As new material was saved/
    removed from the database, it would automatically be added/removed
    from the views it qualified for. So your 'filesystem' is no longer
    based upon the physical location of any data on a disk, but fluidly
    created based upon the content, type and format of the data itself.


    -FISH- ><>
    FISH, Aug 28, 2003
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stefan Siegl
    Replies:
    1
    Views:
    761
  2. Saverio M.
    Replies:
    0
    Views:
    500
    Saverio M.
    Jul 3, 2006
  3. boysr2003
    Replies:
    0
    Views:
    1,024
    boysr2003
    Jul 27, 2006
  4. Steven T. Hatton
    Replies:
    3
    Views:
    363
    Steven T. Hatton
    Aug 1, 2005
  5. David Filmer
    Replies:
    17
    Views:
    253
    J. Romano
    Aug 18, 2004
Loading...

Share This Page