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

Reply via email to