suffuse / sfs

identity fuse filesystem, toward lowering the fuse/unix/java impedance mismatches
Other
8 stars 1 forks source link

Some ideas for core abstractions. #9

Closed paulp closed 8 years ago

paulp commented 8 years ago

Running the metadata example:

% sbt 'runMain suffuse.Example'
{
  modification time: Mtime(123)
  size in bytes: Size(456)
}
{
  modification time: Mtime(123)
  size in bytes: Size(10000)
  access time: Atime(789)
}
paulp commented 8 years ago

Your comments would be greatly appreciated.

EECOLOR commented 8 years ago

Before I say anything else. I think there are some awesome idea's in here.

I like (at least I think so, my brain is completely there yet) your encoding of a typed object. At a first glance Metadata with its keys and attributes seem a complex form of the concrete class with those members. The difference is that allows you add keys (properties, members, ...) without opening up the class.

The type system interface clearly captures what is needed. I definitely like the three methods:

def resolve(path: Path): Key
def metadata(key: Key): Metadata
def lookup(key: Key): Data

Their signatures clearly communicate the relations.

All in all I think it's an awesome base to start from.

paulp commented 8 years ago

Closing for the other one.