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 07ADF200CC4 for ; Thu, 8 Jun 2017 01:28:30 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 04DA8160BD0; Wed, 7 Jun 2017 23:28:30 +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 2836E160BE9 for ; Thu, 8 Jun 2017 01:28:29 +0200 (CEST) Received: (qmail 97929 invoked by uid 500); 7 Jun 2017 23:28:28 -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 97780 invoked by uid 99); 7 Jun 2017 23:28:28 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jun 2017 23:28:27 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 9572C1A7A9F for ; Wed, 7 Jun 2017 23:28:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.992 X-Spam-Level: ** X-Spam-Status: No, score=2.992 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd2-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 (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 7TmMWwQNXcVr for ; Wed, 7 Jun 2017 23:28:25 +0000 (UTC) Received: from mail-it0-f54.google.com (mail-it0-f54.google.com [209.85.214.54]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 357245F5B3 for ; Wed, 7 Jun 2017 23:28:25 +0000 (UTC) Received: by mail-it0-f54.google.com with SMTP id m47so13190592iti.0 for ; Wed, 07 Jun 2017 16:28:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=MYWOJKlJEds8Y4H+PU1Q05wf1396HAdlbrQS/0l41JI=; b=X7odhiWVAqqtVhLJRAo9kiFGwqs9melR1yIx3n0R2thMeRPa3XR1RhTfJVom8eZjRx vBxazuYvri0iVYNzQR+V9ukf/9kzysMyvzVOd9D13AD9OSiEniChAkyNMR6XxSimJ41v osZT0UMRYX8/idb/g87/hDSIJ5UEcWynV3+x9m2YHYJwsLmJSFteVyopil8kphfpFMMH TcPrP7/kXXTKPMsbbk8Gsx0jaZQoTbNKWJsQ0DQz2yEYjiWh1Xw6jc9X5GCfvWWGigPu lg+WTAKmchagpe7RHYPj60VL9fUgsjY2eGAMqvJlSDSxnTeNmGThgfhjGO8IhW+kTW1e TMSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=MYWOJKlJEds8Y4H+PU1Q05wf1396HAdlbrQS/0l41JI=; b=enA9OFmDL5QcosT1EHuBvhkzoUVqhcofWCL2tT+YouZXzw3g0dmwNczLWpsPOL9gdB +t80JFWJM8k8S2+PiIXprVGw+o/URztwwvlMMSfOaapEso9HQQnGTqTRUkf8JevBx750 +VOYsIV2p/Tk11ILlTyEFcC3dbE1Iz5Hf/U94hM0zQi+bHEoLo1yJEfE5Jhvv5wOwkcH XGEmUWxnQCSxpRF8v7r32Diek3bbJglcVJ1BHydzj3H0l3Lk32ftZyrJknd9Itksl1iI LaNW4Wyav8PKIIJ63od5ti0xOD7lATeNECkoOXvqMmsZjUHxCOhpIfeps/eeP8eCXgCu eQNQ== X-Gm-Message-State: AODbwcCDnKJq+hCqCN6VOKAzm4+7nsGxo0BNrB9YSmpivTTSuw7nM76A MmWY+bNjcx4G5/hK47eUILTKq6sxC8CV X-Received: by 10.36.107.201 with SMTP id v192mr2782487itc.81.1496878104549; Wed, 07 Jun 2017 16:28:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.70.42 with HTTP; Wed, 7 Jun 2017 16:27:54 -0700 (PDT) In-Reply-To: <1496335596240-18358.post@n4.nabble.com> References: <0F949E61-E06A-4105-8086-BEE194D84B1E@apache.org> <925B4E5F-BF0E-4A34-9DD9-BC7F40B84034@apache.org> <1493149373391-17221.post@n4.nabble.com> <1493162622715-17224.post@n4.nabble.com> <1493422509590-17339.post@n4.nabble.com> <3E8652DB-02C7-4C8F-90AD-B0BF7C777381@apache.org> <1494004881185-17524.post@n4.nabble.com> <1496335596240-18358.post@n4.nabble.com> From: Valentin Kulichenko Date: Wed, 7 Jun 2017 16:27:54 -0700 Message-ID: Subject: Re: BinaryObjectImpl.deserializeValue with specific ClassLoader To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary="001a114a9e74b1a59705516717bc" archived-at: Wed, 07 Jun 2017 23:28:30 -0000 --001a114a9e74b1a59705516717bc Content-Type: text/plain; charset="UTF-8" Hi Nick, How exactly do you replace the class loader and can you give a little bit more detail about why you do this? As for the issues, here are my comments: 1. Can you clarify this? In which scenario it doesn't work and why? 2. Why do you deploy domain classes in the first place? Ignite architecture assumes that there are no classes on server side at all, so I think it would be very hard to load them dynamically. Can you use binary objects instead? 3. I can't recall any such places from the top of my head, but frankly I don't think you have such a guarantee. IgniteConfiguration object is assumed to be created prior to node startup. It should not be modified after startup. -Val On Thu, Jun 1, 2017 at 9:46 AM, npordash wrote: > I wanted to provide an update on where I am at with this as I'm still > exploring different options. > > For the time being I've taken the path of using a delegating ClassLoader in > IgniteConfiguration as was previously suggested; however, with the > difference being that whenever a service is deployed/undeployed I end up > replacing the ClassLoader with a new instance that has the service's > ClassLoader added/removed. The replacement is necessary so that unused/old > classes can be reclaimed by the garbage collector and that new versions can > be deployed in the future. > > Overall I think this is a more comprehensive approach since it also allows > execution constructs like CacheEntryProcessor implementations provided by > the service to be used across the grid without enabling p2p classloading > (assuming the service is deployed to every node). > > There are a few concerns/issues with this approach: > > 1) There are still isolation concerns with class versions across different > services, but as long as the services don't have dependencies between each > other or have overlapping class usage in a cache or execution context then > it's a non-issue. > 2) Using OnheapCacheEnabled in conjunction with service provided domain > classes is impossible since once the service is reloaded and we get a new > classloader all calls to deserialize will fail. > 3) This approach only works if nothing caches the result of > IgniteConfiguration.getClassLoader, which isn't obvious since the docs > related to classloader behavior in Ignite is pretty sparse (or at least I > could not find it). I don't think anything does when I check that method > usage, but I'm not 100% sure about that. > > > > -- > View this message in context: http://apache-ignite- > developers.2346864.n4.nabble.com/Re-BinaryObjectImpl- > deserializeValue-with-specific-ClassLoader-tp17126p18358.html > Sent from the Apache Ignite Developers mailing list archive at Nabble.com. > --001a114a9e74b1a59705516717bc--