From dev-return-31387-apmail-ignite-dev-archive=ignite.apache.org@ignite.apache.org Mon Feb 26 11:21:00 2018 Return-Path: X-Original-To: apmail-ignite-dev-archive@minotaur.apache.org Delivered-To: apmail-ignite-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 0472817811 for ; Mon, 26 Feb 2018 11:21:00 +0000 (UTC) Received: (qmail 54037 invoked by uid 500); 26 Feb 2018 11:20:59 -0000 Delivered-To: apmail-ignite-dev-archive@ignite.apache.org Received: (qmail 53990 invoked by uid 500); 26 Feb 2018 11:20:59 -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 53974 invoked by uid 99); 26 Feb 2018 11:20:59 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Feb 2018 11:20:58 +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 90C811A0472 for ; Mon, 26 Feb 2018 11:20:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.998 X-Spam-Level: * X-Spam-Status: No, score=1.998 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gridgain-com.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id YKdgVpF2kvPj for ; Mon, 26 Feb 2018 11:20:56 +0000 (UTC) Received: from mail-vk0-f43.google.com (mail-vk0-f43.google.com [209.85.213.43]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id D3E335F20B for ; Mon, 26 Feb 2018 11:20:55 +0000 (UTC) Received: by mail-vk0-f43.google.com with SMTP id p189so4924269vkd.10 for ; Mon, 26 Feb 2018 03:20:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gridgain-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=TT0fKVFdIqeu2lnW1btcvJCGwF/fNmQLT4fGuyXwqXs=; b=BqMuKxSU1sRT39PETnOC1usVT35Vjk38I+EeQ8m5jfuADIyTO8IR0IwBj/P8FsSb5t lmgOLCJT3WJXOP9eI1LPKfzpHhVK2ywSjjDRBtsJ4GzpIhFZdp+EgkkkxwJnG++B5g82 H9zYmau2cpWWU/e/vXn1Vo7kxDMXOTSXE7CNO+5Gt8KHvLwaaiQqi8hJY4dgN5wcBT6O Eo4918Om2HCNG8r+XzP2G2tF2oaQA1L0/MQkBUl43v1K3/5twqAnSxA1PUFafIvzMprc 99yGfCtInxQd13ySsjr1iEDcVCwUfk6t7hkKyB0nIrKQSQQTIYLKwjJBEh+uU3GkDJGz 2uwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=TT0fKVFdIqeu2lnW1btcvJCGwF/fNmQLT4fGuyXwqXs=; b=mc/SF/lY72jn+QvT2lVxsfqmFqeMsY8II6fJwiyexHKBc1GQp7BKIJAoG2Mb252Bls oKxLHXTKzcIV1b4Pn3kGKspNrVzjB4zBkUa3oCUxsjC76xdg4lgYhU2J7sqQ6YAi4MSK rEtKHsa0V9LmtEpWJFhhokB2tB3EVxlr7F6FekNTvfNzkZ0GUoZN+xyZLtHY2+aLJkcV k4NVjgHPVPUUHAFx/MyoCUZuXnDaWbVX2ju1Lrq7yG1c7ydoma4/ocpgE6zyM+xCje5D FpANLNYR67ZyiL2KjsK5K0rfAu02O5JaAcnmbuWmTK2aHqq92fYAZ6+GBcD+en5jkjTS A5IQ== X-Gm-Message-State: APf1xPDaxgcdMbMnMkas1QZdyUCUsHHmEYEtoxPIFR8QJYhPmdhXzrNh 4T3J74nfY3pTOHOTsLmUPKeFHeQQ/HfqkjroesU4Eg== X-Google-Smtp-Source: AG47ELvNcddYDvDd8uNSSBCo7rIglcffvjFoxwSOim8T/DVXpqQQR0a8sWfS+cudAz4MkuWzofWmfc7WMa1l3Dn0Hn4= X-Received: by 10.31.150.208 with SMTP id y199mr7695491vkd.150.1519644049449; Mon, 26 Feb 2018 03:20:49 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.1.18 with HTTP; Mon, 26 Feb 2018 03:20:49 -0800 (PST) In-Reply-To: References: From: Vladimir Ozerov Date: Mon, 26 Feb 2018 14:20:49 +0300 Message-ID: Subject: Re: REST: support getting objects from cache. To: dev@ignite.apache.org Cc: Denis Magda Content-Type: multipart/alternative; boundary="001a1141c84cc0bc0605661bb3bf" --001a1141c84cc0bc0605661bb3bf Content-Type: text/plain; charset="UTF-8" My 50 cents: 1) Agree with Pavel, not need to deserialize at all 2) May be you see everything in the upper case because this is how CREATE TABLE works - every object name (table name, column name, etc.) are converted to upper case by default. This is expected behavior of every SQL engine. If you want to preserve cases please consider using qoutes around column names (e.g. CREATE TABLE "myTable"("myColumn" INT PRIMARY KEY). 3) I think we should throw an exception in this case - objects with recursive dependencies cannot be expressed in text form (whether this is XML, JSON or anything else). On Mon, Feb 26, 2018 at 10:00 AM, Pavel Tupitsyn wrote: > Hi Alexey, > > 1) IMO for this task you should ALWAYS work in binary mode. > What is the use case for deserializing with a real class and then > serializing to JSON? > Looks like a waste of resources to me. > > 2) This should not be the case, please re-check your code. > Binary meta preserves original case (stores field names as is), just > checked this with 2.4 build. > > 3) JSON serializers typically handle this by adding special fields ($id and > $ref in Json.NET, for example). > But I believe this is a rare use case and can be skipped in initial > implementation. > > Thanks, > Pavel > > On Mon, Feb 26, 2018 at 7:38 AM, Alexey Kuznetsov > wrote: > > > Hi, > > > > I'm working on IGNITE-7803 REST: Add support to get values inserted via > > API or SQL[1] > > > > And found following issues: > > > > 1. First, if server node that will handle REST request does not have > class > > of object that we want to get from cache I need to set cache.keepBinary() > > in order to avoid object deserialization and work directly with binary > > metadata directly. > > > > But in some cases node could have class in classpath and user may need to > > use that class. > > > > How about to add option "keepBinary=true" and let user handle this by > > himself? > > > > 2. Second, in binary metadata all names stored in upper case. So, binary > > object converted to JSON will be like: {"ID": 1, "NAME": "Alex", > "SALARY": > > 300} > > > > It is OK? > > > > 3. Should we handle circular references in binary objects? If yes, then > > how? > > > > > > [1] https://issues.apache.org/jira/browse/IGNITE-7803 > > > > > > > > -- > > Alexey Kuznetsov > > > --001a1141c84cc0bc0605661bb3bf--