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@programming.dev
    cake
    OP
    link
    fedilink
    arrow-up
    1
    arrow-down
    2
    ·
    2 days ago

    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.

    • Arcanoloth@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      2 days ago

      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…

      • xoron@programming.dev
        cake
        OP
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        2 days ago

        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.

        • Arcanoloth@lemmy.ml
          link
          fedilink
          arrow-up
          1
          ·
          2 days ago

          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 =^_^=

          • xoron@programming.dev
            cake
            OP
            link
            fedilink
            arrow-up
            2
            arrow-down
            1
            ·
            edit-2
            2 days ago

            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.)

              • xoron@programming.dev
                cake
                OP
                link
                fedilink
                arrow-up
                1
                ·
                2 days ago

                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.