From dev-return-43366-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Wed Dec 12 13:58:48 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 8DA8518064E for ; Wed, 12 Dec 2018 13:58:47 +0100 (CET) Received: (qmail 66585 invoked by uid 500); 12 Dec 2018 12:58:46 -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 66567 invoked by uid 99); 12 Dec 2018 12:58:45 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Dec 2018 12:58:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 7D5EC180796 for ; Wed, 12 Dec 2018 12:58:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.202 X-Spam-Level: X-Spam-Status: No, score=-0.202 tagged_above=-999 required=6.31 tests=[DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id SLZnhGkr8OWx for ; Wed, 12 Dec 2018 12:58:44 +0000 (UTC) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 9EBFB60E56 for ; Wed, 12 Dec 2018 12:52:24 +0000 (UTC) Received: by mail-pl1-f175.google.com with SMTP id k8so8561357pls.11 for ; Wed, 12 Dec 2018 04:52:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=aJgh0xNLIZVFNTYZOr1rfHHmNn4rOYhHsyGcn5kjR8w=; b=mE5BLUbP8sSqWhpn4bWr+S6qFZqfV3299c1UvJOWcmXYKD8MebMqQpHt2jOgHgAOnq 0BHhjR9PghqhiqkmSIGCIN2yj0+SQlhV5rj7a1ioh8yszfphP0ku59PmGXaTmHq2kZa3 G00zOLgpMA2OoEYOYvHrzs0WwtZKb9O0jTb9oHpqyDzxv0B5z8LWccKu5hgJLIL/gz3/ 1rxOEY+iVbTPjlsMSHK+rvC8OAEY4MV1IaJiBt7CZqdHOpCPFl7+n36778FTq2Ub5Js3 clXu6hr4/fk9ubXrpztMt+EQIhkcN6V3A9ktwblmTM8pB4lkCy/AEkOgK5MnvfAkvy/T E82w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=aJgh0xNLIZVFNTYZOr1rfHHmNn4rOYhHsyGcn5kjR8w=; b=duCwhb3UAmT+0NDgzZ2UUDCn5JmAt2GnS2SEQ8HokG/xuyFMrRdFdsNCAhxsNO/7N2 FlZmVF+w7X0JJXe+vUF/zFXuK88I3CDPW77iVwdNU/4j9xcBEKUoErUnh/Igh7FM+pAN TM5JrFCrvbY2lY7bf46DEtWTWCtxq88uVG0SODEKbHwpIc+Fbs78hh4m2TRzPtwp3rro HGIRbYjxOaCHqsbv6IOOQaYHtrbjwMDPbhnCDuFD1MfDQ9ogaTmVRFbQ9aTHXKCjaPL4 JKfqh3f1cDi5uo4DIan6i4xHRaINFB75aJ4CaF2VgpmTEDKNUyqlHOZTWnHkWXgGWJCY 7d/A== X-Gm-Message-State: AA+aEWbpYPTTD9FAwCD5YAiujduMwCmbNy4SKeOq02AKKoE+Z6I8AaFu iV64Ned/4evf1Q9LLXblLU3D3fqau5Qrif+WgWt7JFvpDcl4nw== X-Google-Smtp-Source: AFSGD/WT7yQFifcrCmok2RqIiFqpxRuR29gIYycVsU6wbEi4MrcSAQEmLlpIukz1TYMHjQnYyVEJtprjFY4ReKzrnjM= X-Received: by 2002:a17:902:b40d:: with SMTP id x13mr20096368plr.237.1544619143307; Wed, 12 Dec 2018 04:52:23 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Vyacheslav Daradur Date: Wed, 12 Dec 2018 15:52:11 +0300 Message-ID: Subject: Re: Use of marshaller at node startup routine (need advice) To: dev@ignite.apache.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Denis, thank you for the answer. I've already implemented the same approach. It works well, new and old tests have passed. On Wed, Dec 12, 2018 at 3:47 PM Denis Mekhanikov wr= ote: > > Slava, > > Interface *Service *extends *Serializable.* So, all services are supposed > to be serializable by the JdkMarshaller. > Usage of *BinaryMarshaller* or *OptimizedMarshaller* makes sense only fro= m > performance point of view. > But I don't think, that we should try too hard to minimize the performanc= e > impact of services serialization, > since it doesn't happen too often. > > There are some tests like *IgniteServiceConfigVariationsFullApiTest*, tha= t > check, that services, which are not > serializable, can be successfully deployed. I think, these tests should b= e > removed. > It's reasonable to require serializability, since all *Services* are mark= ed > as *Serializable*, as I already mentioned. > > Slava and I discussed a possibility to choose a marshaller, depending on > the node state. > If a node is already connected to the cluster, then it could use a binary > marshaller, > otherwise JDK marshaller could be used. > I think, if we decide to do so, then it will complicate logic and confuse > users. > This problem exists only for static services. They are not different from > dynamic ones, > except for the way of configuration, and a moment of deployment. > I don't see, why different constraints should be applied to them. > > So, I'm for using the *JdkMarshaller* regardless of the service type or a > node state. > > Denis > > =D0=BF=D1=82, 7 =D0=B4=D0=B5=D0=BA. 2018 =D0=B3. =D0=B2 15:57, Vyacheslav= Daradur : > > > Igniters, I need your advice about the following problem: > > > > It is necessary to serialize an object (just convert an object to > > bytes array) for including it in joining node data (DiscoveryDataBag) > > *at node startup routine*. > > > > The marshalling hangs If we use 'BinaryMarshaller' or > > 'OptimizedMarshaler' because class can't be registered in > > MarshallerContextImpl#registerClassName -> transport.proposeMapping on > > account of the request which can't be sent through discovery-spi at > > the moment. > > > > Also, 'JdkMarshaller' can't be used because it imposes limits on > > objects that should implement 'Serializable' interface. But this > > restriction is unacceptable for the case. > > > > As a workaround solution, an external library, like KRYO, can be used. > > > > What tools also available in the project to solve this problem? > > > > -- > > Best Regards, Vyacheslav D. > > --=20 Best Regards, Vyacheslav D.