Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id F0EE6200CC9 for ; Mon, 17 Jul 2017 17:18:50 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id EF3DB162A9D; Mon, 17 Jul 2017 15:18:50 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3EEE61629E5 for ; Mon, 17 Jul 2017 17:18:50 +0200 (CEST) Received: (qmail 53547 invoked by uid 500); 17 Jul 2017 15:18:47 -0000 Mailing-List: contact dev-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list dev@zookeeper.apache.org Received: (qmail 52886 invoked by uid 99); 17 Jul 2017 15:18:46 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jul 2017 15:18:46 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1144DE0192; Mon, 17 Jul 2017 15:18:46 +0000 (UTC) From: eolivelli To: dev@zookeeper.apache.org Reply-To: dev@zookeeper.apache.org References: In-Reply-To: Subject: [GitHub] zookeeper issue #227: ZOOKEEPER-2755 Allow to subclass ClientCnxnSocketNetty... Content-Type: text/plain Message-Id: <20170717151846.1144DE0192@git1-us-west.apache.org> Date: Mon, 17 Jul 2017 15:18:46 +0000 (UTC) archived-at: Mon, 17 Jul 2017 15:18:51 -0000 Github user eolivelli commented on the issue: https://github.com/apache/zookeeper/pull/227 @ivankelly thank you for your time > The commit message explains what the patch is doing, but not why. The reason I'm pushing back a lot on this, is that I think it adds indirection and complexity, and I don't see what the benefit is over simply binding to 0. I will rewrite the message and explain better. Benefits for tests: I agree with you that binding to 0 will solve the problem of running multiple tests on the same machine, this change will only add the ability to work without opening real ports. For production: With in-vm transport you will not open ZK clientPort to the world, which in turn will be a security risk. If you open the clientPort, even only on loopback you need to configure ZK security at ZK level or for instance iptables > you've created a static helper class Yes, unfortunately there is no automatic way to map local addresses to InetAddress. I have included the "mapToLocalAddress" method which is used only in tests in order to define a standard practice to map LocalAddress. This patch does not introduce an official CnxnFactory for Local transport, but there is a need to define how it should be used. Maybe it would be better to add the official CnxnFactory > How are you using zookeeper in single node mode? Is it only as a metadata store for bk? Yes, I am using it to run BookKeeper + Bookie inside the same JVM. I am using primary BK as write-ahead-log for replicated states machines. For every application now I need to implement a BookKeeper based WAL + local disk WAL, when BookKeeper is really good even in local mode. I really would like to abstract the metadata-store and bookie discovery in BK to not use ZK but I think this will be the work in the next year, actually (4.5 release) we are focusing the efforts on other aspects. I have implemented Local Transport in BK too. On BookKeeper I had the same security problem because BK 4.4 did not have "public" security support at all (in 4.5 we have it with SSL + SASL + ZK ACLs) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---