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

woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
MRdotB
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
woylie
I released Doggo, a collection of unstyled Phoenix components. https://github.com/woylie/doggo Features Unstyled Phoenix components....
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
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
anuaralfetahe
Hello Published a new library - ProcessHub! ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
sergio
It’s not that it’s vocabulary is too advanced. It’s something worse. I get lost trying to follow even a paragraph written by Claude. It’...
New
AstonJ
This showed up on my feed.. anyone heard of it? Just hype? Ox Alpha is a reasoning model designed for coding, sustained ag...
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

Latest on Elixir Forum

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews