Hey, Good idea bad pitch, lets use Git as a messaging queue! lets use github to synchronize a cluster of them together.
Lets get the obvious out of the way, You already know we use Git to keep track of our code changes, and we need a central point to pull and push these changes, this is why we use github/lab/bitbucket…etc.
Alright, now lets introduce another idea: Git commits doesn’t need to include changes, so you don’t need to have to create files then commit these files to your git repo, you can create an empty commit with a command like this
git commit --allow-empty -m "commit message"
OK, so the commit message can be any text right? that means you can have JSON messages or YAML or any other machine readable format as a commit message.
So now imagine this scenario:
messageto this repo every time you need to
Now you have a queue of messages that can’t be altered, communicated between servers and all data saved in a git repository.
This idea is flexible and can be modified for several use cases:
This idea can as simple as invoking git commands from your application with a system call, or use libgit to manipulate the repository for you, or even a small server application that communicate over a socket, or a repo service that communicate over even HTTP, there are so many ways to implement that concept.