FAQ

[go-nuts] Reflect + FUSE

Jorge Acereda
Nov 22, 2012 at 10:04 pm
Hi,

I've been experimenting with the fuse package from Russ Cox and have come
up with something I think could be interesting.
The results are in the refuse package at:

https://bitbucket.org/jacereda/go-exp/src

go get bitbucket.org/jacereda/go-exp/refuse

The package allows to 'mount' structs in the filesystem and allows
inspecting/altering the fields.
Could be useful for debugging and could also be a way to allow
extensibility using any programming language.

My first thought was a 3D engine exposing its guts in the filesystem. How
cool would be to alter the scene with your text editor and shell scripts?

It's far from finished, just a proof of concept.

Comments? Suggestions?

Regards,
Jorge Acereda

--
reply

Search Discussions

7 responses

  • Rory McGuire at Nov 23, 2012 at 7:57 am
    If you put in a callback system it could be really nice for configuration.
    On Friday, 23 November 2012 00:04:29 UTC+2, Jorge Acereda wrote:

    Hi,

    I've been experimenting with the fuse package from Russ Cox and have come
    up with something I think could be interesting.
    The results are in the refuse package at:

    https://bitbucket.org/jacereda/go-exp/src

    go get bitbucket.org/jacereda/go-exp/refuse

    The package allows to 'mount' structs in the filesystem and allows
    inspecting/altering the fields.
    Could be useful for debugging and could also be a way to allow
    extensibility using any programming language.

    My first thought was a 3D engine exposing its guts in the filesystem. How
    cool would be to alter the scene with your text editor and shell scripts?

    It's far from finished, just a proof of concept.

    Comments? Suggestions?

    Regards,
    Jorge Acereda
    --
  • Jorge Acereda at Nov 23, 2012 at 8:39 am

    On Friday, November 23, 2012 8:56:58 AM UTC+1, Rory McGuire wrote:
    If you put in a callback system it could be really nice for configuration.

    There is already one way to get notifications (see MonitoredVector4 in
    refuse_test.go, it should print a message each time it's changed).
    But there's probably a better alternative (probably involving a channel),
    I'm just trying to figure out what it is...
    Any idea?

    --
  • Rory McGuire at Nov 26, 2012 at 12:17 pm
    Just trying to run the tests now. It wasn't working because the permissions
    were unset; I changed line 79:

    cmd := exec.Command("install", "-d", base, "-m", "0777")


    This would be quite an interesting improvement to doozerd.


    On Friday, 23 November 2012 10:39:36 UTC+2, Jorge Acereda wrote:


    On Friday, November 23, 2012 8:56:58 AM UTC+1, Rory McGuire wrote:

    If you put in a callback system it could be really nice for configuration.

    There is already one way to get notifications (see MonitoredVector4 in
    refuse_test.go, it should print a message each time it's changed).
    But there's probably a better alternative (probably involving a channel),
    I'm just trying to figure out what it is...
    Any idea?
    --
  • Si guy at Nov 26, 2012 at 10:34 pm
    Hmm. This looks like it could be used to present a mongo db as a filesystem, gonna give it a try this afternoon. Fantastic work.

    --
  • Jorge Acereda at Nov 27, 2012 at 10:01 pm

    On Nov 26, 2012, at 1:17 PM, Rory McGuire wrote:

    Just trying to run the tests now. It wasn't working because the permissions were unset; I changed line 79:

    cmd := exec.Command("install", "-d", base, "-m", "0777")
    Changed, thanks.


    This would be quite an interesting improvement to doozerd.



    On Friday, 23 November 2012 10:39:36 UTC+2, Jorge Acereda wrote:


    On Friday, November 23, 2012 8:56:58 AM UTC+1, Rory McGuire wrote:
    If you put in a callback system it could be really nice for configuration.


    There is already one way to get notifications (see MonitoredVector4 in refuse_test.go, it should print a message each time it's changed).
    But there's probably a better alternative (probably involving a channel), I'm just trying to figure out what it is...
    Any idea?


    --
    --
  • André Moraes at Nov 27, 2012 at 11:43 am
    Just adding my 2 cents:

    1 cent: Fantastic work indeed
    1 cent: Another interesting thing would be to implement the same idea
    but using 9P, that way you not only provide a file-system interface to
    your structs but also enable distributed access to them.

    I wish my day had 30 hours to work on things like that. :)

    --
    André Moraes
    http://amoraes.info

    --
  • Jorge Acereda at Nov 27, 2012 at 10:31 pm

    On Nov 27, 2012, at 12:35 PM, André Moraes wrote:

    Just adding my 2 cents:

    1 cent: Fantastic work indeed
    Thanks, just a hack but could grow into something useful...
    1 cent: Another interesting thing would be to implement the same idea
    but using 9P, that way you not only provide a file-system interface to
    your structs but also enable distributed access to them.
    What would be needed? 9pgo + 9pfuse? Looks like it would end up being slower than a fuse-only solution for local access.
    For network access, you could always export the mounted fuse filesystem via NFS or similar and in this case the penalty would be less important (since the slow network is in-between anyway).
    I wish my day had 30 hours to work on things like that. :)

    --
    André Moraes
    http://amoraes.info
    --

Related Discussions

Discussion Navigation
viewthread | post