From 6c5e4dad3bd087ee6677db7393d7abd019828cb2 Mon Sep 17 00:00:00 2001 From: Roman Gershman Date: Tue, 30 Nov 2021 10:11:59 +0200 Subject: [PATCH] Rename main binary to midi-redis --- README.md | 27 +++++++++++++++++++++++---- server/CMakeLists.txt | 4 ++-- server/dragonfly_connection.cc | 3 ++- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4c93bcb..e53cf28 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,30 @@ -# mini-redis +# midi-redis A toy memory store that supports basic commands like `SET` and `GET` for both memcached and redis protocols. In addition, it supports redis `PING` command. Demo features include: -1. High throughput reaching to millions of QPS on a single node. -2. TLS support -3. Pipelining mode that allows reaching order of magnitude higher QPS i.e. 30M qps and higher on a single node. +1. High throughput reaching millions of QPS on a single node. +2. TLS support. +3. Pipelining mode. + +## Building from source +I've tested the build on Ubuntu 21.04+. + + +``` +git clone --recursive https://github.com/romange/midi-redis +cd midi-redis && ./helio/blaze.sh -release +cd build-opt && ninja midi-redis + +``` + +## Running + +``` +./midi-redis --logtostderr +``` + +for more options, run `./midi-redis --help` diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index 91cdacb..8a98ce9 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -1,5 +1,5 @@ -add_executable(dragonfly dfly_main.cc) -cxx_link(dragonfly base dragonfly_lib) +add_executable(midi-redis dfly_main.cc) +cxx_link(midi-redis base dragonfly_lib) add_library(dragonfly_lib command_registry.cc common_types.cc config_flags.cc conn_context.cc db_slice.cc dragonfly_listener.cc diff --git a/server/dragonfly_connection.cc b/server/dragonfly_connection.cc index fcb35d7..56a7467 100644 --- a/server/dragonfly_connection.cc +++ b/server/dragonfly_connection.cc @@ -118,6 +118,7 @@ void Connection::HandleRequests() { int val = 1; CHECK_EQ(0, setsockopt(socket_->native_handle(), SOL_TCP, TCP_NODELAY, &val, sizeof(val))); + auto ep = socket_->RemoteEndpoint(); std::unique_ptr tls_sock; if (ctx_) { @@ -137,7 +138,7 @@ void Connection::HandleRequests() { InputLoop(peer); - VLOG(1) << "Closed connection for peer " << socket_->RemoteEndpoint(); + VLOG(1) << "Closed connection for peer " << ep; } void Connection::InputLoop(FiberSocketBase* peer) {