From users-return-5953-archive-asf-public=cust-asf.ponee.io@isis.apache.org Thu Feb 15 10:05:56 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 48CEF18064A for ; Thu, 15 Feb 2018 10:05:56 +0100 (CET) Received: (qmail 90612 invoked by uid 500); 15 Feb 2018 09:05:55 -0000 Mailing-List: contact users-help@isis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@isis.apache.org Delivered-To: mailing list users@isis.apache.org Received: (qmail 90594 invoked by uid 99); 15 Feb 2018 09:05:54 -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; Thu, 15 Feb 2018 09:05:54 +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 F3A6E1A0956 for ; Thu, 15 Feb 2018 09:05:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.479 X-Spam-Level: *** X-Spam-Status: No, score=3.479 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_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_WEB=1.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=healthengine-com-au.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 qEnFlYKVoEDi for ; Thu, 15 Feb 2018 09:05:51 +0000 (UTC) Received: from mail-it0-f46.google.com (mail-it0-f46.google.com [209.85.214.46]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id B56715F169 for ; Thu, 15 Feb 2018 09:05:50 +0000 (UTC) Received: by mail-it0-f46.google.com with SMTP id v186so12957150itc.5 for ; Thu, 15 Feb 2018 01:05:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=healthengine-com-au.20150623.gappssmtp.com; s=20150623; h=message-id:mime-version:to:from:subject:date:importance:in-reply-to :references; bh=HoVL8tUh1jm1eUfLboSwRSe+34pAvtB+kGgo38/OO9Q=; b=ctqNPs6KQ8We0XzcMJsFxY7t2dDw6aolRryM1G9ums/RISVkhBGYR3SdfVyxTwTwTY bFvJYDrrs0xaa7YQBYKFUc1AeXEyJ9vM+lyVHQ1qcinxsxn+SFoxJcpSfthVsplNqj57 UmQFQFlyym6SD99d8km6nAjQelamqAslYO77HpB/16GMqG7Fwc5gBQM3Q7DYfAO5iOC5 y7/UKowsM8/bxSr/ttd2z55DJKVB68SHCLMvWXbqKRXX8/WIpJdQ6s6dxjJT+U+WZca4 0Ns2ttUs/Wq8KpmQHCgf1cFJBy0o34o6sUfQu7jOT7yalZlwjoIH4irrw+R1Am+2OagA K45g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:mime-version:to:from:subject:date :importance:in-reply-to:references; bh=HoVL8tUh1jm1eUfLboSwRSe+34pAvtB+kGgo38/OO9Q=; b=fY7VszLoIb2IrK/i/z/ZYFFG38WX2MQ6e/ES66A8USMd2+ZbVV0sPc5ALyRJqne+RS wRZamFUCFwmjUYaPk8ZP/YQsuSfMRQHKFPC0dCUjBsr8czlJQwE/WsPua75WJ0pBWi1q tqKCf4J71zWY89edIUtgaFt7VEr+VHyE0llXUKAOKvPZMFvAGckZ0otkek2kxahLknU5 UF39+L6oTyx5Y51oj0dbCtDH6QkYwqjxD1TsAYj/H7bAWDhIBlh07nlOOF+hsiFoD1GQ tinraoAI/5ylvNoP2MnTgdJPkpKRo1MR/w3ANtqa4c6NxpzW8whqdPfcEmr0O7Bj5RRD jvDQ== X-Gm-Message-State: APf1xPClITzZlXzcbT2cBHsvdFnvjPzEaxTFYA5bFb0vRHOGKsMr9gPM y+6uKAJPHYQ7+JbK+VESLr+mSLfyhDk= X-Google-Smtp-Source: AH8x2279qA/RHs2knsvAj93w10b8Jo1jiW1OZpSJEBUCtE/VsTvw5ADt+O2VdbGGI1grLl6mGA7XzQ== X-Received: by 10.36.20.215 with SMTP id 206mr2457966itg.101.1518685549249; Thu, 15 Feb 2018 01:05:49 -0800 (PST) Received: from ?IPv6:::ffff:192.168.1.11? ([116.75.186.252]) by smtp.gmail.com with ESMTPSA id p144sm13855929itc.11.2018.02.15.01.05.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Feb 2018 01:05:48 -0800 (PST) Message-ID: <5a854d6c.9678240a.d54e5.c8d3@mx.google.com> MIME-Version: 1.0 To: "users@isis.apache.org" From: Nikhil Dhamapurkar Subject: RE: RE: Swagger / Apache Isis response batching Date: Thu, 15 Feb 2018 14:35:47 +0530 Importance: normal X-Priority: 3 In-Reply-To: References: <5a72a005.c768240a.35f9e.5436@mx.google.com> Content-Type: multipart/alternative; boundary="_0B2F5800-29CD-4C4D-ADF3-ACF84FA3076E_" --_0B2F5800-29CD-4C4D-ADF3-ACF84FA3076E_ Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Hi Dan, I have created isis-example project repository [1] it has simple-app and sm= all publisher application that sends post calls to apache isis Simple-app. I tried to add tenancy but was not able to get it working, have commented t= he code in the simple app, the login screen was preventing isis-module-sec= urity-admin/pass from logging in. I believe if you just run Startup.java class of http-publisher maven projec= t while apache isis simple-app is running ( existing isis app should work = as I have commented the tenancy code in my application.) The request / response takes ~ 1 sec for creating a new object if delay bet= ween requests is 5 sec, I have used vertx=E2=80=99s httpClient and also ad= ded a vetx webclient that sends a create request for simpleObjects, if the= delay between object creation is reduced the response time increases. [1] https://dhamapurkar@bitbucket.org/dhamapurkar/isis-example.git Regards Nikhil From: Dan Haywood Sent: 01 February 2018 18:53 To: users@isis.apache.org Subject: Re: RE: Swagger / Apache Isis response batching Hi Nikhil, Could you put together a sample app to demonstrate the issue, in particular how you are calling the rest API? I'm not aware of any batching code in Isis itself, but I think I am probably not fully understanding what you're aiming to do. A sample app would make sure we're on the same page and give me a head start for developing an improvement to Isis if it turns out we need one. Thx, Dan. On Thu, 1 Feb 2018, 07:39 Andi Huber, wrote: > Ok, thanks Nikhil, > > this sounds like an issue - worth investigating - to me. > > Clarification: Tanancy logic is handled by the 'security' module that's > provided by the 'incode platform', which is not part of Isis 'core'. > > Just to let you know: It's unlikely, that I myself, will look into > incode's source-code, but hopefully someone else will help out! > > Regards, Andi > > > On 2018/02/01 05:05:08, Nikhil Dhamapurkar > wrote: > > Hi Andi,> > > > > I believe the issue should be easy to reproduce and gets elevated in > an application which supports tenancy because when the object is going > to be rendered for UI or sent to client it will pass through the > implementation of interface ApplicationTenancyEvaluator which will need > to read data from user or roles.> > > > > If you publish bulk insert requests 20-30 via swagger you will notice > the data will get inserted in DB much ahead than the responses received > on the client handler.> > > I added small instrumentation in code with stop watch which had total > time taken for the request /response, Time spent in tenancy checks , > time spent in Menu calls in Apache ISIS but the total client time is > much more than sum of tenancy + method call execution time.> > > > > Regards> > > Nikhil> > > > > From: Andi Huber> > > Sent: 31 January 2018 14:46> > > To: users@isis.apache.org> > > Subject: Re: Swagger / Apache Isis response batching> > > > > Hi Nikhil,> > > > > I guess there is no such option, but I might be wrong.> > > > > From my understanding, any request you send to Isis (and swagger), is> > > processed within a transaction Likely you don't get a response unless> > > this particular transaction has completed (either with success or not).= > > > > > Not sure if this applies to your use-case, but you might solve this by> > > reducing the number of records done per batch.> > > > > If you believe this is an issue with Isis, we could look into it, but> > > would need more information on how to reproduce the issue.> > > > > regards, Andi> > > > > > > On 2018/01/29 16:04:12, Nikhil Dhamapurkar > > > wrote:> > > >> > > > Hi,>> > > >> > > > We are persisting data in DB using isis / swagger URI around 5500> > > records. I can see the inserts in Database are being done at acceptable= > > > times; in a few milliseconds.>> > > >> > > > But I can see that swagger / apache isis is batching the responses an= d> > > not sending them asap this delays the client from getting the response> > > back in time.>> > > >> > > > Since he response is not received the client in its next cycle send> > > the same request, is there a property where I can disable this > batching ?>> > > >> > > > I have tried adding c3p0 for connection pooling and cached tenancy> > > changes ins some cases to gain performance improvement but its not> > > helping much.>> > > >> > > >> > > > Statistics :>> > > > DB insert per record ~ 2ms.>> > > > The response time seen in client increases ( maybe queued ?) =3D 30 s= ec> > > and more for later inserts.>> > > >> > > > Regards>> > > > Nikhil>> > > >> > > >> > > > > > > > > --_0B2F5800-29CD-4C4D-ADF3-ACF84FA3076E_--