Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Mastodon and ActivityPub (medium.com/gargron)
148 points by gargron on Sept 10, 2017 | hide | past | favorite | 25 comments



Will Mastodon continue to be compatible with GNU social as well?


OStatus is what GNU Social uses, and the OP says it will continue to support OStatus, so yes.


Mastodon will support OStatus until version 2.0, so until then, yes, but if GNU Social does not implement ActivityPub, 2.0 will break compatibility.


No, 2.0 is not changing our support with GNU/Social. 2.0 is removing Mastodon-only OStatus extensions that have been replaced with ActivityPub. Mastodon currently has no plans to remove OStatus support for public posts or stop targeting GNU/Social compatibility as a goal of the porject.


Not quite. Version 2.0 will remove some OStatus extensions that we originally invented to circumvent the limitations of OStatus in regards to privacy. Traditional OStatus support will remain for the foreseeable future.


Does implementing ActivityPub mean identities can be portable across servers now?


Hi! I'm co-editor of ActivityPub, so maybe I can answer some things. Identity portability could mean a few things; ActivityPub on its own will let you interact with identities on other servers (though Mastodon could do this before its adoption of AP, through OStatus... it has better private delivery now though). However, maybe what you mean is the ability of an identity to be "nomadic". If you use ActivityPub with https based identifiers, you're still tied to a single instance.

However! It will be possible for ActivityPub applications to move in the direction of being more distributed systems... in fact I wrote a paper on this which I will be presenting at Rebooting Web of Trust in October: https://gitlab.com/dustyweb/talks/blob/master/activitypub/rw...

There's a lot of ideas in that paper, but the one that applies to a nomadic identity is Decentralized Identifiers support, or DIDs: https://w3c-ccg.github.io/did-spec/

DIDs are being worked on by the W3C Credentials Community Group (which I am also a part of) and will permit having an identity that is "self-soverign". How I imagine this would work in an application like Mastodon, if Mastodon decides to include support for it in the future, is that you would register a DID for yourself and then go to your profile page and associate that DID with your user. You'd then have identity that isn't tied to one specific node... indeed, in such a direction we'd begin to blur the line between the federated client-server web application model and peer to peer networks.

That's a ways off though. For now I think ActivityPub brings a lot of benefits to Mastodon (though I'm biased obviously). Still lots of exciting future ahead though!


Why not just use normal build signing of posts? All posts signed by the same private key have the same author even if published on different modes etc. There is finesse for supporting subkeys and revocation and all the rest, but talking with a security consultant will sort out those kind of details.


You could turn the whole thing on its head, have users sign their messages and broadcast them to anyone; a direct message would be encrypted to the expected recipients. Now you don't care about the particularities of an instance or opening an account, becaus all the work is happening on your machine. There is no migration, only transferring your database from a computer to another.

This is basically what secure scuttlebutt is doing:

https://www.scuttlebutt.nz/


Thanks very much for the explanation!


Previous discussion about Mastodon: https://news.ycombinator.com/item?id=15211074


mastodon is going to die. Even us, hackers can't figure it out. Go do something different. Not a copycat!


Speak for yourself! This hacker had no trouble using it and I deleted my Twitter account a month ago!


It's easy. Go to instance, join instance, start tooting. There's nothing complicated about it.


I wonder how 2000 servers can host 800.000 users. It means that, on average, a server can host 400 users. I really appreciate this project for several reasons, but it (sadly) looks like a waste of resources with these numbers.


Does, not can. If you look at lists, there are tons of tiny instances: experiments, some people using their own instance as their private homepage, or just one for a few friends. People being able to do that is a strength of a federated system, and it's far from clear it actually is "wasting" something without looking into it in a lot of detail. It's not like all of these instances sync completely with each other.

The biggest instance has 250k users, and the top 10 instances together have 600k user (75% of of those 800k). I don't have info how these large instances map to actual servers, but I don't think Mastodon currently has a lot in the way of features to split an instance across machines.

(Data from https://instances.social)


You can split Mastodon to several servers easily. Postgres, Redis, Sidekiq, Streaming API, Puma, Nginx and Media Storage can all be placed on different servers. Even multiples for each. You can read here about https://medium.com/@Gargron/scaling-mastodon-1becde463090 how Eugen had Mastodon.social running a few months ago.


Systems like Twitter, Facebook, etc use tons of resources scaling up. There may be some duplication amongst it but spreading things out also distributes much of the load.

Has the internet really regressed so much that developers would also make the argument that it's a better idea to have one or two email providers, for instance, than have it be a distributed system? What about many wordpress instances, etc?


Instances are not equivalent to servers. Just because you have 2000 instances, you don't need 2000 servers to run it. Just like you don't have a single server per WordPress install.

For example, I have 100 Mastodon instances running using 8 VMs at https://masto.host/

I can tell you that a VM with 2vCPUs can run 30 small instances easily (CPU load average under 50%) as long as you have 1GB of RAM for each.

So, if you have a server running, I am sure you can add Mastodon to it and the only thing you will notice is the 1GB of RAM usage. If you want to install it for a small group of users, just find a sharing hosting space like mine or go with a $3 VPS and you will be more than fine.


Even if you can potentially run several instances per server (with enough ram), I think that an usable one should run on a dedicated server. Considering that a Rails app doesn't run like a webserver with php installed, just like you can do with WordPress or php apps in general. Also, I suppose 1gb is required to run the instance, but it isn't known how many users can host decently.


I think I understand what you are saying but depending on the use case it is not only usable but it runs great.

I have instances with a couple of thousands of users and it runs smoothly with shared resources.

It really depends on what you want to build. If you want to create an instance for a small specific group of people or you want to open it to the masses. I haven't tested concurrent users but I can tell you from all the instances I run, nobody ever mentioned an issue of slowing down when experiencing heavy traffic.

I have noticed that cPanel has been pushing RoR https://documentation.cpanel.net/display/ALD/Ruby+on+Rails and I haven't tested it or know of the security implications but I am pretty sure that with enough tweaking one could install Mastodon on a cPanel server with other apps running in PHP.


Anybody can open up a server. The bulk of users are going to sit on the first few hundred servers (I imagine there's a handful of popular servers for each language) and then the rest are just instances that people host because they can or for their group of friends to hang out on.


  (I imagine there's a handful of popular 
  servers for each language)
As far as I can see, there's a handful of servers, full stop. Some level of criticality exists and is yet to be achieved here.

Edit: gosh no, I'm completely wrong. I looked at the instance list at https://joinmastodon.org/ but didn't see there was a scrollbar!


Are you trying to say that there are too many or too few users on each server?

Either way, 1. If you take out the 5 largest servers, the average drops significantly. I don't have the numbers available now, but the average may go to 50 without the top 5 largest servers. 2. The biggest barrier to getting more people to set up servers is that it requires a lot of resources (a.k.a. more money going to your favorite VPS provider), with the reputation of a fiddly install being a close second.


You don't need a lot of resources to set up an instance. Mastodon runs easily with less than 1GB of RAM and 1vCPU. Also, you can even install it in a shared server, like you do say a WordPress. I have a hosting service dedicated to Mastodon https://masto.host/ where I host around 100 instances in shared environment in a Cloud of 8 VM.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: