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 630EA20049C for ; Fri, 11 Aug 2017 22:23:57 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6166416DFB7; Fri, 11 Aug 2017 20:23:57 +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 A7B5916DFB6 for ; Fri, 11 Aug 2017 22:23:56 +0200 (CEST) Received: (qmail 58459 invoked by uid 500); 11 Aug 2017 20:23:55 -0000 Mailing-List: contact dev-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list dev@geode.apache.org Received: (qmail 58447 invoked by uid 99); 11 Aug 2017 20:23:55 -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; Fri, 11 Aug 2017 20:23:55 +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 1D8F8C05FD for ; Fri, 11 Aug 2017 20:23:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.78 X-Spam-Level: * X-Spam-Status: No, score=1.78 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, RCVD_IN_SORBS_SPAM=0.5] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=pivotal-io.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id nTHRmDB-gUTi for ; Fri, 11 Aug 2017 20:23:52 +0000 (UTC) Received: from mail-qt0-f180.google.com (mail-qt0-f180.google.com [209.85.216.180]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 2DC5E5F30C for ; Fri, 11 Aug 2017 20:23:52 +0000 (UTC) Received: by mail-qt0-f180.google.com with SMTP id t37so27036627qtg.5 for ; Fri, 11 Aug 2017 13:23:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pivotal-io.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=aiCSgHVISx0WysCH0eQvkJNzsBKl+zounyR4tO7boP8=; b=cRtDVQOzG7WZY75KK3+ik/v8Iq6duIbN8NdjYhCBVNV43cMDQM/jmsPB0hiHciyxzS 2qFSWzjKM0zdAFIozJVKpqmQT/wTCbW4OLOVHR+PsYJqql+BRjnqY5Ro2w7/RgtL7yIG eCfjzwvUwtoRIT14jkODeoSiQWZKlZJXvxLYwc8p8u6tBuDk/CKdKTb1Tv9na3OZn4cd K67mNuAN2LkpRFDvEty9eJmjLIr/CmFtGFEDbZ5goiw3pn1LepCUxhvYpKUYQihIuu2E /d8KN/4k/IXgNcMxlijmcMGS3fXDsI3KmmXoUHUbQJotYAC2s3qhoR4Up2oSVNPC9Fa7 rDuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=aiCSgHVISx0WysCH0eQvkJNzsBKl+zounyR4tO7boP8=; b=HoyBjG8EF8346ErTRWTlaYuW0g8pFMPbsBGWJWEL8VyihfieZq7XnN3fJCzy6CGxxs Qkqb8AGVCgxvMy7Y4gRLA6BT5fU5V91JAr4dF6VMgEq+1hepl13l0kXWbHlLJYuUsems PrkVI3TDqHhCOpBogOOz7qntRNSNvro3xWNrE1DnEhSRBKmt+YhZRLlcrFIpwKuevdWF GHdG97JYsf7Z+brUbdZzo3S7pjiVDPs3EgHwhaMAo7CM53wgIreHzCaIGkhMQ4ZszT7W KA5sJFkD6N8jqHD94OpX6UQpqWoVDK0Qq0Uf7I3KcVBzbfqeMC3qmrjONdMp2vzx2OuD TwBQ== X-Gm-Message-State: AHYfb5i9gJbY7iXzWFKDVC+kzqFCW9AZccei+EPhiXP+SEJxCIuj6Yw/ 0TSxx9100vXMjBkNymKmG32lFtYGT2f/ X-Received: by 10.200.55.204 with SMTP id e12mr24116064qtc.180.1502483030800; Fri, 11 Aug 2017 13:23:50 -0700 (PDT) MIME-Version: 1.0 From: Jacob Barrett Date: Fri, 11 Aug 2017 20:23:40 +0000 Message-ID: Subject: Geode Native - All your globals are belong to us To: geode Content-Type: multipart/alternative; boundary="001a1141e4ca55259b05568017c7" archived-at: Fri, 11 Aug 2017 20:23:57 -0000 --001a1141e4ca55259b05568017c7 Content-Type: text/plain; charset="UTF-8" In case you missed the big commit recently, the Geode Native components has removed all globals.* The biggest win here is that we can more easily unit test sections of the code that before was nearly impossible due to reliance on initialized global instances of Cache, DistributedSystem, PoolManager, etc. All long lived instances are children of Cache and have access to their "container" Cache for accessing other components like PoolManager, DistributedSystem, etc. The refactor probably isn't perfect but it is a step in the right direction. Look for more unit tests to come. The next big win is that you can truly have more than a single Cache instance in our process space. While this isn't a common intentional use case, it is common in the .NET client implementation since a single process, AppPool, could have several AppDomains each with their own instance of Cache. In the old model all managed Cache instances shared the singleton unmanaged Cache instance. This lead to confusion around configuring multiple Caches in the same AppPool, think session state provider and application lookaside caching in IIS, and restricted configuration to share the same cluster and configuration. Obviously this is a HUGE breaking change. Almost all source using the C++ or .NET clients will need to be refactored. While many should be pretty obvious, look for updates coming to the examples soon to show you the light. This change follows the major change where we switch from the home grown SharedPtr/SharedBase refcounting memory management model to std::shared_ptr. The next major refactoring coming is aligning the public API with C++11 standards, like std::string, range-based for loops, etc. We also plan to make the API more consistent between factories, getters, setters, refs, pointers, etc. -Jake * Some lingering globals have been identified for removal. --001a1141e4ca55259b05568017c7--