# Decentralized social network

**URL:** <https://forum.ada-lang.io/t/decentralized-social-network/4521>\
**Category:** Ideas\
**Tags:** ada\
**Created:** [June 26, 2026, 5:29pm UTC](https://forum.ada-lang.io/t/decentralized-social-network/4521 "2026-06-26T17:29:38Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![drozsas](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/drozsas/32/1023_2.png) [@drozsas](https://forum.ada-lang.io/u/drozsas)\
**Post date:** [June 26, 2026, 5:29pm UTC](https://forum.ada-lang.io/t/decentralized-social-network/4521/1 "2026-06-26T17:29:38Z")

</div>

Hello, people!  
I’m writing a decentralized and federated [anti-]social network with Ada.  
Connections (both client-server and server-server) are supposed to happen through SSH – the server-side application is to be executed as a command inside a SSH session.  
The implementation of the reference server application is almost complete.

I also wrote a bunch of dependencies (localization and internalization, logging, versioning, etc.).

Please take a look and tell me if it’s worth anyone’s time: [Kyan: Decentralized social network implementation](https://sr.ht/~devin/Kyan/)  
Tip: it’s a Mercurial repository – i.e. not Git

My main goal with this is to show people that Ada is useful for more mundane things that don’t involve launching rockets and satellites into space. 😄

---

<div class="post-metadata">

**Author:** ![OneWingedShark](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/onewingedshark/32/305_2.png) [@OneWingedShark](https://forum.ada-lang.io/u/OneWingedShark)\
**Post date:** [June 26, 2026, 5:42pm UTC](https://forum.ada-lang.io/t/decentralized-social-network/4521/2 "2026-06-26T17:42:19Z")

</div>

> [@drozsas](#):
>
> Connections (both client-server and server-server) are supposed to happen through SSH – the server-side application is to be executed as a command inside a SSH session.

I have incredible doubts about using SSH for this; not that it can’t be done, but that this is not a good way to do this: you’re doubling the dependency on ‘text’, and probably building in dependency to the OS. — Of course, this could just be my misunderstanding what you mean, but it is far better to think first about the data and structure, _and then_ consider the ‘textuality’ of any of it. (That is to say, if you were making a microblogging service like twitter or gab, your concerns would not be about `String`, but about the structures and protocols [even the concerns about things like script-injection are can be prevented by viewing user-submitted strings and stored-message strings as separate things]. As to the “unix-way”, it forces repeated _ad hoc_ processing precisely because it is ‘plain text’, especially when it is not.)

---

<div class="post-metadata">

**Author:** ![drozsas](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/drozsas/32/1023_2.png) [@drozsas](https://forum.ada-lang.io/u/drozsas)\
**Post date:** [June 26, 2026, 5:50pm UTC](https://forum.ada-lang.io/t/decentralized-social-network/4521/3 "2026-06-26T17:50:06Z")

</div>

Sockets would have the same problem: they’re platform dependent. Furthermore, there are different library implementations for them. That’s precisely why I didn’t use them – I would be dependent on a specific library (e.g. `GNAT.Sockets`).

I decided to go for the SSH instead because the server would be a normal application running on a remote host.  
The client would use SSH to connect to it, run the command and give parameters to it (like the contents of a post).  
SSH is present even on Windows these days, so I don’t worry about it.

I f I understood your doubts correctly, that’s how I’m passing data to it: CLI parameters.  
Except for files, which are to be handled by SFTP – not the protocol itself.

---

<div class="post-metadata">

**Author:** ![Max](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/max/32/21_2.png) [@Max](https://forum.ada-lang.io/u/Max)\
**Post date:** [June 26, 2026, 5:50pm UTC](https://forum.ada-lang.io/t/decentralized-social-network/4521/4 "2026-06-26T17:50:31Z")

</div>

I wonder how you will make moderation in such social networks?

---

<div class="post-metadata">

**Author:** ![drozsas](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/drozsas/32/1023_2.png) [@drozsas](https://forum.ada-lang.io/u/drozsas)\
**Post date:** [June 26, 2026, 5:51pm UTC](https://forum.ada-lang.io/t/decentralized-social-network/4521/5 "2026-06-26T17:51:51Z")

</div>

This is defined by an extension. Ext#6, if I’m not mistaken.

The protocol specification is here: [Marin: Decentralized social network protocol specification](https://sr.ht/~devin/Marin/)

---

<div class="post-metadata">

**Author:** ![dmitry-kazakov](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/dmitry-kazakov/32/522_2.png) [@dmitry-kazakov](https://forum.ada-lang.io/u/dmitry-kazakov)\
**Post date:** [June 26, 2026, 6:15pm UTC](https://forum.ada-lang.io/t/decentralized-social-network/4521/6 "2026-06-26T18:15:47Z")

</div>

> [@drozsas](#):
>
> Sockets would have the same problem: they’re platform dependent.

Sockets are far less platform-dependent than SSH. Each modern OS have a socket implementation with Berkeley sockets interface. GNAT.Sockets is not necessary, though it is a de-facto standard for Ada.

P.S. A text/message-oriented approach is highly **non** -Ada. The core idea of engineering software in Ada is deploying strong typing.

---

<div class="post-metadata">

**Author:** ![drozsas](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/drozsas/32/1023_2.png) [@drozsas](https://forum.ada-lang.io/u/drozsas)\
**Post date:** [June 26, 2026, 6:28pm UTC](https://forum.ada-lang.io/t/decentralized-social-network/4521/7 "2026-06-26T18:28:44Z")

</div>

The parameters would be converted before actually being used.  
I used proper type-safety in the implementation, as well as in the specification: despite being texts, some parameters are expected to be valid images of other types so they can be properly converted to their correct types.

_Before SSH, I thought of using Sockets, but I ran into multiple problems, including the extremely raised complexity that it entailed. ☹  
And using sockets wouldn’t really fix the type safety thing, as I was thinking of using JSON to transmit data (which is still just text in the end of the day)._

---

<div class="post-metadata">

**Author:** ![cantanima](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/cantanima/32/121_2.png) [@cantanima](https://forum.ada-lang.io/u/cantanima)\
**Post date:** [June 26, 2026, 6:38pm UTC](https://forum.ada-lang.io/t/decentralized-social-network/4521/8 "2026-06-26T18:38:36Z")

</div>

> [@drozsas](#):
>
> I’m writing a decentralized and federated [anti-]social network with Ada.

What’s an anti-social network?

---

<div class="post-metadata">

**Author:** ![drozsas](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/drozsas/32/1023_2.png) [@drozsas](https://forum.ada-lang.io/u/drozsas)\
**Post date:** [June 26, 2026, 7:00pm UTC](https://forum.ada-lang.io/t/decentralized-social-network/4521/9 "2026-06-26T19:00:24Z")

</div>

Please, refer to [protocol.ada](https://hg.sr.ht/~devin/Kyan/browse/src/common/protocol.ada?rev=tip) to see what I’m talking about. Even string types are their own new types (e.g. Username) and there are plenty of dynamic predicates to check for their validity.

I just didn’t create these checks for bounded strings and bounded code-point sequences – but that was an oversight on my part which **I will fix** as soon as I have the time. I was trying to get around this issue through other means, like converting the env var USER to a username, and then back to a string, just to check if it’s valid; this works, but is suboptimal and prone to error, and I intend to undo this madness as soon as possible. 😅

---

<div class="post-metadata">

**Author:** ![drozsas](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/drozsas/32/1023_2.png) [@drozsas](https://forum.ada-lang.io/u/drozsas)\
**Post date:** [June 26, 2026, 7:03pm UTC](https://forum.ada-lang.io/t/decentralized-social-network/4521/10 "2026-06-26T19:03:22Z")

</div>

For starters, the base protocol has nothing like a feed that pushes mediocre content to you.

You just download the posts and comments of people you’re following and other stuff that interests you, but there’s no algorithm dictating what you’ll see.

There’s also limited data collection – though you’ll need to see if your provider is trustworthy.

There’s another thing on normal social networks that makes me angry, but I can’t really put my finger on it… maybe it’s how people are constantly trying to “fit in”, becoming just another brick on the wall in the process? I don’t know for sure…

---

<div class="post-metadata">

**Author:** ![charlie5](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/charlie5/32/626_2.png) [@charlie5](https://forum.ada-lang.io/u/charlie5)\
**Post date:** [June 26, 2026, 7:22pm UTC](https://forum.ada-lang.io/t/decentralized-social-network/4521/11 "2026-06-26T19:22:14Z")

</div>

Did you consider using DSA, at all ?

---

<div class="post-metadata">

**Author:** ![drozsas](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/drozsas/32/1023_2.png) [@drozsas](https://forum.ada-lang.io/u/drozsas)\
**Post date:** [June 26, 2026, 7:46pm UTC](https://forum.ada-lang.io/t/decentralized-social-network/4521/12 "2026-06-26T19:46:51Z")

</div>

More or less. The thought passed through my mind, but ultimately, I decided that DSA would make federation difficult (if not impossible) without the use of complex configurations or Sockets themselves.

But all its dependencies are properly categorized for use in DSA (pure, remote type, etc.).

\*I was also trying to avoid the use of Ada-specific tools.
