Skip to content
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

Replace libmemcached GIT submodule with OS package libmemcached #90

Open
ligurio opened this issue Dec 3, 2021 · 6 comments
Open

Replace libmemcached GIT submodule with OS package libmemcached #90

ligurio opened this issue Dec 3, 2021 · 6 comments

Comments

@ligurio
Copy link
Member

ligurio commented Dec 3, 2021

memcached has a GIT submodule libmemcached, it is used for building three tools for testing: memccapable, memcslap and memccapable (cmake/BuildLibmemcached.cmake):

macro   (libmemcached_build)
    set(libmemcached_src ${CMAKE_CURRENT_SOURCE_DIR}/third_party/libmemcached)
    add_custom_target(libmemcached_cfg ./bootstrap.sh autoreconf
        COMMAND ./configure --enable-jobserver=no --enable-memaslap
                --enable-static --enable-shared=off
        WORKING_DIRECTORY ${libmemcached_src}
    )
    add_custom_target(libmemcached_make
        COMMAND make libmemcached/csl/parser.h clients/memcapable
                        clients/memslap clients/memaslap
        DEPENDS libmemcached_cfg
        WORKING_DIRECTORY ${libmemcached_src}
    )
    add_custom_target(libmemcached_copy
        COMMAND ${CMAKE_COMMAND} -E copy ${libmemcached_src}/clients/memcapable
                                 ${CMAKE_CURRENT_BINARY_DIR}/test/capable/memcapable
        COMMAND ${CMAKE_COMMAND} -E copy ${libmemcached_src}/clients/memaslap
                                 ${CMAKE_CURRENT_BINARY_DIR}/test/bench/memaslap
        COMMAND ${CMAKE_COMMAND} -E copy ${libmemcached_src}/clients/memslap
                                 ${CMAKE_CURRENT_BINARY_DIR}/test/bench/memslap
        DEPENDS libmemcached_make
    )
    add_custom_target(libmemcached DEPENDS libmemcached_copy)
endmacro(libmemcached_build)

We same we can do with binary package libmemcached-tools. It is available at least on Ubuntu - https://packages.ubuntu.com/focal/libmemcached-tools:

sergeyb@pony:~/sources/MRG/memcached$ dpkg -L libmemcached-tools                
/.                                
/usr                              
/usr/bin                          
/usr/bin/memccapable             
/usr/bin/memccat               
/usr/bin/memccp                  
/usr/bin/memcdump                
/usr/bin/memcerror                
/usr/bin/memcexist                                                             
/usr/bin/memcflush                                                             
/usr/bin/memcparse                                                             
/usr/bin/memcping                     
/usr/bin/memcrm
/usr/bin/memcslap
/usr/bin/memcstat
/usr/bin/memctouch
...
@kyukhin kyukhin added the teamE label Dec 17, 2021
@Totktonada
Copy link
Member

The libmemcached library will be only testing dependency, so a rock itself will not depend on it, correct?

@ligurio
Copy link
Member Author

ligurio commented Dec 20, 2021

The libmemcached library will be only testing dependency, so a rock itself will not depend on it, correct?

Seems memcached build was never depend on libmemcached.

@ligurio
Copy link
Member Author

ligurio commented Dec 20, 2021

libmemcached-devel used by memtier (benchmark)

ligurio added a commit that referenced this issue Dec 20, 2021
ligurio added a commit that referenced this issue Dec 20, 2021
libmemcached is a project that provides a library with implemenation of
memcached protocol and a number of tools for working with memcached
servers. memcached uses memcapable [1] that checks memcached server
implemenation for conformance with memcached protocol. libmemcached
available as binary packages on Ubuntu (memcapable is in
libmemcached-tools, see [2]) and no reasons to keep libmemcached as a Git
submodule and spend time on it's compilation and maintenance.

1. https://docs.libmemcached.org/bin/memcapable.html
2. https://packages.ubuntu.com/focal/libmemcached-tools

Closes #90
ligurio added a commit that referenced this issue Dec 20, 2021
libmemcached is a project that provides a library with implemenation of
memcached protocol and a number of tools for working with memcached
servers. memcached uses memcapable [1] that checks memcached server
implemenation for conformance with memcached protocol. libmemcached
available as binary packages on Ubuntu (memcapable is in
libmemcached-tools, see [2]) and no reasons to keep libmemcached as a Git
submodule and spend time on it's compilation and maintenance.

