Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

bored

Name: Anonymous 2007-04-12 12:26 ID:E72kSiQP

im to bored to code
going to watch anime & troll you fags instead

Name: Anonymous 2007-04-12 12:27 ID:x/A9DmBW

you fail at trolling

Name: Anonymous 2007-04-12 12:35 ID:fk6EVQAZ

>>2
zomg how did you do that?

Name: Anonymous 2007-04-12 12:35 ID:E72kSiQP

>>3
[sjis]:3[/sjis]

Name: Anonymous 2007-04-12 12:35 ID:E72kSiQP

>>4
:3 aa

Name: Anonymous 2007-04-12 12:40 ID:cz3pNNzh

>>3
view source, nigger

Name: Anonymous 2007-04-12 12:43 ID:fk6EVQAZ

What is this intruguing aa stuff?

Name: Anonymous 2007-04-12 14:53 ID:axiUHnPL

[sjis]:3[/sjis]

Name: Anonymous 2007-04-12 14:55 ID:axiUHnPL

<span class="aa">idk but suuure hope it works </span>

Name: Anonymous 2007-04-12 14:57 ID:Heaven

[gaygay]haado[/gaygay]

Name: Anonymous 2007-04-12 23:29 ID:Heaven

i like the cock

Name: Anonymous 2007-11-07 9:57

I can't create new threads so I'll hijack this one.
This thread is now about filesystems.

Suppose you crated a filesystem using FUSE and a database as a proof of concept of some sort. Which features would you like to have?

I'm aiming at (for real, I'm already designing it):

- The basic features (Unix metadata, links, symlinks, shared and exclusive locking)

- Inverse list of files to hard links, so for a given file you can know which other files link to it as well (e.g. ln car cdr; Now you ask: which is my other car? My other car is a cdr).

- Arbitrary metadata for files, based on dictionaries. You can take any file and assign it a key and a value for that key. Keys are unique per file. You should be able to retrieve all key, value pairs, which files have certain keys, and which files have certain keys with certain values as fast as possible. Keys are strings, values can be strings or ints.

- Fast listing of files given any metadata (static or dynamic), so you could obtain, say, a list of files created after a certain day, named like lol*interweb and with metadata "type=image" in logarithmic time. An SQL console would be available too, of course.

- Copy on write. There should be a copy operation that copies a file by just copying the block indexes marked "copy on write". The file takes almost no space and no time when copying, and new blocks are copied upon modification. This would have the advantages of hard links and copying files for some purposes.

- Transactions, ACID compliant. You should be able to start a per-process transaction and operate with files in a way isolated from other processes, then commit the changes (which would be effective all at once) or rollback them (undoing absolutely everything you may have done). Nested transactions too; you can begin, do A, begin, do B, rollback, commit, and A would get done, but not B.

- Snapshots. You should be able to open a snapshot to obtain a consistent picture of the filesystem, without locking concurrent writing operations.

- Creation date (NOT metadata change), data modify date, metadata modify date and access date optional to keep track of.

- The filesystem's data location depends on the database. I'd want to support both filesystems in a regular file (inside a host filesystem, which one doesn't matter at all) and raw devices.

- Backup/archiving system that should produce a file which you can later mount as is, keeping metadata and everything. I.e. once you archive, you can either unarchive or just mount the result to read and modify it.

- Ability to connect to remote databases, thus becoming a network filesystem, only with all these features, including locking and transactions (which would kick NFS's ass).

- Asynchronous replication to any number of remote filesystems (mounted as read-only). Multi-level replication possible too. I would have to think about multi-master replication, but I'd love to include that feature too.

- Repair utility: first the database repairs its own tablespace, then a higher-level utility checks that indexes and metadata are ok or fixes them.

Well, what do you think? Of course this wouldn't be fast, and it's not intended to be your boot filesystem or for /lib or /usr, or anything of the sort. It's a filesystem with rich features for storing your own data, like pictures. So if ReiserFS is your car, this would be your cdr.

Name: Anonymous 2007-11-07 10:06

>>12
Not smart enough to scroll down to the bottom of the page, are you?

Name: Anonymous 2007-11-07 10:18

I know what you can do to a filesystem.

Name: Anonymous 2007-11-07 10:39

>>13
Not smart enough to realize there's a 1 thread every x days limit, are you?

>>14
Er... so? Is my filesystem idea great, or a failsystem? Do you have any better ideas?

Name: Anonymous 2007-11-07 10:46

>>15
Yeah, you should tune it.

Name: Anonymous 2007-11-07 11:01

I dare you to call your filesystem AFish. Advanced Filesystem Host.

>Which features would you like to have?
Considering you already listed all features one could possibly imagine in a filesystem, there isn't much to add. It all comes down to how slow it is when you try to copy a folder with 2000 pictures.

Name: Anonymous 2007-11-08 6:31

Wait, there's more! I'm getting more and more interested on this project as I think of the awesome things I could implement. First of all, I'm going to use MySQL's InnoDB engine from a C FUSE driver. It has the replication and transactional features I'd want to have. I also considered SQLite, but its transactional/locking capabilities for this kind of thing would fail. And there's more! How about...?

- Transparent block compression (as in NTFS), enabled or disabled per file or per directory.

- Sparse files. Sparse files would not even consume index rows; if you create a file with 4 KB of data after 50 GB of unwritten blocks, you consume about 5 KB of disk space.

- Small files optimization: Files smaller than 256..3072 (TBD) bytes require no blocks.

- Optional logging to allow point-in-time recovery of your filesystem. Watch out for the performance and space hit, but it's still an optional feature you might want to have, that comes for free with the database.

- Support for multiple devices joined up to form a single filesystem: if you have two 80 GB hard disks, you can have a 160 GB volume.

- Multiple isolation levels to choose from: read uncommitted (disable tx isolation), read committed, repeatable read, serializable.

- An option to flush to disk on commit (for ACID compliance), or every second. Various levels of caching. All of this is a matter of DB configuration.

- A simple way to use and benefit from transactions from anywhere, even shell scripts.

- Of course, I'd support files larger than 4 GB, and directories with more than 4 GB of files (you'd have to be insane to create them though). Maybe I go for 4 GB blocks per file (and blocks are going to be 1 KB to 16 KB, TBD, probably customizable on FS creation).

- The ability to create mountable backups is gone (would need two MySQL instances due to InnoDB using a single tablespace, not going to do that), but I can provide some sort of tar utility that supports my metadata instead.

- Filesystems stored as regular files within other host filesystems will not need to be fixed-size; they'll be able to autoextend, taking as much space as necessary at peak.

- I'd provide ls, stat and other utilities supporting my metadata, copy on write and other features with the forced indentation of code, as either functions to use in your own indentation-forced programs, or shell utilities.

- Though I wouldn't be going to support full-text search from the start, I may leave extra flags to support it in the future, even with plugins to search within ODF document contents and such. (Though there already are many good full-text search utilities that will work with this filesystem transparently, too.)

Name: Anonymous 2007-11-08 7:42

>>18
You could also team up with Stallman and make it the core file system of GNU HURD.

Name: Anonymous 2007-11-08 10:51

I'm going to use MySQL's InnoDB engine
STOP.

Why not PostgreSQL? MySQL is to PostgreSQL what PHP is to Perl.

Name: Anonymous 2007-11-08 11:45

>>20
Listen to this man.

Name: Anonymous 2007-11-08 11:53

>>20
truth

Name: Anonymous 2007-11-08 11:59

>>20
Because PostgreSQL doesn't have some of the features I wanted to use, such as consistent snapshot transactions or the four isolation levels (implements only two, and if I understood correctly serializable is daring on locks), and because its replication capabilities leave a lot to be desired (or so I've heard from people who have used both). Another reason would be the ability to switch from InnoDB to the solidDB engine for MySQL, which is supposed to be pretty darn fast (and GPL as well).

MySQL is not that bad. It has a terrible image in some circles such as /prog, part deserved (e.g. the stored procedure language is utter shit; I wanted the forced indentation of code like PostgreSQL has), and part due to its past failures (such as not supporting transactions or referential integrity, and dissing these features in the docs). However, that was before version 3.22, and now it's about to release version 5.1. A lot has changed and got better and faster.

Name: Anonymous 2007-11-08 12:03

>>23
Spoiler: MySQL has nothing that Postgres doesn't have.

Name: Anonymous 2007-11-08 12:15

