From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aEsYGwd1AWKZxAAAgWs5BA (envelope-from ) for ; Mon, 07 Feb 2022 20:37:43 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GojZEwd1AWILagEAG6o9tA (envelope-from ) for ; Mon, 07 Feb 2022 20:37:43 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F03E12566A for ; Mon, 7 Feb 2022 20:37:42 +0100 (CET) Received: from localhost ([::1]:56460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nH9pV-0002xJ-Nb for larch@yhetil.org; Mon, 07 Feb 2022 14:37:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nH9k3-0007Yo-S3 for guix-patches@gnu.org; Mon, 07 Feb 2022 14:32:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:49899) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nH9k1-0002JA-JL for guix-patches@gnu.org; Mon, 07 Feb 2022 14:32:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nH9k1-0007Ro-HW for guix-patches@gnu.org; Mon, 07 Feb 2022 14:32:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53765] [PATCH 13/17] gnu: Add clojure-com-cognitect-aws-api. Resent-From: Reily Siegel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 07 Feb 2022 19:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53765 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos , 53765@debbugs.gnu.org Received: via spool by 53765-submit@debbugs.gnu.org id=B53765.164426231128612 (code B ref 53765); Mon, 07 Feb 2022 19:32:01 +0000 Received: (at 53765) by debbugs.gnu.org; 7 Feb 2022 19:31:51 +0000 Received: from localhost ([127.0.0.1]:43796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nH9jq-0007RO-Mo for submit@debbugs.gnu.org; Mon, 07 Feb 2022 14:31:50 -0500 Received: from mout-p-202.mailbox.org ([80.241.56.172]:59780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nH9jo-0007RB-Ei for 53765@debbugs.gnu.org; Mon, 07 Feb 2022 14:31:49 -0500 Received: from smtp202.mailbox.org (smtp202.mailbox.org [80.241.60.245]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4Jsx8s6KQfz9sSm; Mon, 7 Feb 2022 20:31:41 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=reilysiegel.com; s=MBO0001; t=1644262299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zPJCXZvUVX6D3vQPeMftQCBsvyu2gr/Wq+J1fPzXd+w=; b=oQSgg5NrIc7UTMVxjj3s9HgNeSf3vvErywDBwplu0Fb04NUYtjsbPUy6srA2V/HpKTlrfg tK6HbBtfeZHW2sbN7mW/rGGydrLdHN9t7OpPzG0C7qF6GeUshnmFI5seTrSOmqDmu+Ubf0 52VJnaRNRqGH/X70yoTccO5lINP6yUnYGXU6bir8OjKaRo3Bd5qHx0GqYBXmlPKYneJ+Yl rO3P6p3tJi31qKmfAdZkatL9QuRlnd8Ngn7j8Svy2sx1/OfWmk+1RBDc0hvSZ6F2zLMqY8 7uFEg/UVcfSoH+SmJSZq+eLiXw2eG0WT1oGN2rmqQVvPttKrSwjghV4FDUmSkA== From: Reily Siegel In-Reply-To: <18d931f2449797067ff0894fe63dd2571c50df47.camel@telenet.be> References: <87y22r32hi.fsf@reilysiegel.com> <87ee4j32av.fsf@reilysiegel.com> <793f3ffc777b0023ac225c3c5a826fff3548ebbb.camel@telenet.be> <87fsouy2do.fsf@reilysiegel.com> <18d931f2449797067ff0894fe63dd2571c50df47.camel@telenet.be> Date: Mon, 07 Feb 2022 14:31:35 -0500 Message-ID: <87a6f2xylk.fsf@reilysiegel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1644262663; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=zPJCXZvUVX6D3vQPeMftQCBsvyu2gr/Wq+J1fPzXd+w=; b=ooYBarWJt5Bz/UjU80pLlPelupTfBMU8OZSiPasdiGjFqIWT7JW2ph7geIdbT+keHosdem 81wu+KyOfivWd3HAWdAfCCUilcTxFNb9dZdO8FFwVZvuuGVcwFQbM019saAmUBXOG7KG1q tIie/jQCbdp/wVcF48G7vRMr5sZidan1rjSeusjUJbtsy9T2y9r4jpuclrVNkFj1bm5p8d PxbHC5dnll3HPv3BG6LjG663l7iKew7BKSYQGPguXVDoiGA8wxHTI/RoHkAZd2PPjQphYa 1QvQJ0l80HcZ8Uh9s5kJgqhHg89p0Y3DUWM0oG++cuFUPEm9U+cfrklVSbB5HQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644262663; a=rsa-sha256; cv=none; b=VaC8TxQoXXZbBpulz+XXtl+cie3A45rr9XW/TX7y6vT06ACflqeb9DxeSLB8n9DsojKYdi GO+/eUUrL5ocafXmHhnTb7X7RhLROFbHav6T4wX0ihlxRE7V479LINZvKaHqzNOtBmmaGJ UEV3pS0d8+884tQ3q5Pv/koXX/x3p7+KQfgB0+ltBTSe4MfOHkQFRehAfPaDlQy9QdC0bN 1KGe0Xb3w1DyZ7nNk+bK75P8JEo5pLCL3etup6zO6TqYaUhOojdp54ET5IgZL1OQf2RvsK CXDZbwvN8bVNNoNfxkMqWxqd+b6J8VkcuwY0B6fCsZCWpTr20J1Um/q6zhhiqw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=reilysiegel.com header.s=MBO0001 header.b=oQSgg5Nr; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.33 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=reilysiegel.com header.s=MBO0001 header.b=oQSgg5Nr; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: F03E12566A X-Spam-Score: -2.33 X-Migadu-Scanner: scn1.migadu.com X-TUID: sYbqVZ2hDm2D Maxime Devos writes: > OK, though I don't see how it can be declarative -- it's a library > for =E2=80=98invoking AWS APIs=E2=80=99, which seems rather imperative, a= t least > procedural. Let me compare this library and the official Java AWS SDK. #+BEGIN_SRC java // Create a GetItemRequest instance GetItemRequest request =3D GetItemRequest.builder() .key(keyToGet) .tableName(tableName) .build(); // Invoke the DynamoDbAsyncClient object's getItem java.util.Collection returnedItem =3D client.getItem(reques= t) .join() .item() .values(); #+END_SRC #+BEGIN_SRC clojure (aws/invoke s3 {:op :GetObject :request {:Bucket bucket-name :Key "hello.tx= t"}}) #+END_SRC The Java API programatically creates a Request object, when is then modified by several methods to set the options, before being invoked. The Clojure API, on the other hand, specifies the operation declaratively using plain Clojure data structures (in this case, keywords, strings, and maps), before calling invoke on that specification. The declarative part is in how the API is interacted with, not necessarily what happens in the library internals or over the wire. Examples from the respective documentations of each project. --=20 Reily Siegel