Return-Path: X-Original-To: apmail-asterixdb-dev-archive@minotaur.apache.org Delivered-To: apmail-asterixdb-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 96F4F18DFF for ; Wed, 12 Aug 2015 17:22:27 +0000 (UTC) Received: (qmail 74870 invoked by uid 500); 12 Aug 2015 17:22:27 -0000 Delivered-To: apmail-asterixdb-dev-archive@asterixdb.apache.org Received: (qmail 74816 invoked by uid 500); 12 Aug 2015 17:22:27 -0000 Mailing-List: contact dev-help@asterixdb.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.incubator.apache.org Delivered-To: mailing list dev@asterixdb.incubator.apache.org Received: (qmail 74803 invoked by uid 99); 12 Aug 2015 17:22:27 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Aug 2015 17:22: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 CD7E51A9DEA for ; Wed, 12 Aug 2015 17:22:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.981 X-Spam-Level: ** X-Spam-Status: No, score=2.981 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id JU2dNVTmGx3f for ; Wed, 12 Aug 2015 17:22:11 +0000 (UTC) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com [209.85.217.180]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 3E77E34B3D for ; Wed, 12 Aug 2015 17:16:06 +0000 (UTC) Received: by lbbtg9 with SMTP id tg9so13450908lbb.1 for ; Wed, 12 Aug 2015 10:16:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:content-type; bh=cxaFbV0AueQjj3zBI9CjxmwS5YnooJatesx8GOwYEPo=; b=I/fMAFLnNVhCWgq9qIl5odCjD56lM2p2OtV3hP69QWYjjjNZsr8kOWdP/B3AzErzqp k7GDg6FDfLjBT6vshYmP6jaNAlF0VJtqdmACjlzyTTC98rs5Xn878Pwyh9MkdmIG4Rjw +wy2HTjbuK0rN2nJqWPJtmzOKlFMQJL1hY+BM21AqAqhahrS2jUcYDG+16naGenhp7sH RqezuS4VuvqmI0iQKcSn2cXP6YXmwlPuSmRYfgmgaS56sNqUKQp4/qNHMXZiwl0PnRre /I17JXFf+n686JYVruluoy/+QKf9KoZDPfpapPIiaCvLCEIXiTtM3HWzlW12skqyUCmM W9vg== X-Gm-Message-State: ALoCoQmHcBwMKEAPe9tKUzm8JxgYzvty0Sj++JLphnTXJfQlXBP/x+pd2Jcw6SKproueE5N59uzH X-Received: by 10.152.164.130 with SMTP id yq2mr25026653lab.76.1439399760195; Wed, 12 Aug 2015 10:16:00 -0700 (PDT) MIME-Version: 1.0 Sender: ceej@lambda.nu Received: by 10.25.91.143 with HTTP; Wed, 12 Aug 2015 10:15:40 -0700 (PDT) X-Originating-IP: [69.62.207.190] In-Reply-To: <55C59CE7.8020602@gmail.com> References: <55BCF130.1090805@gmail.com> <5F1DCABB-A9D4-4EF1-88B4-85AE6053F40B@apache.org> <55C1B59C.6040400@gmail.com> <55C290EB.7030709@gmail.com> <55C59CE7.8020602@gmail.com> From: Chris Hillery Date: Wed, 12 Aug 2015 10:15:40 -0700 X-Google-Sender-Auth: hC2yvc_17cAR_wD2hbA1_YNJd6E Message-ID: Subject: Re: json vs. JSON To: dev@asterixdb.incubator.apache.org Content-Type: multipart/alternative; boundary=001a113495e2658b01051d205f5f --001a113495e2658b01051d205f5f Content-Type: text/plain; charset=UTF-8 So I don't think we've reached anything like a consensus here regarding spatial types. I'll restate my opinion that coercing them into any of the complex specifications that have been mentioned (GeoJSON, arcgis, even Well-Known Text) is inappropriate for serialization. Also, most of those specifications are even more complex than the "lossless JSON" serialization we already have, so would be doubly inappropriate for our "clean JSON" variant. That's what I don't think should be done, so what do I think should be done? Well, the whole purpose of this exercise as initially suggested by Mike was to allow a form of JSON output that was more like what someone consuming this *as JSON* would expect. To me that means that the format should be something that (a) is useful for downstream JSON tools, while (b) being as simply-structured as possible. Also, a non-goal in my mind is that this output format be able to be returned to its original ADM form; it is explicitly "lossy" in that sense. Till suggested that the rule should be that all atomic ADM types got serialized as atomic JSON, generally by creating a string representation of the data. That works nicely for numerics as well as things that are basically strings anyway, such as UUID and Hex. It also suggests an obvious way to handle date/time/duration types since there is something of a global standard string representation for those. However, upon thinking about it, I don't think that's the simplest nor the most useful way for us to represent spatial types. The best we could do there would be something not entirely unlike a dramatic subset of Well-Known Text, eg. "POINT (30 10)". While that arguably meets criterion (b) above, it definitely doesn't meet (a) since any downstream JSON-accepting tool is going to have to do non-JSON string processing to extract the actual meaning. I also come back again to the problem that Circle cannot be represented unless we create a non-standard extension to WKT. After considering the various things that have been discussed, I've gotta be honest: I still like my original proposal the best. It's a concise but usable consolidation of the data represented in ADM, which best I can tell is what we're looking to implement. "location2d" : [41.0, 44.0], "location3d" : [44.0, 13.0, 41.0], "line" : [ [10.1, 11.1], [10.2, 11.2] ], "rectangle" : [ [5.1, 11.8], [87.6, 15.6548] ], "polygon" : [ [1.2, 1.3], [2.1, 2.5], [3.5, 3.6], [4.6, 4.8] ], "circle" : { "radius" : 10.1, "center" : [ 11.1, 10.2 ] }, I'm not entirely happy that circle gets rendered as as an object; something like "circle": [ [11.1, 10.2], 10.1 ] could work too. Or, if necessary, all shapes (not points) could be rendered as objects as per my secondary proposal. Ceej aka Chris Hillery On Fri, Aug 7, 2015 at 11:08 PM, Mike Carey wrote: > I am willing to retract my proposal... :-) > (Consider it retracted; I agree with Ted Dunning's comment, and similar > comments by others.) > > > On 8/7/15 10:35 PM, Chen Li wrote: > >> In today's weekly meeting Mike mentioned the idea of getting rid of >> the "circle" data type. It will be good to have a F2F discussion >> before we make the final decision. >> >> Chen >> > > --001a113495e2658b01051d205f5f--