Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B02F6200CA7 for ; Wed, 14 Jun 2017 11:36:51 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id AF01E160BDB; Wed, 14 Jun 2017 09:36:51 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 026F6160BC0 for ; Wed, 14 Jun 2017 11:36:50 +0200 (CEST) Received: (qmail 8893 invoked by uid 500); 14 Jun 2017 09:36:45 -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 8876 invoked by uid 99); 14 Jun 2017 09:36:44 -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; Wed, 14 Jun 2017 09:36:44 +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 503D7C047B for ; Wed, 14 Jun 2017 09:36:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.397 X-Spam-Level: X-Spam-Status: No, score=-2.397 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_H2=-2.796, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-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 (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id f6tH0um_Rjzh for ; Wed, 14 Jun 2017 09:36:43 +0000 (UTC) Received: from mail-io0-f169.google.com (mail-io0-f169.google.com [209.85.223.169]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 37E335F6C7 for ; Wed, 14 Jun 2017 09:36:43 +0000 (UTC) Received: by mail-io0-f169.google.com with SMTP id t87so69391657ioe.0 for ; Wed, 14 Jun 2017 02:36:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=/LcJzNF/U/rJT0lCclbBcHE9pgtJlTQk7XbC7BggW/U=; b=sT/gRjoMi3YPFEAwebbxFD/1YEMQozEFaxAZCZpaR3W7ew2jebGlciBV/kBFObETJ2 Y5vBRjgYY+YCP0z6rDEbCOpSqC+H+6STHufj63IDSIrqXL2CRVGho/kPsmfMSU0+0M/1 jOXQ1YaEKPBCzlHx8QA4qOA97VWi+hKnn1qn5iiPn7ctHKb9m8DyDyr5HY1DbTUk+eYM mZaoBGPOSzFIVRB0gKHYGDCfApiENDZhVxC6lAcxGlvzNt7Ljc8L1S0IbVQ8DL7apBWj 2NfzTIBSP384Tzv17jDhikU+9lxJywRaye0eNxVMzW5bixyveRMhADvw9nwuKcx3v5lL ZnrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=/LcJzNF/U/rJT0lCclbBcHE9pgtJlTQk7XbC7BggW/U=; b=HDpJWRJ7ONlCBWlly5f+LKj7/w4EpIIKj4OLaumXiZXMwF0h/KCgkgfJN+DCUoX6a5 3NbICXRdoypP0krp9759ZrgfMzJ+5ARfqfVdBCa/25NwMUdOShK6wGdzgppoirYrIMqz eXxJ8Cis3qPlBmzuvsQxqDx2Jhp7SMwyNnDzbGI1BLBPbbjxqTF2/1Bb8BJ50W+f+j5/ UoRJQrB3HoRyD/uB6StpafeHK/8A5YLgGM4LRPJ/sOg2CS5SaKdD8nPckv/NBCexLSLh 5CTUx8V791945eYvrxmF8OPjZPFDp9GPX3Be0sH8rD/UdbHPnDbwQQo6ZuZfTiSjd6Sx i8rA== X-Gm-Message-State: AKS2vOye8+j2zqtwzhm93xzY99zfHascSc2r/jXkDwRr9MCY5tvl6MCn w4wNaRmH4n+Pm38f47EfAaWIuc3Ar46LUiU= X-Received: by 10.107.53.143 with SMTP id k15mr638020ioo.144.1497433002427; Wed, 14 Jun 2017 02:36:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.91.130 with HTTP; Wed, 14 Jun 2017 02:36:41 -0700 (PDT) From: Luca Burgazzoli Date: Wed, 14 Jun 2017 11:36:41 +0200 Message-ID: Subject: [HEADS UP] Camel clustering bits To: dev@camel.apache.org Content-Type: text/plain; charset="UTF-8" archived-at: Wed, 14 Jun 2017 09:36:51 -0000 Hello, I've been working on CAMEL-11362 to create a leader election service in recent times and I've ended up with some initial bits of a potential clustering service for Camel [1]. So fare there are a few simple interfaces: - CamelClusterService - CamelClusterView - CamelClusterMember The CamelClusterService is just a regular camel service and is responsible to create views of the cluster; a view is like a "group" with its own set of resources like a leader/services/etc and i.e. broadcast of messages should not go beyond its borders, etc; how the view is mapped then depends on the underlying technology used so it can be a group in atomix/jgroups, a path in zk/etcd, a map in hazelcast/infinispan, etc. As today the View API is limited to leader election and topology events (member joining/leaving the view) and I've build a generic RoutePolicy and RoutePolicyFactory on top of them [2][3]. A future work may be to add support for service discovery, load balancing ad more. I also started the implementation of camel-atomix based on the atomix.io project which offers some easy to use APIs for distributed systems so an implementation of the API can be found here [4] and a test here [5]. Feedback is very welcome. [1] https://github.com/lburgazzoli/apache-camel/tree/CAMEL-11362/camel-core/src/main/java/org/apache/camel/ha [2] https://github.com/lburgazzoli/apache-camel/blob/CAMEL-11362/camel-core/src/main/java/org/apache/camel/impl/ha/ClusteredRoutePolicy.java [3] https://github.com/lburgazzoli/apache-camel/blob/CAMEL-11362/camel-core/src/main/java/org/apache/camel/impl/ha/ClusteredRoutePolicyFactory.java [4] https://github.com/lburgazzoli/apache-camel/tree/CAMEL-11362/components/camel-atomix/src/main/java/org/apache/camel/component/atomix/ha [5] https://github.com/lburgazzoli/apache-camel/blob/CAMEL-11362/components/camel-atomix/src/test/java/org/apache/camel/component/atomix/ha/AtomixRoutePolicyTest.java --- Luca Burgazzoli