Return-Path: X-Original-To: apmail-cayenne-dev-archive@www.apache.org Delivered-To: apmail-cayenne-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4740318152 for ; Wed, 23 Sep 2015 10:45:46 +0000 (UTC) Received: (qmail 55285 invoked by uid 500); 23 Sep 2015 10:45:24 -0000 Delivered-To: apmail-cayenne-dev-archive@cayenne.apache.org Received: (qmail 55259 invoked by uid 500); 23 Sep 2015 10:45:24 -0000 Mailing-List: contact dev-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list dev@cayenne.apache.org Received: (qmail 55247 invoked by uid 99); 23 Sep 2015 10:45:23 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Sep 2015 10:45:23 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 850A0F6F48 for ; Wed, 23 Sep 2015 10:45:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.001 X-Spam-Level: * X-Spam-Status: No, score=1.001 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id oL8fxySWR_jO for ; Wed, 23 Sep 2015 10:45:15 +0000 (UTC) Received: from smtp4.objectstyle.com (smtp4.objectstyle.com [23.253.156.183]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTP id 893C825D96 for ; Wed, 23 Sep 2015 10:45:15 +0000 (UTC) Received: from [192.168.1.55] (unknown [212.98.191.4]) by smtp4.objectstyle.com (Postfix) with ESMTPSA id B0D5ACC360 for ; Wed, 23 Sep 2015 10:47:49 +0000 (UTC) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: Change audit framework From: Andrus Adamchik In-Reply-To: <56027D02.4090704@maniatis.org> Date: Wed, 23 Sep 2015 13:45:13 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <0B624F6F-3997-4636-8971-6B2A27D79DAB@objectstyle.org> References: <99D4891D-B122-42D7-B3A8-9FB813FE5395@objectstyle.org> <37349AC6-89F5-4571-A981-0F21DA0363C0@objectstyle.org> <51F05A4C-B3B2-4DCC-B1C2-C435C07A7DEA@karlmenn.is> <8FD188D0-260B-4A02-A981-5464B4817C03@objectstyle.org> <56027D02.4090704@maniatis.org> To: dev@cayenne.apache.org X-Mailer: Apple Mail (2.2104) > On Sep 23, 2015, at 1:20 PM, Aristedes Maniatis = wrote: >=20 > * fail fast and don't stop the main Cayenne processing thread. That = is, if the message broker/other database fails to return quickly, don't = prevent the commit returning control to the application. Possibly even = try to attempt the storage in a separate thread. >=20 > * if the audit message fails (say your message broker is dead), then = raise an error and try to roll back the transaction. I'm guessing it is = too late for Cayenne to help with that. I think multi-threading and error handling concerns are outside of = Cayenne concerns. We'll dispatch these events synchronously, letting the = receiver do anything fancy beyond that on their own. E.g. in my code, Kafka access is abstracted as a "log queue service", = swappable via DI to sending output to STDOUT. Andrus=