Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-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 374EA19851 for ; Sun, 10 Apr 2016 10:19:35 +0000 (UTC) Received: (qmail 80803 invoked by uid 500); 10 Apr 2016 10:19:35 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 80752 invoked by uid 500); 10 Apr 2016 10:19:35 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 80740 invoked by uid 99); 10 Apr 2016 10:19:34 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Apr 2016 10:19:34 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 3924DC064A for ; Sun, 10 Apr 2016 10:19:34 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.492 X-Spam-Level: X-Spam-Status: No, score=0.492 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id oKu5gyyFAllG for ; Sun, 10 Apr 2016 10:19:31 +0000 (UTC) Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 620855F237 for ; Sun, 10 Apr 2016 10:19:31 +0000 (UTC) Received: by mail-wm0-f49.google.com with SMTP id v188so56482076wme.1 for ; Sun, 10 Apr 2016 03:19:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=/8dUXLuiEAHFAOa20CCgYGNJdopPPnzw8PYPZg1HitE=; b=R+IFiA9kANwcgtE1QkNBFS1n0yEIowHWVezmoJR5DOGK+Xmjn6o1dHC70YZ/ijrK9z OFdHM3LDNwJJwQExlJpi9HUNkKhF89UWrBT0fa+JNxVwn9Q/vmRmXdr86yvQhKESGkrm 0Y7MHPA9gw3gIXl79QM/b9OO+dv9lh4hub15KomOnjKozrr7HCx5cJ7F4Z/rn1ZF2YxY zh1gKT6Sk211HVN/eIXp3U0TZUJWIX9ny1PockTeObiJhMYEWJodTRrum6Ms2Rqqe2K0 YtJqn6/7JjkxKSoQ6R8VvepeVDUF//6LvpME2BdKlphT9sjI+tBLSuYCKXjVsoGHLsNe HB5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=/8dUXLuiEAHFAOa20CCgYGNJdopPPnzw8PYPZg1HitE=; b=aBM9VKQRFcwmuuxzIfO3DkJ5JP7E3xh4eLJhyQ6cpqsDEzbUYH9bp45lYOrZDN6b86 zeVb0MNJKJOOxJ1EdXt1z9fcCG17eE3YGjNpUYqwq0QlewDXot8YXmY2BB1deA37LIB9 gyNL0/huBUGYly1mHorbpcC9cNr4WeY/NDhKzOOjYeaLJXOkOT5gOL8oIdmOriC5CBN5 iSPmmsghthGZ4+IDuXmCIzy+nSf0+PhT3g+mfK2Gr3UV4Mf7XBoD28dNdxga95yzuf25 w57KDxytlCGAN8VQsPex3R9N0Ynedqsc6trB9In7ix6916di8QvAcIlBnPXH2tccofWt NWMw== X-Gm-Message-State: AD7BkJK8r/eaJZHX7ZHr7C0HaNVWra/QH0ycxAl7zTc42miRTDfxx8JN3K9tPIZr7SBzmzj+GM43PhagB4RUkQ== MIME-Version: 1.0 X-Received: by 10.194.179.227 with SMTP id dj3mr18393828wjc.50.1460283571049; Sun, 10 Apr 2016 03:19:31 -0700 (PDT) Received: by 10.28.129.74 with HTTP; Sun, 10 Apr 2016 03:19:30 -0700 (PDT) In-Reply-To: References: <1459786066623-5780454.post@n5.nabble.com> Date: Sun, 10 Apr 2016 11:19:30 +0100 Message-ID: Subject: Re: New camel-hystrix component From: Bilgin Ibryam To: "dev@camel.apache.org" Content-Type: text/plain; charset=UTF-8 Hi chaps, I'm also not very happy with the way endpointId are part of the hystrix URL but that was the only non-intrusive way I manged to implement it atm. Keep in mind that we want both Java and XML dsl solution. So if you have any ideas to make it easier to use, feel free to work on it. I won't have bandwidth to improve it further in near future. The previous time when I implemented the circuit breaker, the most appropriate location I found end up being the load balancer. It did nicely fit there, bit I think it is still not natural to say that CB is a LB strategy. This time I decided to use a component as I think hystrix is only one implementation of CB. In addition, hystrix does not implement only CB, but more and more things, which I find confusing. It does bulkheading (which is fine), but also request collapsing, and also caching. For something like request collapsing, the more natural way would be to have aggregator in Camel, and for the caching it would be better if we had caching DSL with various implementations (very importantly: distributed cache). I think for CB we need a new EIP, and not LB and a component. Hystrix can be an implementation of the EIP. And it might be better if the caching, request collapsing concepts are not mixed with the CB EIP. Cheers, On 6 April 2016 at 07:43, Claus Ibsen wrote: > There is some pros with being an endpoint configuration only, as it > can make it easy for tooling and some developers to use it (when they > are used to configure uris, and just use from -> to -> to etc). I > guess the bit unusual part is that you refer to endpoint by id's which > is not so commonly in use by Camel. > > You could also have CB as a kind of error handler, aka onException, > but have it as onCircuitBreaker, where you can setup those breaker > configs and fallback routes / endpoint etc. And whether to use a > fallback or reject or whatnot. > > Just a quick pseudo code / braindump > > > IOException > > > > > > On Mon, Apr 4, 2016 at 6:07 PM, Preben.Asmussen wrote: >> Hi bibryam >> >> At first glance it looks a bit intrusive when the usual endpoints are >> 'wrapped' in the hystrix endpoint. >> >> Could it be something like -> psudo code >> >> > xmlns="http://camel.apache.org/schema/blueprint"> >> >> >> >> .............. other options >> >> >> >> > uri="timer://local?fixedRate=true&period=50&repeatCount=5"/> >> >> >> >> >> >> >> >> >> /Preben >> >> >> >> -- >> View this message in context: http://camel.465427.n5.nabble.com/New-camel-hystrix-component-tp5770955p5780454.html >> Sent from the Camel Development mailing list archive at Nabble.com. > > > > -- > Claus Ibsen > ----------------- > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 -- Bilgin Ibryam Camel Committer at ASF & Integration Architect at Red Hat Blog: http://ofbizian.com | Twitter: @bibryam Camel Design Patterns https://leanpub.com/camel-design-patterns Instant Apache Camel Message Routing http://www.amazon.com/dp/1783283475