This repository was archived by the owner on Apr 6, 2019. It is now read-only.
Remove boost asio dependency#8
Merged
Merged
Conversation
…e io_service based on select
…lient destruction. Silent potential select errors due to closed fd
…tion. Also handle concurrency issue concerning untracking in the io_service
…e implementation (while keeping the previous implementation inside a .cpp.old file. Also clean and patch possible bugs in the tcp_client implementation.
…ecursive_mutex to clean the mess in the io_service concerning mutex locks and callback handling (with possibility of reentering). Also patch a bug causing commands to be sent incorrectly at some random points
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal
This pull request aims to remove the boost asio dependency for multiple reasons.
Reasons
The most important one is that I want the library to be as lightweight as possible and Boost.Asio adds a lot of stuff that is not necessary in a case as simple as a redis client (that is, a simple TCP client).
Another important thing is that Boost.Asio was introducing lots of code complexity and some strange behavior/bugs/valgrind errors (see #5 for example) which were hard to debug.
Using directly the raw socket API solves these 2 main things, and a lot more.
Client modifications after the update
A good thing concerning this update is that the public part of the API remains unchanged and should not caused any modification of the code base for people currenlty using this library and wanting to upgrade it.
Compatibility
As before, support is provided for both Mac and Linux platforms. No support is provided for now for Windows environment.
Moreover, as explained in #7, because this update uses directly the raw socket API, it is obvious that it will require a lot more work to port the library. It is currently not planned to port the library to the Windows platform.
v2.0
This pull request will constitute the 2.0 library version, that will be improved in the future (mainly concerning the performance and configuration parts).