From dev-return-30211-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Fri Jan 19 04:30:46 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 70281180654 for ; Fri, 19 Jan 2018 04:30:46 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 5F408160C48; Fri, 19 Jan 2018 03:30:46 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A4A7B160C26 for ; Fri, 19 Jan 2018 04:30:45 +0100 (CET) Received: (qmail 58684 invoked by uid 500); 19 Jan 2018 03:30:44 -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 58671 invoked by uid 99); 19 Jan 2018 03:30:44 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jan 2018 03:30:44 +0000 Received: from [192.168.75.134] (c-67-160-238-197.hsd1.ca.comcast.net [67.160.238.197]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 9F0531A00E2; Fri, 19 Jan 2018 03:30:43 +0000 (UTC) From: Denis Magda Message-Id: <274F119B-0862-4E28-BCAD-CBD0A078F483@apache.org> Content-Type: multipart/alternative; boundary="Apple-Mail=_A7E909A0-25F7-460D-9CFC-39D82A138E7F" Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: Documentation for Binary Client Protocol Date: Thu, 18 Jan 2018 19:30:41 -0800 In-Reply-To: Cc: dev@ignite.apache.org, Prachi Garg To: Lucas Beeler References: X-Mailer: Apple Mail (2.3445.5.20) --Apple-Mail=_A7E909A0-25F7-460D-9CFC-39D82A138E7F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Lucas, thanks for chiming in, The protocol itself consists of all these magic constants (type and = operations codes). See type codes table from this section: = https://apacheignite.readme.io/docs/binary-client-protocol#section-data-ob= jects Hope that my explanation given to Alexey makes sense to both of you. Initially, we didn=E2=80=99t plan to have the code snippets at all and = wanted to document the protocol in a way similar to Mongo=E2=80=99s = protocol: https://docs.mongodb.com/manual/reference/mongodb-wire-protocol/ = But after several iterations we agreed to simplify a life of those who = will be developing thin clients on top of the protocol and filled out = the doc with as many code snippets as possible. Again, the snippets are = not a complete application and this is why we ignored some of the best = practices used by Java developers. =E2=80=94 Denis > On Jan 18, 2018, at 7:11 PM, Lucas Beeler = wrote: >=20 > Hi Igniters, >=20 > I=E2=80=99m with Alexey here: hard-coded =E2=80=9Cmagic=E2=80=9D = literals make code hard to read and neither communicate coding = professionalism nor comport with published Sun/Oracle style guides. So I = suggest that: > For already defined symbolic constants, let=E2=80=99s use them instead = of literal values > If there are literal values for which symbolic constants haven=E2=80=99t= yet been defined, let=E2=80=99s define symbolic constants for them, = commit this change to master, and start using the newly defined symbolic = constants > Anyhoo, that=E2=80=99s just my two cents. >=20 > As always, it=E2=80=99s a pleasure to be a part of Ignite = development... >=20 > Cheers guys & gals, > Lucas >=20 > -- > Lucas BEELER > Technical Consultant, Professional Services > GridGain Systems > www.gridgain.com >=20 >> On Jan 18, 2018, at 6:47 PM, Alexey Kuznetsov > wrote: >>=20 >> Prachi, Denis, >>=20 >>=20 >> It is OK that we are using numbers in code samples instead of named >> constants? >>=20 >> For example: >> writeByteLittleEndian(3, out); // Integer type code >>=20 >> It could be smth. like this: >> writeByteLittleEndian(TYPE_INT, out); // Integer type code >>=20 >> Where TYPE_INT is declared at some place: >> .... >> public static final int TYPE_INT =3D 3; >> .... >>=20 >> Make sense? >>=20 >>=20 >> On Fri, Jan 19, 2018 at 4:47 AM, Prachi Garg > wrote: >>=20 >>> Igniters, >>>=20 >>> The document for Binary Client Protocol (awaiting 2.4 release) is = ready on >>> Apache Ignite readme.io . This document explains: >>>=20 >>> - How to connect to Ignite cluster >>> - Common message format (Request/Response header) >>> - Supported Data types and their format >>> - Request/Response format for each message type >>>=20 >>> Here are the links - >>>=20 >>> https://apacheignite.readme.io/docs/binary-client-protocol = >>>=20 >>> https://apacheignite.readme.io/docs/binary-client-protocol- >>> key-value-operations >>>=20 >>> = https://apacheignite.readme.io/docs/binary-client-protocol-sql-operations >>>=20 >>> https://apacheignite.readme.io/docs/binary-client-protocol- >>> binary-type-operations >>>=20 >>> https://apacheignite.readme.io/docs/binary-client-protocol- >>> cache-configuration-operations >>>=20 >>>=20 >>> Currently these pages are hidden and are accessible only with the = link. >>> They will be active after the release. >>>=20 >>> -Prachi >>>=20 >>=20 >>=20 >>=20 >> --=20 >> Alexey Kuznetsov >=20 --Apple-Mail=_A7E909A0-25F7-460D-9CFC-39D82A138E7F--