im working on a decentralized messaging app and generally up until recently i thought in such a system, if a peer is offline, you cant send a message… it wouldnt be “decentralized” if there was some central queue of messages.
it took embarassingly long, but then it hit me… git… just regular git is a decentralized database.
in my setup i need the ability for others to be abe to read and only i should be able to write to it. that functionality is out-the-box in git.
git is also pretty standardized so there are many providers if users want to move away from Github.
the storage requirements for my project are fairly small. typically small text messages. the data itself thats publicly readable would be encrypted.
@xoron you can. I can jump off my balcony too, but I’m not going to.
If the question is really about “can”, than the answer is definitely yes.
If it’s about if you should, than it’s a clear no. Because storing data in a GitHub Project is not the use case. Nothing in the protocols or the platform itself is optimized for that. Also GitHub could just pull the plug of your project if they ever feel that it is against their terms.
that “can” is all i need to know/confirm. im not using git in a conventional way at all.
it’ll be unfortunate if github pulls the plug on my app. a key detail about git is that its decentralised. users can use different providers like gitlab (many have a free offering). git itself can have multiple remotes for redundency.
Pretty easy for the few platforms offering this to ban you and any accounts hosting your project, even if you make a new one.
In any case it wouldn’t be on my account. It would be great for users to self-host. Things like GitHub would only make it easier to get started to test things out.
Why would they ban my account? That would be unsettling. I’m a developer. The code itself is fairly basic git stuff.
My project is hardly popular, but if it gets there, I’m sure it would impact githubs performance. Would the concern be that my app ddos GitHub? I can explicitly prevent remotes like GitHub if necessary.
Maybe you should warn your users that there is a risk of getting banned so they don’t use their actual account for that.
thanks. i’ll aim to do that. i’ll see if i can figure out who to reach out to from github and etc to ask.
Can it work? Yes. Is it a neat thought experiment? Also Yes. Is it actually a good idea? I don’t think so. Relying on github would effectively centralize it, so you’d need to strongly encourage users to use alternative hosters or, even better, self-host. At that point, why not simply use a XMPP/Matrix/DeltaChat provider/server? What tangible benefit would there be to using the git protocol instead of a dedicated distributed chat one?
I’m happy to advise people to self-host a git server. That would be ideal. The ability to do it on GitHub or codeberg would only make it easier to get started. I can put logic there to prevent using a remote with from GitHub if necessary.
In any case, it wouldn’t be on my git account.
This is all ultimately for my project which is a fairly unique approach to secure messaging. I’m trying things out.
Self-hosting an XMPP server is not harder than self-hosting a git server, and hosters exists en masse for both. I really don’t see the actual benefit of using git here, but I do see a lot of unecessary friction because it’d be using the protocol against the grain…
In my app I’m aiming for minimal steps to get started. The frontend is a pwa which works out the box as a webapp.
There is a focus on local-first storage. When connected over webrtc, no backend storage is needed.
This approach with git would be optional. Users have frequently asked about the ability to send messages offline (a completely normal expectation for messaging app). It seemed like a hard limit until this idea with git. My app works without this feature, but with nuanced tradeoffs.
If I host a git-sever myself, but that would be centralising my project.
I see. So, the benefit is that one can start using the app locally but restricted to live chat only and can add git as an optional message cache for offline users?
I think there’s a couple blockchain-based ones out there that have similar zero-setup costs, but give you the offline messages right away by putting them in the chain. And one could package at least XMPP and DeltaChat/Email in such a way, since they rely on resending to offline recipients and can run fine locally.
I guess we’d need a full description of your protocol; Maybe there is a benefit I’m not seeing. Anyway: Have fun and good luck
=^_^=That’s right. Git as an offline cache. When you read a peers message, you can also update you own git repo to say you read it, and so when the peer comes online they can update their side to delete the messages (keeping the size small)… Going further against the grain, the app doesn’t care about the history of messages deleted, so I expect to add things for purging history.
I considered the Blockchain, but i think the git approach is better. It’s hard to describe what I’m imagining. I’d like to put together a demo when I get time.
I have a full-ish description of the protocol.
https://positive-intentions.com/docs/technical/whitepaper/complete-protocol-spec
Instead of reading that, if you really want to know more, I would suggest you ask me for clarity. (Nothing about this git approach is mentioned there.)
Thx, I’ll dig into the spec next week ;-)
feel free to reach out. im reluctant to waste your time on reading through all that draft. its fairly unique and more going against the grain… not typically a good sign.
my project is far from finished including all the spec and docs.
You have noticed that GitHub has had a lot of downtime recently, right? You’d probably prefer something more stable.
Ideally I can advise people to self-host. I’m hoping to make something generic so it it can work with any git backend lit gitlab, codeberg, etc.
Honestly Git sounds terrible for this. And how is it decentralised if you are using GitHub?
i understand how it must sound but ive thought about it for a while, and it seems ideal for my particular architecture.
github isnt decentralized, but git can have multiple remotes for redundency. you could use multiple providers including selfhosted options.
GitHub has a maximum of something like 10GB of storage available. That being said, I think your described requirements don’t actually match git. If you’re just publishing messages publicly (even if encrypted) then you can do the same thing with a simple http server.
I think it’s a really poorly thought out idea.
in my project there is a focus on client-side storage. i hope it doesnt ever get to 10GB. as messages are published/read, the git DB is cleared as appropriate. i dont need the git history so i’ll do what is needed to reduce the data consumed. i dont expect it to get to that 10GB capacity, that isnt its purpose and thats a bridge i dont exprect to cross any time soon.
your absolute right about there being alternative ways to do this. i specifically want some thing a user can manage. my app right now doesnt have offline-capabilities and this is an approach to introducing that capability. using a http server would be centralizing an otherwise decentralised architecture.
i have given it some thought and i think this is the only way it makes sense for me to introduce offline messaging without centralizing.
the project is pretty complicated and its difficult to describe how it would work without an exampler so id like to share the initial idea here before i try things out to demo.
Git is designed as a permanent, historical record of text documents. You don’t “clear” it out by deleting stuff, committing, and pushing. That stuff still exists, even if you change commit history it’s going to stick around in the reflog for a long time.
There is a Repo size limit on GitHub and Codeberg, sorry to say. It’s definitely only in the MB. If you go over the size limit then there is a grace period followed by a deletion.
That would be acceptable. I can limit it to only text messages.
The aim would be for it to be able to use a generic git backend. Perhaps the advice I give should be to self-host a git server.
I don’t know but i suspect there will be wording in the terms of service against using GitHub to host services.
in this scenario, users would be creating some empty git repo to read/write to. it would be great if it isnt breaking the rules… but if it does, by using git, it would be easy enough to switch to another git provider (including selfhosted options).




