Skip to content

Commit

Permalink
[RAW] swim: introduce SWIM's dissemination component
Browse files Browse the repository at this point in the history
SWIM - Scalable Weakly-consistent Infection-style
process group Membership protocol. Original SWIM paper
is described in cognominal paper by Abhinandan Das,
Indranil Gupta, Ashish Motivala.

Here only superficial description is presented. SWIM
consists of two components: dissemination and failure
detection, both works via UDP protocol on each cluster
member.

Dissemination component discovers cluster members:
their statuses, addresses, some additional info. Each
member periodically sends part of its known members
table to another random member.

Failure detection component detects which members are
dead - it means they do not respond to requests.
Failure detector sends pings to randomly selected
members. When a member does not respond to requests
during some time, it is marked as dead and deleted
from members tables of other cluster participants.

This patch implements only dissemination component and
some basic things.

Part of #3234
  • Loading branch information
Gerold103 committed Oct 23, 2018
1 parent 5e7699a commit 70b0341
Show file tree
Hide file tree
Showing 8 changed files with 1,102 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Expand Up @@ -171,6 +171,7 @@ set (server_sources
lua/crypto.c
lua/httpc.c
lua/utf8.c
lua/swim.c
lua/info.c
${lua_sources}
${PROJECT_SOURCE_DIR}/third_party/lua-yaml/lyaml.cc
Expand Down Expand Up @@ -216,7 +217,7 @@ endif()

set_source_files_compile_flags(${server_sources})
add_library(server STATIC ${server_sources})
target_link_libraries(server core bit uri uuid ${ICU_LIBRARIES})
target_link_libraries(server core bit uri uuid swim ${ICU_LIBRARIES})

# Rule of thumb: if exporting a symbol from a static library, list the
# library here.
Expand Down
1 change: 1 addition & 0 deletions src/lib/CMakeLists.txt
Expand Up @@ -5,6 +5,7 @@ add_subdirectory(small)
add_subdirectory(salad)
add_subdirectory(csv)
add_subdirectory(json)
add_subdirectory(swim)
if(ENABLE_BUNDLED_MSGPUCK)
add_subdirectory(msgpuck EXCLUDE_FROM_ALL)
endif()
6 changes: 6 additions & 0 deletions src/lib/swim/CMakeLists.txt
@@ -0,0 +1,6 @@
set(lib_sources
swim.c
)

set_source_files_compile_flags(${lib_sources})
add_library(swim STATIC ${lib_sources})

0 comments on commit 70b0341

Please sign in to comment.