Current undergoing massive refactor#45
Merged
Merged
Conversation
- true OpenResty pattern - only responsible for a single C* peer node - small improvements and bugfixes
- new separate `cluster` module - more OpenResty friendly - more performant
2306023 to
d6ba4ee
Compare
d6ba4ee to
247a4c0
Compare
55b0ce1 to
8c4252c
Compare
8c4252c to
868b489
Compare
Poor naming choice but I will give more thought to this
ee9a327 to
bb7dd34
Compare
a41a13b to
b86aee7
Compare
Refactor/cluster only ngx
chore(ci) restore travis
bcfbeb4 to
052cf4a
Compare
Breakdown of this library introduces major breaking changes.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
TODO: describe goals :)
Update 3: new clustering module is only compatible with ngx_lua and LuaJIT but allows for very good performance in comparison to the old one.
Update 2: this branch is under daily, active development. https://github.com/thibaultCha/lua-cassandra/pull/45/commits
Update:
The main goal of this refactor is to separate the basic Cassandra session facility from the clustering capabilities. We don't want to force users to systematically have to deal with the clustering capability. Secondly, we want to follow a more friendly OpenResty pattern. And finally, we wish to fix some annoying leftovers such as the need to systematically specify an
shmorcontact_points, especially outside of ngx_lua.A "host" or "peer" only has knowledge about a single Cassandra node:
A cluster maps an entire Cassandra cluster and coordinates queries. Under the hood, it uses the previously described hosts:
A cluster only refreshes the Cassandra nodes when needed (upon the first query) or when being asked (
cluster:refresh()). Those clustering features allow for production usage of Cassandra in ngx_lua (as the current driver already offers).