Return-Path: X-Original-To: apmail-brooklyn-dev-archive@minotaur.apache.org Delivered-To: apmail-brooklyn-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 EA7A618587 for ; Thu, 6 Aug 2015 15:57:17 +0000 (UTC) Received: (qmail 92900 invoked by uid 500); 6 Aug 2015 15:57:17 -0000 Delivered-To: apmail-brooklyn-dev-archive@brooklyn.apache.org Received: (qmail 92867 invoked by uid 500); 6 Aug 2015 15:57:17 -0000 Mailing-List: contact dev-help@brooklyn.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.incubator.apache.org Delivered-To: mailing list dev@brooklyn.incubator.apache.org Received: (qmail 92855 invoked by uid 99); 6 Aug 2015 15:57:17 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Aug 2015 15:57:17 +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 1CC9719CD1E for ; Thu, 6 Aug 2015 15:57:17 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.9 X-Spam-Level: ** X-Spam-Status: No, score=2.9 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, SPF_PASS=-0.001, URIBL_BLOCKED=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-us-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id smr4kR_SNrYW for ; Thu, 6 Aug 2015 15:57:07 +0000 (UTC) Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 11F1620F6E for ; Thu, 6 Aug 2015 15:57:07 +0000 (UTC) Received: by wicgj17 with SMTP id gj17so28420592wic.1 for ; Thu, 06 Aug 2015 08:56:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type; bh=Ohw2l+TY+Lp7e0sDL8Kmlcf0ne6z7doR+UMRhgFuXzc=; b=dvPRFzjZWyX/j2IFPqjP6YJAYsrqfrNemVa32R7XdFBQz8BaWpCECaYHkJjz6Bd+zJ T86VWpVq+ZWlHkbIk/GkambNIApTNeMCR2ur5nO4EmR6GtV5Uj4+HyCLPoX517Rx+DWE 5YPzntlrFX6X5qIxn+sAqk9ad/CObyympAXpOO0vguDPqSbvCqepR9l4YgbEglOqZwdJ Uny7W9ydM6FefhN0+AW2GozBvFZMVNTi8iwJUntihD/u0nvrtyTYpwwOITwa7FreZIgT uykZlERRWn/V3CnT2qLBUkv5B2iN/EOa44zbbdjMooIbpxTh55ECNN5AlXlcfPIiTV5y n11A== X-Received: by 10.194.171.129 with SMTP id au1mr4919753wjc.115.1438876580587; Thu, 06 Aug 2015 08:56:20 -0700 (PDT) Received: from Aleds-MacBook-Pro.local (host-2-98-70-83.as13285.net. [2.98.70.83]) by smtp.googlemail.com with ESMTPSA id ul1sm10148067wjc.30.2015.08.06.08.56.19 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Aug 2015 08:56:19 -0700 (PDT) Subject: Re: [PROPOSAL] Refactor packages to avoid the split package problem To: dev@brooklyn.incubator.apache.org References: <55C3742A.2070300@gmail.com> From: Aled Sage Message-ID: <55C383A1.2040107@gmail.com> Date: Thu, 6 Aug 2015 16:56:17 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 In-Reply-To: <55C3742A.2070300@gmail.com> Content-Type: multipart/alternative; boundary="------------050700040500080903030007" --------------050700040500080903030007 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi Hadrian, +1; makes sense to fix the split-package problem for the 0.8.0 release. These should be different PRs from the org.apache.brooklyn, so that they can be reviewed accordingly. I'll need to look again at the packages to give a definite opinion on naming. It's probably not as simple as org.apache.brooklyn.core.* in ./core: * There are utility classes in core named brooklyn.util.*, which should be compared with the brooklyn-util-common (main difference is that many utils in core have dependencies on other things in core, rather than being truly independent utils). * I'd like us to extract the core tasks framework (brooklyn.util.tasks) to its own module. --- We should also review what is public (i.e. what packages should be exported). For example, is core's brooklyn.internal.* definitely not used by any other projects? --- An alternative approach (definitely less appealing for me long term) would be to use OSGi fragments. I think something like that was done in the early days of OSGi'ifying jclouds, but don't recall the details off hand. There's an e-mail thread [1] and a blog post about it [2]. Aled [1] https://groups.google.com/forum/#!topic/jclouds-dev/FdsbfELc1o0 [2] http://iocanel.blogspot.co.uk/2012/06/osgification-good-bad-purist.html On 06/08/2015 15:50, Hadrian Zbarcea wrote: > Hi, > > I opened a new jira [1] for this. While doing my refactoring in ./api > I discovered quite a bunch of places where we have split packages > among api, utils, core, etc. > > I would recommend using something like: > > org.apache.brooklyn.api.* in ./api > org.apache.brooklyn.core.* in ./core > > and so forth. There are also a bunch of circular dependencies and > other smaller issues that we should correct. > > WDYT? > Hadrian --------------050700040500080903030007--