-
-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server-side of fetch/pull #307
Comments
Just to be clear, this doesn't mean reimplementing things from |
If I understand the question correctly, the answer is yes. The client of |
This is very desirable to be able to quickly implement your own self-hosted git server (existing ones in other langs require too much memory and therefore are a poor fit for cheap vms). |
I think it might be enough to accept |
I've been experimenting with writing a server (in a private repo so far). My interest here is in using parts of gix for the protocol, but leaving the storage up to pluggable backends. I'm very curious about git-on-db, and git-on-object-storage, and git-on-kv-store, and mixtures of the three. Step 1 of this is to have a clean working HTTP git server written with gitoxide, using it's filesystem access as the only storage backend. I think I have So for me a sketch might look like this:
It's possible that a sufficiently advanced AsyncWrite could have a buffer and be appended to the HTTP response after writing the headers (in-case the command parsing wanted to reply with errors in packet-line format?). I have also spent no time so far learning about the SSH transport. But those are my thoughts so far. I also have some questions about packfile construction. I haven't spent a great deal of time investigating yet but I currently haven't found much in the existing gitoxide codebase. Especially relating to resolving packfiles between two peers, but there must be some logic in gix for this somewhere. I'll keep looking, and if anyone is particularly interested in collaborating let me know and I can un-private the repo, I'm just quite enjoying the messy private sandpit atm. |
That's great news! Please be sure to let us know here once the repo goes public! Regarding the sketch, the server would probably also reject V1 requests. But then, In general, it's probably OK to just cobble it together and then refactor. pack creationRegarding packs, you can try TransportsYou can check the client-side (use |
What would be needed to allow a server to send a pack?
Tasks
Server fetch/pull (server to client)
The below is a very early draft - it would be better to study existing implementations first to get a better overview on what (not) to do.
This one starts with the fun part to allow writing tests early and experiment with different diff algorithms and potentially their performance.
Certainly needs more research, but roughly…
Server side
accept()
daemonprobaby only used in testing, and we might implement it if it's useful for us as wellgit-protocol
gix-serve
Probably more like a toy at first merely for testing operation against various git clients.
Notes
gittorrent
be build using the plumbing of the server? Is it desirable even? Can there be some differentiation to allow custom transport layers easily?The text was updated successfully, but these errors were encountered: