From user-return-12507-archive-asf-public=cust-asf.ponee.io@cayenne.apache.org Wed Oct 2 14:26:30 2019 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 68F6618064F for ; Wed, 2 Oct 2019 16:26:30 +0200 (CEST) Received: (qmail 18125 invoked by uid 500); 2 Oct 2019 14:26:29 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 18111 invoked by uid 99); 2 Oct 2019 14:26:29 -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; Wed, 02 Oct 2019 14:26:29 +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 AF2C11A32D1 for ; Wed, 2 Oct 2019 14:26:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=giaccone-org.20150623.gappssmtp.com Received: from mx1-he-de.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id RKTbs3VAK53Y for ; Wed, 2 Oct 2019 14:26:26 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::72a; helo=mail-qk1-x72a.google.com; envelope-from=tony@giaccone.org; receiver= Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with ESMTPS id 955A87DE2D for ; Wed, 2 Oct 2019 14:26:25 +0000 (UTC) Received: by mail-qk1-x72a.google.com with SMTP id x134so15196493qkb.0 for ; Wed, 02 Oct 2019 07:26:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=giaccone-org.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:date:subject:message-id :references:in-reply-to:to; bh=CZl+XHDjBkTvGWdIaNHHKFJ7QZr3JZVxAERiO1iOU7g=; b=lpQ69K/vtyPNv4BB9Y6L61JKgrFdub+/uiEUwu7bWUbteuYr8L5CM0qORnupA1X0X7 JWngzQFyyHTPnJI/kuwh32npKlfDYLgRgodWLx8KVpxvXv1Pn+FumJwdr+EvIAJpy5hd /lupPgu5YEkvgPuqoBd3T54HkJ3KStgaSNu27o4tWbizXvW9lcqD5G3XQLAv9Y/UHnpR cixxKMF1LfRQIMAT4ourReyBwf9z0YcHfr7yPMbUbwNIE/Jp4gWtFl8bC3DASozKdc64 CI0k62GuB0EyPRDzyEk3uK4LIJgHM25AIWMdi3/aM2xMA0aqHahRxPWvsIw5fG60HoMF lp5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version:date :subject:message-id:references:in-reply-to:to; bh=CZl+XHDjBkTvGWdIaNHHKFJ7QZr3JZVxAERiO1iOU7g=; b=FWY7+fO9Mj4UbkRdKod71aP9Eztx1+VdHH8EoVVn2k8+MZGVgLJvRcEfEnjjEioas0 F6o+v37e4yLvOBerfAwt7LUApEEEM9q0liDWTGvnZiMwO1EVmjF85LNeHr7J/b0HMvTU 2vgoWzGXuNwosVFplziOORTf0crzOIq0Kp3ID8Xf9W9h3eOCu5GHE1AX3XG+ONFf1Gg/ hCIvBhC26wUysGG3jVvRsIDWNNsQ6qa9t7Sez+VljeOzvQ27+GHdIKH4cWB4qZD+228P DBDTqhCsEZymWB12/ZnQ+C0Zz5Fpq135x6gsqmGsUgFfdHFG13h1Me5R5SJxTjOfdUul Aaxg== X-Gm-Message-State: APjAAAVE0R4qeljA2ynT4czAT5Bi1gsbaZFLMJt2Hw5vJ/beHAcR9qEP hdf8FceDHeoxTZV9Y8MQwgRjvK6B8WM= X-Google-Smtp-Source: APXvYqwdL/Soa78cE0FE+WFdZoJ5wX2NIFdyAlMJ2jFf8rNuNAtITjVrJlr6M7A1xc0bmP+NqivOrw== X-Received: by 2002:a37:a68e:: with SMTP id p136mr3932134qke.49.1570026383573; Wed, 02 Oct 2019 07:26:23 -0700 (PDT) Received: from ?IPv6:2607:fb90:13d4:fa46:3004:af7d:35b7:fb44? ([2607:fb90:13d4:fa46:3004:af7d:35b7:fb44]) by smtp.gmail.com with ESMTPSA id a72sm9005456qkg.77.2019.10.02.07.26.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Oct 2019 07:26:22 -0700 (PDT) From: Tony Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Date: Wed, 2 Oct 2019 10:26:22 -0400 Subject: Re: entity Qualifiers and enums Message-Id: <1EE70EE5-613C-4450-BDFB-9935326CC70B@giaccone.org> References: <2D092DBB-673F-4AE2-BD53-2A0B9DBD319C@juicycocktail.com> In-Reply-To: <2D092DBB-673F-4AE2-BD53-2A0B9DBD319C@juicycocktail.com> To: user@cayenne.apache.org X-Mailer: iPhone Mail (16G102) If you=E2=80=99re going to use the model in several applications, I don=E2=80= =99t know of a better way. We package the model, the generated classes and a= set of services for basic access to the model in one jar. Then each app inc= ludes the jar and implements a set of business services.=20 Up to this point our apps are different enough that we don=E2=80=99t share b= usiness logic. But I could see that happening at some point and then we=E2=80= =99ll build a business services jar and share that as well.=20 We break our apps into two parts. One handles web api requests. It inserts e= ntries in a task table and a worker job picks those up and processes them. C= lassic example is a file dropped in a google bucket. GCP creates a pub/sub n= otification to our manager app. It validates the bucket name, uses that to i= dentify what kind of file has been uploaded and creates a task to process th= e upload. A few google api calls a select or two and one insert into a task= table. A worker app, wakes up, queries the task table and acts on the file that was= uploaded.=20 If we need to scale we could run multiple workers and handle load by claimin= g tasks. Tony Tony Giaccone On Oct 2, 2019, at 5:09 AM, Rafael Bugajewski wro= te: >> On Oct 2, 2019, at 12:23 AM, Tony Giaccone wrote: >>=20 >> The other thing that bites me from time to time, is that we have our data= model classes in a separate jar file. When you make changes to that and bui= ld from the command line, the related builds don't pick up the change unless= you install it in the local repository. Not a problem if I build from the r= oot directory, but I don't always want to build everything. >=20 > It=E2=80=99s essentially the same thing here. We have our model classes an= d other common code in a separate JAR file that we can deploy across several= services. It=E2=80=99s a PITA, especially if you only need to introduce sma= ll changes to test something out, but there=E2=80=99s no better way, or is t= here? >=20 > Best, > Rafael