Return-Path: X-Original-To: apmail-incubator-crunch-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-crunch-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 5C39AD7A3 for ; Sun, 28 Oct 2012 12:38:44 +0000 (UTC) Received: (qmail 36989 invoked by uid 500); 28 Oct 2012 12:38:44 -0000 Delivered-To: apmail-incubator-crunch-dev-archive@incubator.apache.org Received: (qmail 36854 invoked by uid 500); 28 Oct 2012 12:38:39 -0000 Mailing-List: contact crunch-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: crunch-dev@incubator.apache.org Delivered-To: mailing list crunch-dev@incubator.apache.org Received: (qmail 36812 invoked by uid 99); 28 Oct 2012 12:38:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Oct 2012 12:38:37 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gabriel.reid@gmail.com designates 209.85.212.177 as permitted sender) Received: from [209.85.212.177] (HELO mail-wi0-f177.google.com) (209.85.212.177) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Oct 2012 12:38:29 +0000 Received: by mail-wi0-f177.google.com with SMTP id hj13so1148862wib.0 for ; Sun, 28 Oct 2012 05:38:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=4Yb+HxVwtZQZzM4MHDHO3SExaTIwJRDNlsDHRZjGztM=; b=mOZObO2dFdDynL+aXVUG9quY100s1cLNcMXPhJ9AcymfVHImib+aPbDo312c5VEiwb xAiz+qRubarNIll4NzgA9uqbJztgznjVTO2zUdlsAbqJjcL38TYE4IrjTBbVaU00H7sy iIWE3EnRUdFSDqwH/QDj4KqM+CoI2NVACJh5n7HOSYV5cFSskUdhGWJrG93ZgV4IlyT4 LnJNtr0ezYK50XmlX86TzOj8a53qyfgV7JEaHR61Z4VfqjGW18U0N4OctiADBUb7Syrb MtXbAZwrpolajSIe0jKRFiL1oxvdgSDOeaeUGbqoqvb9dGMIZdEwrRNMyPae6xV1TOcj hvcQ== Received: by 10.181.11.167 with SMTP id ej7mr11415653wid.11.1351427889458; Sun, 28 Oct 2012 05:38:09 -0700 (PDT) Received: from [192.168.0.157] (78-22-137-231.access.telenet.be. [78.22.137.231]) by mx.google.com with ESMTPS id dt9sm5760940wib.1.2012.10.28.05.38.04 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 28 Oct 2012 05:38:06 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: Moving PType and friends From: Gabriel Reid In-Reply-To: <20121028093951.GA19160@mafr.de> Date: Sun, 28 Oct 2012 13:38:08 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <1927DE56-59B4-4106-A54C-9F94EDB3B8A3@gmail.com> References: <20121027160647.GA9240@mafr.de> <20121027214115.GB17856@mafr.de> <20121028093951.GA19160@mafr.de> To: crunch-dev@incubator.apache.org X-Mailer: Apple Mail (2.1499) X-Virus-Checked: Checked by ClamAV on apache.org On 28 Oct 2012, at 10:39, Matthias Friedrich wrote: > Hi, >=20 > On Saturday, 2012-10-27, Josh Wills wrote: >> On Sat, Oct 27, 2012 at 2:41 PM, Matthias Friedrich = wrote: >=20 [=85] >=20 > OK, I see the problem. As usual we want the same thing, mostly ;-) >=20 >> If it's possible to spell out exactly what the APIs look like when >> this is done, let's do that; if we're not there yet but could spell >> out a set of principles that we would like to be true of the APIs, >> then let's do that and then start creating some strawman proposals = for >> organization of code that satisfies them as closely as we can. >> Implementing the changes required to get to the goals may take longer >> than a single release cycle, but I wouldn't want it to take more than >> two releases, just because I'm loathe to be in a process of >> continually moving things around. >=20 > Good idea, let's first agree on a set of principles. In my opinion, > we should limit the scope for these prinicples to client-facing > packages, everything else can be changed in any way at any time. >=20 > My proposal is based on [2], a very short and incomplete summary can > be found at [3]. For us, it boils down to this: >=20 > * A package must have a clear purpose; it contains either mostly > abstractions or mostly implementations (this makes it easier > to explain) > * A package must not depend on a package that is less stable=20 > than itself (meaning a package containing mostly abstractions > must not depend on one containing mostly implementations) > * There must be no dependencies from a client-facing package to > an internal package (that is, javadocs don't have dangling > references) > * There must be tight cohesion between classes in a package or > the package should be split (this doesn't apply for .util) > * There must be no dependency cycles between client-facing packages >=20 > You can calculate metrics for all of this but it's really just common > sense. Crunch follows these rules in the vast majority of cases > already. Right now I see the following violations: >=20 > * The .types package mixes abstractions and implementations and > is part of a dependency cycle with base. > * The base package references the .io implementation package > causing a dependency cycle. > * The base package references the .util package causing a > dependency cycle. > * There are lots of implementations in CombineFn and other Fns > that shouldn't be in base (which is for abstractions). We should > move them to .fn, perhaps to Guava style CombineFns, FilterFns. > We can even do this in a backwards compatible way. I think that this is exactly what we needed: a clear view on where we want to go and what it'll get us (thanks for the outline Matthias).=20= Following these principles to remove the violations you listed sounds=20 good to me. > Note: Java 8 will be a game changer; as far as I understand it, our > abstract Fns are *not* going to work with Lambdas, we would need > interfaces with only a single method. Does anyone think we have to > address this before Java 8 is released? I don't think we absolutely *need* to address this, but you can be sure = that I definitely do *want* to address it before the release of Java 8. = Seeing the way that pipelines can be implemented in Scrunch definitely makes me=20 jealous. It looks like we've got about 8 or 9 months to have this sorted = out. - Gabriel