rps17

rps17

Hi,

recently I took contact with IPFS, an attempt to improve the current web making it permanent and more resilient. I found it very interesting and with great potential to help in the development of distributed apps (dapps).

The IPFS make use of Merkle DAG and characteristics of other applications.

Currently, IPFS is implemented with GO language. I was wondering how to implement it in Elixir. I think it worth while since Elixir language is more fun to code regarding GO.

I am learning Elixir yet and have few practice in development, but trying hard to improve my skills.

To see more about IPFS:

Juan Benet explaining the IPFS at the Standford University

Thanks

Showing Posts 1 to 3

ibgib

ibgib

Well, that is a huge, non-trivial question! :smile:

They’ve been at it according to github for a couple years now, with over a hundred of contributors and almost 200 current branches! So, you would need to ask not only an elixir expert, but also a IPFS expert - which I’m not sure if there are any experts in both (yet)!

That said, and with the caveat that I know next to nothing of their actual code implementation, I have been learning about how they’re structuring it conceptually. I can tell you that ibgib has many similarities with their goals. I’m using a mechanism that is very merkle-esque. Briefly, the data structure for ibgib is ib, gib, data, and rel8ns. The ib acts as a non-unique identifier, and the gib acts (usually) as a sha-256 hash of the ib, data, and rel8ns (i.e. the “content”). This is the only data struct in the application, as the actual content of the ibgib populations (persisted in the repo) contains the actual “data structures”. As such, it is also a monotonically-increasing database, with no deletes (no “unlinking”). So if you have an ib^gib address, then you have the address to a unique, immutable thing.

So the “heart” as he calls it, the merkle(ish) dag, is there.

Ibgib does not however concern itself with the transport layer, as it is strictly agnostic to how these data get created. And since the gib acts as a hash, it should not matter what the transport layer is. I think (perhaps!) that they’re more interested in supplanting current http infrastructure, and that just isn’t something I’m remotely interested at attempting to do.

But the one big foundational concept is the one he discusses about distributability. Because of this end goal in mind, I have created each individual ib_gib as a process. It is an “immutable state” process, but a process nonetheless. This way, in the future when it grows from a single repo and a single node to a cluster of nodes and whatever db substrate implementations (because the db is just a persistence mechanism), any users can talk to any of their “local” ibgib processes to interact with.

But one of the big problems with using Elixir, and this is probably important for you with regards to your question, is regarding what he discusses in the video you linked as the “offline” disconnected scenario. In order to effect this, you have to be able to have the engine running on any client. This is similar to how git can operate locally on any node and then merge changes/interact with servers, as the servers are just other nodes in the merkle dag.

Elixir, at the current time, only runs where erlang (the BEAM!) runs, and as best as I can tell, that does not currently include apple iOS or Android. Perhaps this is why the IPFS team is approaching the transport layer?

Anyway, I have no idea if this helps you on your question, but I just had to go ahead and respond because IPFS looks very interesting!

rps17

rps17 OP

Hi! thanks for your interesting answer. Certainly it helped me to see the big challenge to implement IPFS using Elixir. I’ll try to understand the ibgib.

I also think IFPS iss approaching the transport layer.

Thanks again and good lucky!

— All posts loaded —

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 92995 915
New
caslu
I want to open this thread for you all to discuss and help those who really like Ash but are still hesitant to use it in a real project. ...
New
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
GES233
I’m posting this in response to Jose’s recent tweet (Cr. link) : People are sleeping on Elixir for a coding harness: Hot-code swappi...
New
_mfierro
Hello, I wrote Stop My Hand, a Scattergories-like web application using Phoenix/LiveView as my learning project for Elixir (after readin...
New
marciol
It would be helpful to have a list of companies worldwide that hire engineers without prior experience in Elixir. Often, it can be quite ...
New
durvia
Anyone running long-lived stateful processes on BEAM? We’re building an AI agent runtime and would love to compare notes. We’re a small ...
New

Other Trending Topics Top

garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
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
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews