i might be missing your point but i can host a local instance of mastodon via docker with minimal effort.
https://hub.docker.com/r/gargron/mastodon/
Running a service "without a server" misunderstands the client-server model.
Perhaps you are referring to delay tolerant messaging.
Then perhaps one person goes out to another town and connects to the internet, they collect many many messages from internet.
They then come back to the isolated network and connect, everyone gets the messages they collected. I have seen this effect happen when using both laptop client and mobile phone client.
When internet was down, my phone was able to get messages. Then it connected also to the wifi and my laptop (on the wifi) was not getting messages from internet; but got from my phone.