>>24
Does it? (I'm honestly asking.) Then how would you do START TRANSACTION WITH CONSISTENT SNAPSHOT, where's the REPEATABLE READ isolation level (currently mapped to SERIALIZABLE), and is its replication as good as MySQL's, including replication of DDL, circular replication, etc.? Also, is its performance and memory consumption comparable?

Name: Anonymous 2007-11-08 12:20

>>25
AUTO_INCREMENT or GTFO ^_____________^;;

Name: Anonymous 2007-11-08 12:44

>>26
fail

Name: Anonymous 2007-11-08 16:08

>>23
Does MySQL have sequences? Is auto_increment still braindead like a corpse? Does it know the difference between "0" and the first of january 1900?

There used to be a whole lot of gotchas in MySQL. Most of those were of the sort that I wouldn't risk any real data on MySQL because they existed.

Name: Anonymous 2007-11-11 14:11

[sjis]test motherfucker[/sjis]

Name: Anonymous 2007-11-11 17:14

>>29
PROTIP: Try aa

Name: Anonymous 2007-11-12 5:18

>>28
No built-in sequences, but you can create your own with an InnoDB table (row-level locking) and stored procedures/functions. AFAIK AUTO_INCREMENT still works like it used to be. That '0000-00-00 00:00:00' stupidity can be disabled, as well as automatic/dangerous data conversions which used to produce a warning (there's a strict mode). Most of the gotchas are eliminated by setting sql_mode to strict_all_tables.

Name: Anonymous 2007-11-12 6:47

>>12

| - Arbitrary metadata

I do like this idea. But it is slightly irritating that FS designers think of this as a FS problem rather than an OS or VFS problem. So every other FS has a different, incompatible implementation of metadata storage. A software developer wishing to use the metadata must decide on a particular FS to support (or waste time accomodating multiple FS's). But, it isn't cool to come up with an improvement for VFS, not as cool as having your own FS named after you.

| - Fast listing of files given any metadata

I like that, though. Metadata is nearly worthless if you can't search it with a fast index. That's what b-trees are for, afterall.

| - Copy on write.

Doesn't ZFS have that?

| - Transactions, ACID compliant. You should be able to start a per-process transaction and operate with files in a way isolated from other processes, then commit the changes

Sounds messy. There's a reason why filesystems ensure metadata consistency only and forget data consistency (besides ordering, that is). If two applications start a transaction on the same (set of) files concurrently, what happens when they both commit? Does one transaction get to replace the other? Or does each application get to act on the uncommitted data of the other? You'd still end up with an indeterminate state at the end, either way.

Data's consistency is a problem for application developers to figure out. The FS just keeps metadata from taking a shit.

| - Creation date (NOT metadata change), data modify date, metadata modify date and access date optional to keep track of.

Where are you going to get the extra info? Does the VFS provide the separate "metadata modify" and "data modify" timestamps for you to keep track of?

| - The filesystem's data location depends on the database. I'd want to support both filesystems in a regular file (inside a host filesystem, which one doesn't matter at all) and raw devices.

I don't know what the database is needed for. Why is your FS even concerning itself with where it is located? That's a problem for the OS to deal with. The FS just works on the blocks that the OS gives to it, wherever they come from does not matter. Have you ever used loopback devices?

| - Ability to connect to remote databases,

Ok, now I am convinced you're not just talking about making a FS.

>>18
| - Transparent block compression

Yes please.

| - Small files optimization:

You mean like tail files? Sure, as long as you can guarantee that in case of a failure: Stale data or data belonging to other files won't become exposed to users, and a failed write won't ruin the blocks of the other tail files  (wouldn't want to put files in unnecessary risk of corruption).

You've got an enormous amount of work ahead of you.

Name: Anonymous 2007-11-12 7:57

- Transactions, ACID compliant. You should be able to start a per-process transaction and operate with files in a way isolated from other processes, then commit the changes

Sounds messy. There's a reason why filesystems ensure metadata consistency only and forget data consistency (besides ordering, that is). If two applications start a transaction on the same (set of) files concurrently, what happens when they both commit? Does one transaction get to replace the other? Or does each application get to act on the uncommitted data of the other? You'd still end up with an indeterminate state at the end, either way.

Only allow metadata operations to be transacted then.

Name: Anonymous 2007-11-12 7:58

>>32
Thanks for taking the time to review all features!

But it is slightly irritating that FS designers think of this as a FS problem rather than an OS or VFS problem.
I agree wholeheartedly. I'd love to have this feature provided by the OS, I'd be using it already. Problem is, I can't find any, and since metadata without search is useless, I'm going to solve both issues in one shoot by using a database. It'll be tied to this filesystem, but at least it'll get the job done, until something better is available in a higher level.

Doesn't ZFS have that?
I don't know ZFS, will see if it does and how it's done and requested. I suppose a regular cp of files shouldn't use copy on write because it'd be pretty hard for the FS to detect that you're copying files, and cp would read the source files; what I plan to do is a special FS call or ioctl that create copy on write files without even reading them.

If two applications start a transaction on the same (set of) files concurrently, what happens when they both commit?
Transactions are (by default) isolated from each other, so neither would see the changes of the other. If a transaction changes something changed by (or depended from) another ongoing transaction, the later transaction gets blocked until the former transaction either commits or rolls back, i.e. until it's decidable whether this change would be acceptable or not.

Transactions are great for several scenarios. Here are three of them:
- Atomicity: you can ensure a series of changes to the filesystem, for example hot replacing production files in a web server, will be done atomically. The changes become visible all at once, and the older data is used until it's all complete.
- Consistency: you can guarantee data is consistent before and after a transaction. In my example, if the system crashes while you're copying files, nothing gets copied, and you don't end with a mixed version of the production files.
- Undo: you can undo a block of operations. Say you're writing an install script. You edit and delete all sorts of files, but something could fail anytime. Instead of thinking of a way to backup everything and having to restore or undo all of your changes in case something fails later on, you can just use a transaction and rollback on error.

Where are you going to get the extra info? Does the VFS provide the separate "metadata modify" and "data modify" timestamps for you to keep track of?
I'll do what I can to detect it. I can surely tell when the user is editing metadata via my special interface (ioctls or whatever, still undecided).

I don't know what the database is needed for.
The database provides B-Tree indexes, transactions, various isolation levels, consistent snapshots, replication, network filesystems, etc. by itself, so if I use a database, creating a filesystem with such a pile of features would be much easier.

Why is your FS even concerning itself with where it is located?
It's the database who does, because everything (including the data) would be in the database. However, in the case of MySQL's InnoDB engine, the database won't really care either, as it works with both regular files and raw devices.

Ok, now I am convinced you're not just talking about making a FS.
Heh, yeah. Using the database, I could do pull kinds of stunts. For example, you'd have something like NFS if the database is installed somewhere else; the FS can connect to its database using TCP/IP. Only this "NFS" would support locking, transactions, and everything. The database can also replicate to a remote database, so I could support filesystem mirroring that way. I could even attempt to support 2-way/circular replication. Anything the database supports, my FS will support.

You mean like tail files?
More like what NTFS does: if the file is small enough, its contents are inserted in the metadata (the MFT in NTFS's case, the directory table in my case). There's no risk of people accessing others' files in case of corruption, and the database takes care of repair (as it would repair any table).

You've got an enormous amount of work ahead of you.
Lol, the catch is 95% of this work is already done and tested extensively, sitting there, waiting for me to connect to it from a FUSE driver.

Name: Anonymous 2007-11-15 6:52

Ok, I'll give PostgreSQL a try. I'll write the FUSE driver in Python (one word, the forced indentation of code) and support both PostgreSQL and MySQL. Using MySQL, you'll be able to choose different engines: InnoDB, the builtin transactional engine with all the bells and whistles; MyISAM, a non-transactional, faster engine; Memory, a non-transactional, in-memory, volatile engine; SolidDB, a third-party (but still GPL) transactional engine that's supposed to be faster; or PrimebaseXT, an experimental third-party (GPL) transactional engine, among others.

Name: Anonymous 2007-11-15 7:09

>>35
Memory, a non-transactional, in-memory, volatile engine
Wow, I bet a lot of people are going to chose that.

Name: Anonymous 2007-11-16 4:28

>>36
In-memory filesystems have their uses, too.
Though not in my case, as the database still writes metadata to disk.

Name: Anonymous 2009-03-06 7:16

able for order from   specialized shops both   real and online   resources Anyone willing   to prove Pascal   sucks for systems   engineering by trying   to work well   with your competition   And the one   offending character removed.

Name: Anonymous 2012-03-25 10:20

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

Name: Sgt.Kabuꝝ뭃kiman᭑ﮜ 2012-05-29 0:16

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

Don't change these.
Name: Email:
Entire Thread Thread List