Return-Path: X-Original-To: apmail-avro-user-archive@www.apache.org Delivered-To: apmail-avro-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7C2651166E for ; Sun, 30 Mar 2014 18:57:57 +0000 (UTC) Received: (qmail 18636 invoked by uid 500); 30 Mar 2014 18:57:55 -0000 Delivered-To: apmail-avro-user-archive@avro.apache.org Received: (qmail 18479 invoked by uid 500); 30 Mar 2014 18:57:49 -0000 Mailing-List: contact user-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@avro.apache.org Delivered-To: mailing list user@avro.apache.org Received: (qmail 18470 invoked by uid 99); 30 Mar 2014 18:57:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Mar 2014 18:57:47 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lewis.mcgibbney@gmail.com designates 209.85.216.177 as permitted sender) Received: from [209.85.216.177] (HELO mail-qc0-f177.google.com) (209.85.216.177) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Mar 2014 18:57:42 +0000 Received: by mail-qc0-f177.google.com with SMTP id w7so7917814qcr.8 for ; Sun, 30 Mar 2014 11:57:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=v+LXPUrmSqDEOw5cjQhl+O4cdLrKqdXgIwmCrTq2kq4=; b=JhNWrjXmu3oWAI6foRt2wzdOUgCMJlUsE1jMCFtAjdArEGxHYC1eIwiL+R6ipLGrAk 1HWRSmTVLaPBBq5DVrw23b2lUEWMtZ5vCshWayBEdHVyWAb1lVVAzRtFx0De38YRzOyb 8LNA1IJDYxIzs/yHDxZCn2Itg6M9sbdBKGhQTlIwROQOYmZAV+MH7cQojcSbjWSUp0xa YcDrY+0dxj5BFACudcWvEGLnCyoCwF3q3sfgRFul9lLGvq91xG2lPjDQmKeag4uU8Yjv 5AltqNvRN9TzOtImNKHM+h/CX6HHCc1Xi6OxzaeFKIRQaGIB3hUU3UIggyh4HeXPYVKg 9fWA== MIME-Version: 1.0 X-Received: by 10.140.105.9 with SMTP id b9mr21857890qgf.28.1396205841030; Sun, 30 Mar 2014 11:57:21 -0700 (PDT) Received: by 10.96.224.99 with HTTP; Sun, 30 Mar 2014 11:57:20 -0700 (PDT) Date: Sun, 30 Mar 2014 19:57:20 +0100 Message-ID: Subject: Catch 22 when obtaining Fields and Objects From: Lewis John Mcgibbney To: user@avro.apache.org Content-Type: multipart/alternative; boundary=001a1137c0223024a204f5d781ee X-Virus-Checked: Checked by ClamAV on apache.org --001a1137c0223024a204f5d781ee Content-Type: text/plain; charset=ISO-8859-1 Hi Folks, Right now over in Gora [0] we write data down into Byte[] before persisting an object into a back end datastore. We use Avro for our serialization. The question I would like to pose is as follows In Gora we can do a get on objects as follows public T get(K key, String[] fields) If no field arguments are provided then we query ALL fields. If however we query for say two string fields "name" and "age" we still need to obtain Field's for the entire object (as they are stored as Byte[]) then sort things out on our end. Is there a better way we could/should be doing this? For example, in our gora-dyhamodb store, we simply put objects in their native types and we let DynamoDB deal with the best way to serde the data. We are looking to simulate this across all supported data stores therefore some discussion from this list would be excellent in enabling us to make a more informed decision. Thanks in advance. Lewis [0] http://gora.apache.org -- *Lewis* --001a1137c0223024a204f5d781ee Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Folks,
Right now over in Gora [= 0] we write data down into Byte[] before persisting an object into a back e= nd datastore.
We use Avro for our serialization.
The= question I would like to pose is as follows

In Gora we can do a get on objects as follows

public T get(K key= , String[] fields)

If no field arguments are provided the= n we query ALL fields.

If however we query for say two st= ring fields "name" and "age" we still need to obtain Fi= eld's for the entire object (as they are stored as Byte[]) then sort th= ings out on our end.

Is there a better way we could/should be doing this?

=
For example, in our gora-dyhamodb store, we simply put objects i= n their native types and we let DynamoDB deal with the best way to serde th= e data. We are looking to simulate this across all supported data stores th= erefore some discussion from this list would be excellent in enabling us to= make a more informed decision.
Thanks in advance.
Lewis
[0] http://gora.apache.org

--
Lewis
--001a1137c0223024a204f5d781ee--