From dev-return-1868-archive-asf-public=cust-asf.ponee.io@openwhisk.apache.org Thu Apr 26 11:16:13 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id CEF89180648 for ; Thu, 26 Apr 2018 11:16:12 +0200 (CEST) Received: (qmail 65546 invoked by uid 500); 26 Apr 2018 09:16:11 -0000 Mailing-List: contact dev-help@openwhisk.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openwhisk.apache.org Delivered-To: mailing list dev@openwhisk.apache.org Received: (qmail 65519 invoked by uid 99); 26 Apr 2018 09:16:10 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Apr 2018 09:16:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 85CC918040C for ; Thu, 26 Apr 2018 09:16:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.121 X-Spam-Level: X-Spam-Status: No, score=-0.121 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id dTimJl7fRQAe for ; Thu, 26 Apr 2018 09:16:07 +0000 (UTC) Received: from mail-lf0-f54.google.com (mail-lf0-f54.google.com [209.85.215.54]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 883F35FBBA for ; Thu, 26 Apr 2018 09:16:06 +0000 (UTC) Received: by mail-lf0-f54.google.com with SMTP id q5-v6so29600526lff.12 for ; Thu, 26 Apr 2018 02:16:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=IYKl3+JuCIy6VW7x1hgnqTizB+O0NKRDgOm2NBLT5Yw=; b=Yvmx+FhE3Da27mLCvJdliNXrbp4msyshnlgbkY6/IcTt45y7vPjEFHvLHuleOt70Ii eye0IjIVtefAvsxJNd1sLARfuOpobsYErUzw2th9fDHkoJMFnvKjYUJPSPtu4jL66LBT PMbR7CQnpzhztKHlI7wMenY1cMYYReXkP9FYxmEgEVWNXnZHe2NLF9GJwU/XXqi7JkUl wuFhUuR6Q+trTGlJiYkA4BfSr+sHo3uXui4lLwG1TXzJPR3QohYdKJiSmrHIB5s5Ko+5 KbY7gae494j5DTnIM8HyHnQ2BqAdVzZnAZHhOaBP3tnKjpdzrHg98EcwVjqWJSTVP/JI kdMA== 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:content-transfer-encoding; bh=IYKl3+JuCIy6VW7x1hgnqTizB+O0NKRDgOm2NBLT5Yw=; b=HkudYc0bGFeyV8XCVBaZwePIicLSlc8AuQBgmnbCpGspk7vtw3rorCRnZ8vUsNwy/R kh8eORwtsswinWxg0PiXyJsrJ9JrtRhxjKq4bsaMFYNRuDf+UacA9NLKVe9mVVOIIT2n JlcLDSibu++xwXZsJeB/Zwmr25kNTfspnJQg6jpwgKt46bwZYn3ELwxEeAkI5vneQ84O vbhXJjUN+K0ID6Pprt0f1+r0bUDQN4bG6QcXESfSb/YbcjzN2+5ANhmL392ME7FJK8lL cN3SxqrKJH9twbV0Ki6iNElsraMD8mG2YlHO/UX4L7z1pHiZoRXi9US+c+DrE5kklnHP OOXg== X-Gm-Message-State: ALQs6tCL4rZW2l5wQtm+BVX7RMXpnThV0IiSd4JeO3Jp/ung7/zlD4u4 5enph1LzshT3oAHuPElVEZRkpa6L4KK64Gb5Ymo2qrZ/ X-Google-Smtp-Source: AB8JxZqfJhb10vxjt1ls85/3qOK30lvgcZuwW/xpQObd4lFUZnYOpLKAenhQPMLSwOWlKh68BTqvzlEzps0/p9Mosos= X-Received: by 2002:a19:1895:: with SMTP id 21-v6mr15747040lfy.39.1524734164898; Thu, 26 Apr 2018 02:16:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.46.134.84 with HTTP; Thu, 26 Apr 2018 02:16:04 -0700 (PDT) In-Reply-To: <199F4775-0461-45FB-BA06-F88F87E8BC96@gmail.com> References: <199F4775-0461-45FB-BA06-F88F87E8BC96@gmail.com> From: Chetan Mehrotra Date: Thu, 26 Apr 2018 14:46:04 +0530 Message-ID: Subject: Re: Implement wskadmin in scala To: dev@openwhisk.apache.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > (wskadmin) could become more heavy weight Yes thats a concern and Python dev is more light weight. I would still prefer Python for ad hoc tooling required for one off tasks. But anything which needs to be stable and supported properly for general use it would be better to go for proposed approach. > Are you considering the totality if wskadmin or a partitioning and only r= eplacing some of partitions? For now the focus is on DB specific task i.e. user,limits,db. For syslog I am not sure as I think its more dev tooling and can only work for local setup. Other command in wskadmin on the other admin can be used for production setups if required. Chetan Mehrotra On Thu, Apr 26, 2018 at 2:36 PM, Rodric Rabbah wrote: > My initial reaction is that it (wskadmin) could become more heavy weight = (small changes becomes longer edit, compile iterations) - case in point the= wsk cli in Python vs Go... but weighed against the benefits Chetan outline= d with potential for a lot of shared code with the backend cannot be discou= nted. > > I=E2=80=99m not familiar with oak-run and will take a look to educate mys= elf. > > Are you considering the totality if wskadmin or a partitioning and only r= eplacing some of partitions? (I understood the former, just making sure.) > > -r > >> On Apr 26, 2018, at 2:05 AM, Chetan Mehrotra = wrote: >> >> Hi Team, >> >> Currently for OpenWhisk admin operation we have tooling implemented in >> couple of python scripts like wskadmin, tools/db/* etc. These script >> currently talk directly to CouchDB to perform required actions. >> >> Sometime back I discussed the option to support other databases [1] >> and it was suggested to have wskadmin support various db backends. >> However looking into other scripts I found some of the tool/db would >> also be useful in context of other backends also. >> >> To simplify this aspect going forward it may be better to implement >> the important tooling in Scala itself as a separate sub module in core >> repo. This module would produce a 'fat runnable jar' which would be >> including all required dependency and can be used as a standalone cli >> tool. >> >> We used similar approach in Apache Jackrabbit Oak [2] where we produce >> this single jar which consolidates all the admin tooling. This has >> over the years became primary admin tooling for us. >> >> Such an approach would have following benefits >> >> 1. Implemented in Scala and thus able to leverage existing >> abstractions like ArtifactStore >> >> 2. For some of the bulk db operations it would be possible to leverage >> Akka Streams to implement simpler multi threaded flows. >> >> 3. Easy to implement tests for the tooling part >> >> 4. User management operations can be done via existing ArtifactStore >> feature set. So one implementation can work against multiple stores >> >> 5. No other runtime dependency i.e. specific Python version or Python >> module need to be deployed. Just have JDK 1.8 and use the jar in >> standalone manner. No need to even check out whole OpenWhisk repo >> >> Key requirement for such a tooling would be to be compatible with >> existing CLI argument format. >> >> If such an approach makes sense I can work on PR to give it a try! >> >> Chetan Mehrotra >> [1] https://lists.apache.org/thread.html/921a0a6350a7ec3a2dc77564612de59= 104995622f8417583291f20bc@%3Cdev.openwhisk.apache.org%3E >> [2] https://github.com/apache/jackrabbit-oak/tree/trunk/oak-run