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 8880B200CA3 for ; Thu, 1 Jun 2017 19:01:27 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 874E3160BC4; Thu, 1 Jun 2017 17:01:27 +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 CC73E160BC1 for ; Thu, 1 Jun 2017 19:01:26 +0200 (CEST) Received: (qmail 63928 invoked by uid 500); 1 Jun 2017 17:01:26 -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 63917 invoked by uid 99); 1 Jun 2017 17:01:25 -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; Thu, 01 Jun 2017 17:01:25 +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 608261802CA for ; Thu, 1 Jun 2017 17:01:25 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.487 X-Spam-Level: *** X-Spam-Status: No, score=3.487 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972, URIBL_BLOCKED=0.001, URI_HEX=1.313] autolearn=disabled 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 8w55luNJ37-H for ; Thu, 1 Jun 2017 17:01:24 +0000 (UTC) Received: from mwork.nabble.com (mwork.nabble.com [162.253.133.43]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id EFCD15FB8B for ; Thu, 1 Jun 2017 17:01:23 +0000 (UTC) Received: from mjoe.nabble.com (unknown [162.253.133.57]) by mwork.nabble.com (Postfix) with ESMTP id A761F4677F32B for ; Thu, 1 Jun 2017 10:01:23 -0700 (MST) Date: Thu, 1 Jun 2017 09:46:36 -0700 (PDT) From: npordash To: dev@ignite.apache.org Message-ID: <1496335596240-18358.post@n4.nabble.com> In-Reply-To: <1494004881185-17524.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> Subject: Re: BinaryObjectImpl.deserializeValue with specific ClassLoader MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit archived-at: Thu, 01 Jun 2017 17:01:27 -0000 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.