
Writing a FUSE file system in Go - mseepgood
http://bazil.org/talks/2013-06-10-la-gophers/#1
======
justincormack
Yes I thought the kernel API did not look too hard to use; FUSE support is no
the TODO list for ljsyscall[1] which is a LuaJIT implementation of the Linux
(and partially OSX, NetBSD) kernel API. Implementing against native kernel
APIs in a scripting language with an ffi is manageable although the interfaces
are large; Go seems to be about the only language that has a real effort to do
this, other than my project (do have longer term plans to port to Ruby, Pypy
one day once it is abstracted out more).

[1]
[https://github.com/justincormack/ljsyscall](https://github.com/justincormack/ljsyscall)

------
limmeau
FUSE is somewhere on the top of my "cool tools I wish I had a use for some
day", together with Go, so thanks for posting this!

BTW does anyone know if there is something similar to FUSE, but for block-
devices? I've written a rudimentary NBD server to read my old OS X
sparsebundles on Linux, but NBD seems a bit over-general for that purpose.

~~~
deweerdt
> BTW does anyone know if there is something similar to FUSE, but for block-
> devices?

[https://github.com/acozzette/BUSE](https://github.com/acozzette/BUSE)

The disclaimer says it's experimental, though.

~~~
limmeau
Thanks. I see it wraps NBD, too.

------
rgbrenner
The content of the slides is good/informative.. but the UI for the slides is
terrible. I didn't know where to click, I tried clicking on the slide next to
it... tried dragging the slide over, and selected a bunch of text. Clicked a
few other parts of the screen.. Then it occurred to me to try the arrows. If I
hadn't thought of that, I would have just left.

Why would you design something like that? At least give people instructions.

~~~
tokenizerrr
Clicking on the next slide works fine for me, and it was the first thing I
tried.

~~~
sciurus
You have to click on the left third of the next slide, or the right third of
the current slide.

------
contingencies
It seems to me with Linux's dominance, FUSE is becoming an attractive way to
export APIs, since by operating at the filesystem layer full access is
guaranteed to all programs regardless of creed... without having to write a C
library, or a corresponding library for every language. This is particularly
useful for shell scripts. It's still a tradeoff though, and *BSD'ers won't be
super pleased if it becomes too popular.

~~~
4ad
Linux discovering Plan 9 ideas, only 20 years later.

~~~
pjmlp
Linux is mostly about re-implementing old stuff, sadly I am yet to see many
new ideas being explored, besides what commercial UNIXes and Mainframes offer.

~~~
coldtea
It's open source, you can go and implement this "novel stuff" yourself.

~~~
4ad
No, you really can't. Plan 9 wasn't a modification of the Research Unix they
used at the Labs, it was a new operating system because Unix couldn't
implement the required abstractions in an orthogonal way. Plan 9 replaces the
abstractions offered by Unix with different new ones; you can't just add new
abstractions on top of old ones. It's a completely different world, different
process and security models which are incompatible with the old models. Linux
wouldn't be Linux anymore. One reason why you would want Linux with Plan 9
semantics instead of Plan 9 is because Linux has a lot of drivers.
Unfortunately, the I/O model is a consequence on how Plan 9 does things, and
if you want Plan 9 semantics in Linux you'd have to modify all the drivers.
Every driver that uses IOCTLs would have to be modified, which is pretty much
every one of them.

Plus, whatever you did, there's the small matter of Linux people accepting you
changes. A Linux fork is useless; if it's not in mainline, it doesn't exist.
Historically the Linux folks haven't been very happy with these kind of
changes...

~~~
coldtea
Linux has been implementing Plan 9 features piecemeal for ages. For example:
/proc fs, several system calls, utf-8, etc.

But I wasn't talking about that stuff specifically (which might or might not
be incompatible with core Linux). Parent lamented of Linux generally not
trying out new research ideas. Well, why doesn't he have a go at it?

~~~
pjmlp
It is funny how the typical Linux zealots answer is go and implement the stuff
one complains about.

Everyone needs to be a kernel developer, a XWindows developer, a GNOME
developer, a KDE developer, ... or just shut up.

And even when something is done that goes out of the usual copying existing
ideas, there is the uphill battle to get it eventually integrated and
accepted, if ever.

I have been coding before Linus could even think about doing Linux, and have
better things to do with my free time.

~~~
coldtea
> _It is funny how the typical Linux zealots answer is go and implement the
> stuff one complains about._

I use OS X. Could not care less about Linux except on a server. Have started
with Sun OS and HPUX back in the day.

> _Everyone needs to be a kernel developer, a XWindows developer, a GNOME
> developer, a KDE developer, ... or just shut up._

Pretty much sums it.

> _And even when something is done that goes out of the usual copying existing
> ideas, there is the uphill battle to get it eventually integrated and
> accepted, if ever._

And why would it be "integrated and accepted" if the people don't like it?
Because it's "novel" and "out of the usual"? I'd say, "we actually want it in
our kernel" is a far more compelling argument than "It's novel".

> _I have been coding before Linus could even think about doing Linux, and
> have better things to do with my free time._

So, you "have better things to do with my free time" but the people doing
Linux kernel work should implement novel things for your amusement? How
exactly do you justify that?

(As for "coding before Linus could even think about doing Linux", should we be
impressed by the timespan alone? Tons of dabblers and mediocrities have also
done that).

~~~
pjmlp
> So, you "have better things to do with my free time" but the people doing
> Linux kernel work should implement novel things for your amusement?

Why should it be for my amusement?! I was only stating a fact.

> (As for "coding before Linus could even think about doing Linux", should we
> be impressed by the timespan alone? Tons of dabblers and mediocrities have
> also done that).

No, it just means I use GNU/Linux like any other OS and I don't care about OS
religious wars.

------
nutmeg
The Wikipedia page has a list of interesting projects based on FUSE:
[http://en.wikipedia.org/wiki/Filesystem_in_Userspace#Example...](http://en.wikipedia.org/wiki/Filesystem_in_Userspace#Example_Uses)

------
ZirconCode
Very informative for slides. I'm used to worse.

Quick UI feedback, I had to use the keyboard to get to the next slide, it
seems not possible with purely the mouse. Might want to change that.

~~~
laumars
That's a sizing problem. I couldn't work out how to switch slides until I'd
maximized my browser, allowing the neighboring slides to sneak into view (and
thus visible to click).

It's a pity the presentation isn't more responsive / dynamic to the browser's
viewable area, but at least the content is there and at least this is an
interesting topic which is worth my time scrolling through the slides - which
is the most important thing :)

------
krishnasrinivas
Somebody should port GlusterFS to Go!

------
e12e
oh, wow - I always thought FUSE was a c-library - didn't realize it was this
"smart". I guess I'll have to go look more closely at the various FUSE
projects :-)

