Leonidas-from-XIV / orewa

An Async-friendly Redis binding
https://leonidas-from-xiv.github.io/orewa/
Other
15 stars 1 forks source link

Pipelining #2

Closed andersfugmann closed 5 years ago

andersfugmann commented 5 years ago

This PR adds pipelining support, so users can issue requests concurrently over a single connection.

Since reply decoding is only done by one thread, parse.ml has been greatly simplified, and deleted atomic_read test.

I also removed the `Eof error, as I believe its the same as `Connection_closed, which is returned if either ends closes the connection.

This closes #1

andersfugmann commented 5 years ago

Travis complains that the PR does not build on async v0.11. I will fix that and maintain forward compatibility to async v0.12.

andersfugmann commented 5 years ago

Btw. I have a test program lying around to test that we handle Redis crashes correctly. For obvious reasons it cannot be part of the test suite, but It did help me identify a problem. Should I add it to the PR?

Leonidas-from-XIV commented 5 years ago

Yes, that'd be good. While I am not totally opposed to only using v0.12 in the future this would mean that the only supported OCaml version for now would be 4.07.

(Also I have some beef with v0.12 at the moment because it is missing UDP support so I can't upgrade to it)

Leonidas-from-XIV commented 5 years ago

Should I add it to the PR?

Yes, please do. If it is not run as part of the regular tests it might bit-rot over time but it is still better than not having it.

andersfugmann commented 5 years ago

I've added the extra test and compatibility to core v0.11 has been restored. Merge at will :-)

Leonidas-from-XIV commented 5 years ago

Great, thanks! I'll try to review it today evening and cut a release ASAP.