Return-Path: X-Original-To: apmail-ignite-dev-archive@minotaur.apache.org Delivered-To: apmail-ignite-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 70BEB198E7 for ; Thu, 14 Apr 2016 13:42:34 +0000 (UTC) Received: (qmail 99794 invoked by uid 500); 14 Apr 2016 13:42:34 -0000 Delivered-To: apmail-ignite-dev-archive@ignite.apache.org Received: (qmail 99755 invoked by uid 500); 14 Apr 2016 13:42:34 -0000 Mailing-List: contact dev-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list dev@ignite.apache.org Received: (qmail 99742 invoked by uid 99); 14 Apr 2016 13:42:33 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Apr 2016 13:42:33 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 3E864C0E17 for ; Thu, 14 Apr 2016 13:42:33 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.279 X-Spam-Level: * X-Spam-Status: No, score=1.279 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gridgain-com.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id mbdFYxDOZ4w6 for ; Thu, 14 Apr 2016 13:42:31 +0000 (UTC) Received: from mail-vk0-f49.google.com (mail-vk0-f49.google.com [209.85.213.49]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id C3D3E5F24D for ; Thu, 14 Apr 2016 13:42:30 +0000 (UTC) Received: by mail-vk0-f49.google.com with SMTP id t129so109610090vkg.2 for ; Thu, 14 Apr 2016 06:42:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gridgain-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=KVVK+w/ifAZ2vVZD3awzsehxFCy+pDPN5e8CM0Z0jWw=; b=JesKDfbNl04b9YnDbzqyum7Y76cpzXzwhOShaWiqAExjeQ1BE5opM6GoTHn5z02F1M 2+4yF9IcBgKpPBVbD1nyFjufS5JHMc7Ilk8ie2K40ST5F9mKrdeyYJOrmHKIdA56oXad alJKhQoOco0FLKfbBOQDzHh55vhVUGHMrcHOWWg7YLDjTewsn4UjBVWNKRWZkHC5DQsS 8uMiQMN7ERF8F2Xj1UynC4CttLcfa/6wNooNfnf4X1+a+rX3iFXv9SChb7KS+a/TmmEK 7wxfCUQdcEp+TV6To2ZL/WB5th/2oh3Co1dUOMp+SLKN5qocF2GPULdHDtAfqGsiA8nY 7kZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=KVVK+w/ifAZ2vVZD3awzsehxFCy+pDPN5e8CM0Z0jWw=; b=ZsirSaP5oIxUij5iOEgNBn9J1oprKbgy8iPa3ZoB89iobl4q1pdGtXj0UViuGyzrr4 gpRWnU6jvAaTVZekcluC9zzKf6EDvCkZ0LpKeVPRyxZgpi6sqMErd35Eu/MZOOWkRJyF wQV4vljF/Lw5tSptGaKl4JbzLo5A3w3sJ3QKEqP1BWB+Lme1geMg9cvr6EUyKMdzYYMm aALReS3t3Lvlxji7izAL2llwzuU1KBmKnV1yH0+SfMrVWNCtmAE315yod9Uq9LYuCTxd F5CHCl1y/RPovmdlYU4nuUt6UCNiG0t5xR6EQMtiC4/EiH9ugO8XDSgGlOkGzW/g1Iiy wcrg== X-Gm-Message-State: AOPr4FXQG3aKlLRJMgp/wB3mRpw0mYAMPBALeFLRlIRp2Xnd+Nc1EW3HafG8EeMfWsTxqWeREeGnwN43Un+mJLLY MIME-Version: 1.0 X-Received: by 10.31.16.134 with SMTP id 6mr7687443vkq.133.1460641350150; Thu, 14 Apr 2016 06:42:30 -0700 (PDT) Received: by 10.176.69.136 with HTTP; Thu, 14 Apr 2016 06:42:30 -0700 (PDT) In-Reply-To: References: <289522752.1104679.1460445706141.JavaMail.yahoo@mail.yahoo.com> Date: Thu, 14 Apr 2016 16:42:30 +0300 Message-ID: Subject: Re: Introduce generic server configuration. From: Vladimir Ozerov To: dev@ignite.apache.org Cc: Roman Shtykh Content-Type: multipart/alternative; boundary=001a11432512d21f610530721062 --001a11432512d21f610530721062 Content-Type: text/plain; charset=UTF-8 Ok, so here is the summary of proposed design: 1) We introduce org.apache.ignite.configuration.TcpEndpointConfiguration. This is generic bean which could be used in different components having TCP server semantics. 2) This class will contain a set of TCP-specific properties: class TcpEndpointConfiguration { String address; // Endpoint host and port. Allowed formats: "host", "host:port", "host:port1..port2" int selectorCount; // Number of selectors. long idleTimeout; // Half-opened socket detection. /** TCP-specific config. */ int socketSendBuffer; int socketReceiveBuffer; boolean noDelay; /** Convenient constructor. */ TcpEndpointConfiguration(String address) { } } 3) For now we will inject it only inside OdbcConfiguration. Later on we will gradually rework other components. class OdbcConfiguration { // Endpoint config with default all-interface binding and default port range. TcpEndpointConfiguration tcpEndpointConfiguration = new TcpEndpointConfiguration("0.0.0.0:49500..49510"); /** Other ODBC-specific config goes here. */ ... } And several examples how it could be configured: 1) All defaults. 2) Set specific address: Thoughts? Vladimir. On Wed, Apr 13, 2016 at 1:47 PM, Yakov Zhdanov wrote: > How about TcpEndpointConfiguration? > > --Yakov > > 2016-04-13 13:22 GMT+03:00 Vladimir Ozerov : > > > Yakov, > > > > I thought about the following design: > > > > 1) Create org.apache.ignite.server.ServerConfiguration bean. I am not > sure > > about "server" word here, because it is too generic. May be "endpoint" or > > "tcpServer", or something like this. > > > > 2) Then we plug this bean into other beans. E.g., for ODBC it will look > as > > follows: > > > > IgniteConfiguration { > > OdbcConfiguration odbcConfiguration; > > } > > > > OdbcConfiguration { > > ServerConfiguration serverConfiguration; > > int maxCursors; // This is ODBC-specific stuff. > > } > > > > ServerConfiguration { > > String address; // E.g. "myHost:15000..15004" > > } > > > > Vladimir. > > > > > > On Wed, Apr 13, 2016 at 12:59 PM, Yakov Zhdanov > > wrote: > > > > > Vladimir, I like the idea and it should really make things simpler, > > > however, it is not clear to me how to incorporate this bean properly. > NIO > > > server is in internal package, but configuration should be under public > > > one. Having this bean on public API of components exposes their > internal > > > implementation details. > > > > > > As far as your examples > > > - it is ok to have bean setter on TCP communication > > > - it does not seem ok to have bean setter on IgniteConfiguration (is > ODBC > > > component implemented as a processor?) > > > > > > Vova, can you please provide your thoughts on implementation? > > > > > > --Yakov > > > > > > 2016-04-12 10:21 GMT+03:00 Roman Shtykh : > > > > > > > +1 for such a bean. > > > > -Roman > > > > > > > > > > > > On Monday, April 11, 2016 11:48 PM, Vladimir Ozerov < > > > > vozerov@gridgain.com> wrote: > > > > > > > > > > > > Igniters, > > > > > > > > We have several public components which use *GridNioServer* > internally. > > > NIO > > > > server has several properties for fine tuning. Selector count, direct > > > > buffer flag, max queue size, send/receive buffer sizes, etc.. > > > > > > > > And in every public component we have separate getters/setters to > pass > > > > values to NIO server. E.g. look at *TcpCommunicatinoSpi*, > > > > *ConnectorConfiguration > > > > *and *SocketStreamer*. They all have similar properties. > > > > > > > > Now we have ODBC component which also use *GridNioServer*. I do not > > want > > > to > > > > expose these properties through getters/setters because it will make > > > > *OdbConfiguration* very complex. Instead, I have an idea to introduce > > new > > > > bean *ServerConfiguration *which will have all these fine-grained > > > > properties. Later this bean could be re-used in other components > which > > > work > > > > with NIO server. > > > > > > > > This way component configuration will be very simple and > > straightforward > > > > when user do not want to tune NIO server. And I think this is the > most > > > > common use case. Simple config fox common case, complex config for > > > complex > > > > case. > > > > > > > > Thoughts? > > > > > > > > Vladimir. > > > > > > > > > > > > > > > > > > > > > > --001a11432512d21f610530721062--