1. http://docs.libmemcached.org/bin/memcapable.html
2. https://packages.ubuntu.com/focal/libmemcached-tools

Closes #90
ligurio added a commit that referenced this issue Dec 20, 2021
libmemcached is a project that provides a library with implemenation of
memcached protocol and a number of tools for working with memcached
servers. memcached uses memcapable [1] that checks memcached server
implemenation for conformance with memcached protocol. libmemcached
available as binary packages on Ubuntu (memcapable is in
libmemcached-tools, see [2]) and no reasons to keep libmemcached as a Git
submodule and spend time on it's compilation and maintenance.

1. http://docs.libmemcached.org/bin/memcapable.html
2. https://packages.ubuntu.com/focal/libmemcached-tools

Closes #90
ligurio added a commit that referenced this issue Dec 20, 2021
libmemcached is a project that provides a library with implemenation of
memcached protocol and a number of tools for working with memcached
servers. memcached uses memcapable [1] that checks memcached server
implemenation for conformance with memcached protocol. libmemcached
available as binary packages on Ubuntu (memcapable is in
libmemcached-tools, see [2]) and no reasons to keep libmemcached as a Git
submodule and spend time on it's compilation and maintenance.

1. http://docs.libmemcached.org/bin/memcapable.html
2. https://packages.ubuntu.com/focal/libmemcached-tools

Closes #90
@ligurio
Copy link
Member Author

ligurio commented Dec 21, 2021

For unknown reasons, memaslap benchmark is not available in binary package for Ubuntu, but memcslap is there.

According to documentation (http://docs.libmemcached.org/bin/memaslap.html and http://docs.libmemcached.org/bin/memslap.html) memaslap looks more powerfull than memslap. If we want to use memaslap to testing (#89) we cannot replace libmemcached to binary package.

ligurio added a commit that referenced this issue Dec 21, 2021
libmemcached is a project that provides a library with implemenation of
memcached protocol and a number of tools for working with memcached
servers. memcached uses memcapable [1] that checks memcached server
implemenation for conformance with memcached protocol. libmemcached
available as binary packages on Ubuntu (memcapable is in
libmemcached-tools, see [2]) and no reasons to keep libmemcached as a Git
submodule and spend time on it's compilation and maintenance.

1. http://docs.libmemcached.org/bin/memcapable.html
2. https://packages.ubuntu.com/focal/libmemcached-tools

Closes #90
@Totktonada
Copy link
Member

Let's compare cons and pros so.

Keep the submodule:

  • Pro: ability to enable all provided benchmarks.
  • Pro: don't depend on any OS specific peculiars.
  • Con: we need to support git mirror for the upstream bazaar repository (and sometimes stitch history parts using git filter-branch or git replace — rewrite a hash of parent commit).

Use the package:

  • Con: not all benchmarks (at least on Ubuntu).
  • Con: may be OS specific problems.
  • Pro: we don't need to support the mirror.

For me it seems that supporting of our mirror is not so hard work (and quite rare), so gains of the submodule overweight.

What do you think?

ligurio added a commit that referenced this issue Jan 14, 2022
libmemcached is a project that provides a library with implemenation of
memcached protocol and a number of tools for working with memcached
servers. memcached uses memcapable [1] that checks memcached server
implemenation for conformance with memcached protocol. libmemcached
available as binary packages on Ubuntu (memcapable is in
libmemcached-tools, see [2]) and no reasons to keep libmemcached as a Git
submodule and spend time on it's compilation and maintenance.

1. http://docs.libmemcached.org/bin/memcapable.html
2. https://packages.ubuntu.com/focal/libmemcached-tools

Closes #90
@ligurio
Copy link
Member Author

ligurio commented Jan 14, 2022

Pro: don't depend on any OS specific peculiars.

This can be achieved not only by using git submodule but, for example, by using Dockerfile that builds a single binary required by test.

Pro: ability to enable all provided benchmarks.

I'm not sure that we need two benchmarks for memcached. Probably one of them would be enough for our small needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants