-
Notifications
You must be signed in to change notification settings - Fork 157
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
Integrate irmin-server #2031
Integrate irmin-server #2031
Conversation
7e3a375
to
52476b9
Compare
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## main #2031 +/- ##
==========================================
+ Coverage 68.84% 68.86% +0.02%
==========================================
Files 132 133 +1
Lines 16165 16208 +43
==========================================
+ Hits 11128 11162 +34
- Misses 5037 5046 +9
... and 6 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
7969228
to
dab56ef
Compare
39dcc94
to
cd1e000
Compare
aba72af
to
a6beafb
Compare
let* tree = | ||
Client.Batch.Tree.of_commit client (Client.Commit.hash head) >|= Option.get | ||
in | ||
let* tree = Client.Batch.Tree.add client tree [ "b"; "c" ] "123" in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zshipko could you describe the rational of Batch
here? Does it mean that Client.Tree
always connect to the server while Client.Batch.Tree
is maintaining a local tree?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right, the Batch
API allows you to manipulate a local tree and send it all at once since the Irmin Store
API doesn't give much control over when data will be transferred over the network.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind adding a bit of documentation about this somewhere? Maybe in the corresponding mli?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am in the process of adding some more comments, I will push something up this week
@zshipko could you remove the Draft status on this PR? I've force-pushed a rebase - I'm happy to shepherd it until completion. It's a really nice, useful work :-) Edit: I actually found how to remove the Draft status.. |
b034337
to
e280bc3
Compare
Great! I'm happy to help answer any questions |
8ac7d0f
to
b28d0b7
Compare
I've added minimal documentation. @zshipko I am not sure happy with the current ID management - that seems very error prone (if you forget to call
Ideally it would also be nice if |
Modulo my comments above, this is ready to be merged - the current API subsumes the low-level HTTP API (which should be faster and more reliable). So I plan to delete This PR adds an interesting (but still needs to complete) higher-level API for efficient tree batching. I'm tempted to either remove it and open another PR with just this to iterate or to mark it as highly experimental until we find the right way to manage remote resources. |
@samoht I'm all for merging this and then following up with more improvements. Thanks for picking this up!
|
I had some issues with getting the It seems like adding a That being said, removing it altogether and coming up with something more sound also seems like it could yield something interesting! Also, with OCaml 5 the way the ID tracking is done is not very nice (it uses a global Hashtbl and global ref) and probably needs some additional considerations anyway. |
b1604a2
to
2ad9cfb
Compare
We can trim those later if there is a need - right now, let's try to have something easy to install first.
2ad9cfb
to
4046041
Compare
4046041
to
d593ff2
Compare
Flushing causes multiple packets to send and trips over Nagle's algorithm (+ maybe delayed acks). Previously TCP tests were significantly slower than WebSocket. The WebSocket implementation uses TCP_NODELAY, which also fixes the slow tests, but the issue is better addressed by properly writing/flushing our requests as a single packet.
1cddfba
to
bd71dae
Compare
CHANGES: ### Added - **irmin-server** - Added `irmin-server` package (mirage/irmin#2031, @zshipko) - **irmin-client** - Added `irmin-client` package to connect to `irmin-server` instances (mirage/irmin#2031, @zshipko) - **irmin** - Add pretty printers for `Commit`, `Tree`, `Info`, `Status`, `Branch` when using `utop` (@metanivek, mirage/irmin#1839) ### Fixed - **irmin-pack** - Fix index integrity check for v3 stores (mirage/irmin#2267, @metanivek) ### Removed - **irmin-http** - Removed `irmin-http` since it is not compatible with generic keys. `irmin-grapqhl` or `irmin-server` should be used instead. (mirage/irmin#1902, @zshipko) - **irmin** - Removed stream proofs. We now only have Merkle tree proofs. This simplifies the maintenance of that part of the code, as ensuring the correct order of cached IO operations was tricky for stream proofs (mirage/irmin#2275, @samoht) ### Changed - **irmin-git** - Moved lower bounds to `git.3.14.0` to use new function (mirage/irmin#2277, @metanivek)
CHANGES: ### Added - **irmin-server** - Added `irmin-server` package (mirage/irmin#2031, @zshipko) - **irmin-client** - Added `irmin-client` package to connect to `irmin-server` instances (mirage/irmin#2031, @zshipko) - **irmin** - Add pretty printers for `Commit`, `Tree`, `Info`, `Status`, `Branch` when using `utop` (@metanivek, mirage/irmin#1839) ### Fixed - **irmin-pack** - Fix index integrity check for v3 stores (mirage/irmin#2267, @metanivek) ### Removed - **irmin-http** - Removed `irmin-http` since it is not compatible with generic keys. `irmin-grapqhl` or `irmin-server` should be used instead. (mirage/irmin#1902, @zshipko) - **irmin** - Removed stream proofs. We now only have Merkle tree proofs. This simplifies the maintenance of that part of the code, as ensuring the correct order of cached IO operations was tricky for stream proofs (mirage/irmin#2275, @samoht) ### Changed - **irmin-git** - Moved lower bounds to `git.3.14.0` to use new function (mirage/irmin#2277, @metanivek)
This PR adds
irmin-server
andirmin-client
packages in place of ofirmin-http
TODO
irmin-server-unix
,irmin-client-unix
andirmin-client-jsoo
packages