hauleth

hauleth

This is pure Erlang 9p2000 (no extensions for now) implementation with some basic filesystems implementation (passthrough unfs and sysfs exposing ERTS informations).

It is first release, very rough at the edges, with very basic connection handling, but is at least minimally functioning. I hope to expand it further to make implementation of custom filesystems much easier and to implement 9p2000 extensions easier.

Currently implemented:

  • unfs - Unix filesystem passthrough. It supports directory traversal, file reading/writing, but so far no file creation or deletion
  • sysfs - procfs/sysfs-like pseudo-filesystem that is exposing ERTS internals as plain files. For now the accessible informations are - loaded applications and their data (environment, versions, etc. as accessible via application:get_all_key/1), process information (as available via erlang:process_info/2), and sytem information (as available via erlang:system_info/1). In version v0.1.0 this whole filesystem is read-only.

Unsupported features:

  • No authentication - authentication components are currently completely ignored from implementation
  • Only one connection at the time possible - current connection handler is super simple and do not support multiple clients
  • Only raw TCP supported - no Unix sockets nor TLS connections at the time of being
  • No permission validation - if someone connects and the Erlang can edit file, then they will be able to do so, do not expose that service to untrusted parties

Hex: e9p | Hex

Source:

Showing Posts 1 to 10

Terbium-135

Terbium-135

+1 for using tangled!

garrison

garrison

Very cool. Do you have a particular use-case in mind for this or is it just for fun?

+2, gonna move my stuff there soon :slight_smile:

hauleth

hauleth OP

The idea there was to provide a library that will allow me to expose Erlang state to operators that aren’t super familiar with Erlang. Filesystem is good interface there.

Additional goal was to allow exposing libraries like khepri as a filesystem for distributed FS-like database access. I want it to became a building block for people to construct more on top.

Example usecase may be for example exposing LiveBook notes as files, so you can edit these from your own editor, with all your plugins and configuration, and then immediately see updated documents in your browser. Sky is the limit.

garrison

garrison

Interesting. I’m planning on layering a distributed filesystem/object store on top of Hobbes (it will make a great metadata store). So I could then use this to provide a real filesystem interface? That would be cool.

krasenyp

krasenyp

One small suggestion. In my experience, it’s idiomatic for Erlang libraries to provide start_monitor and start functions, in addition to start_link.

hauleth

hauleth OP

Yeah, Hobbes was another project that I wanted to be able to provide FS interface to.

hauleth

hauleth OP

Yeah, for sure, the current implementation of server is super basic as it allows only single client. It will be expanded with different functions as well as child_spec/1 for simplifying Elixir usage.

derek-zhou

derek-zhou

So that I can [9pfuse}(9pfuse(4) - Plan 9 from User Space) on anything that support it? Super cool.

Can’t wait to see .#* *~, .DS_store spring up everywhere in your neat database!. :slight_smile:

hauleth

hauleth OP

Yes you can. I have tested it locally (so far, automated tests will come up in future) and it works. 9pfuse and Linux built in v9pfs works with e9p. Another implementation tested is kamiftp. I am also planning on client implementation so it will not only be server, but client as well (it should also help with testing).

lawik

lawik

Nerves Core Team

This is interesting. We recently made a nerves sustem for qemu and one of the ways people often do exchange between a host and guest seems to be 9p. So this would allow doing that all in Elixir/Erlang I suppose.

Seems really neat.

Where Next? Top

Trending in Announcing Top

bluzky
You may know https://ui.shadcn.com/, a UI component library for React. I really love it’s design style and components. I’ve built some co...
387 15136 120
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
restlessronin
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub. Docs are at OpenaiEx User Gu...
152 11030 135
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
shahryarjb
The Chelekom project is a library of Phoenix and LiveView components generated via Mix tasks to fit developer needs seamlessly. One of i...
New
woylie
Phoenix components for pagination, sortable tables and filter forms with Flop and (optionally) Ecto. pagination cursor pagination sorta...
New
kip
Please say hi to a new lib, Astro that aims to deliver easy-to-consume astronomy calculations of practical use. For now it only calculat...
New

Other Trending Topics Top

akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New
Herve37
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using. We’re particularly inte...
New
mudasobwa
I am seeing a lot of aplications of Argumentum ad Vericundiam in software discussions. They do link some piece of writing and point us to...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews