[jira] [Updated] (CAMEL-10320) Provide a LeaderPolicy to ease the implementation of master/slave route/context

2017-09-20 Thread Luca Burgazzoli (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-10320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luca Burgazzoli updated CAMEL-10320:

Labels: clustering  (was: )

> Provide a LeaderPolicy to ease the implementation of master/slave 
> route/context
> ---
>
> Key: CAMEL-10320
> URL: https://issues.apache.org/jira/browse/CAMEL-10320
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Luca Burgazzoli
>Assignee: Dhiraj Bokde
>  Labels: clustering
> Fix For: 2.20.0
>
>
> I've been working on some master/slave RoutePolicy and I'm wondering
> if we can have a proper LeaderPolicy with a standardized
> implementation in Camel 3.0 so one has only to notify when a
> leadership is taken
> In addition it may be nice to have:
> - a support for Leader election from the CmelContext so the routes are
> started when the context become leader.
> - an option to warm-up routes or to keep them stopped while not leader
> Then we can also make it exposed in JMX so tooling are able to detect
> which are current master and slaves, and whatnot.
> Some possible DSL/EIP extensions:
> {code:java}
> from("...")
> .routeId("myRoute")
> .master() 
> .group("my-group")
> .consulConfiguration("http://consul-node:8500";)
> .end()
> . to(...)
> {code}
> {code:java}
> camelContext.setDefaultClusteredRouteConfiguration(
> ClusteredRouteConfiguration.builder()
> .withAction(ClusteredRouteAction.SUSPEND)
> .withHealtCheck(...)
> .consulConfiguration("http://consul-node:8500";)
> .build()
> );
>   
> // lookup the cluster configuration from the registry   
> from("clustered:file:/data")
> .routeId("data-files")
> .to(...)
> // lookup the cluster configuration from the registry  
> from("master:file:/share")
> .routeId("shared-files")
> .master()
> .configuration("...")
> .end()
> .to(...)
> {code}
> {code:xml}
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
>
> 
> 
> 
> 
> 
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (CAMEL-10320) Provide a LeaderPolicy to ease the implementation of master/slave route/context

2017-05-26 Thread Luca Burgazzoli (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-10320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luca Burgazzoli updated CAMEL-10320:

Description: 
I've been working on some master/slave RoutePolicy and I'm wondering
if we can have a proper LeaderPolicy with a standardized
implementation in Camel 3.0 so one has only to notify when a
leadership is taken

In addition it may be nice to have:
- a support for Leader election from the CmelContext so the routes are
started when the context become leader.
- an option to warm-up routes or to keep them stopped while not leader

Then we can also make it exposed in JMX so tooling are able to detect
which are current master and slaves, and whatnot.

Some possible DSL/EIP extensions:

{code:java}
from("...")
.routeId("myRoute")
.master() 
.group("my-group")
.consulConfiguration("http://consul-node:8500";)
.end()
. to(...)
{code}

{code:java}
camelContext.setDefaultClusteredRouteConfiguration(
ClusteredRouteConfiguration.builder()
.withAction(ClusteredRouteAction.SUSPEND)
.withHealtCheck(...)
.consulConfiguration("http://consul-node:8500";)
.build()
);
  
// lookup the cluster configuration from the registry   
from("clustered:file:/data")
.routeId("data-files")
.to(...)

// lookup the cluster configuration from the registry  
from("master:file:/share")
.routeId("shared-files")
.master()
.configuration("...")
.end()
.to(...)
{code}

{code:xml}















   
   





{code}


  was:
I've been working on some master/slave RoutePolicy and I'm wondering
if we can have a proper LeaderPolicy with a standardized
implementation in Camel 3.0 so one has only to notify when a
leadership is taken

In addition it may be nice to have:
- a support for Leader election from the CmelContext so the routes are
started when the context become leader.
- an option to warm-up routes or to keep them stopped while not leader

Then we can also make it exposed in JMX so tooling are able to detect
which are current master and slaves, and whatnot.

Some possible DSL/EIP extensions:

{code:java}
from("...")
.routeId("myRoute")
.master() 
.group("my-group")
.consulConfiguration("http://consul-node:8500";)
.end()
. to(...)
{code}

{code:java}
camelContext.setDefaultClusteredRouteConfiguration(
ClusteredRouteConfiguration.builder()
.withAction(ClusteredRouteAction.SUSPEND)
.withHealtCheck(...)
.consulConfiguration("http://consul-node:8500";)
.build()
);
  
// lookup the cluster configuration from the registry   
from("clustered:file:/data")
.routeId("data-files")
.to(...)

// lookup the cluster configuration from the registry  
from("master:file:/share")
.routeId("shared-files")
.to(...)
{code}

{code:xml}















   
   





{code}



> Provide a LeaderPolicy to ease the implementation of master/slave 
> route/context
> ---
>
> Key: CAMEL-10320
> URL: https://issues.apache.org/jira/browse/CAMEL-10320
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Luca Burgazzoli
>Assignee: Dhiraj Bokde
> Fix For: 2.20.0
>
>
> I've been working on some master/slave RoutePolicy and I'm wondering
> if we can have a proper LeaderPolicy with a standardized
> implementation in Camel 3.0 so one has only to notify when a
> leadership is taken
> In addition it may be nice to have:
> - a support for Leader election from the CmelContext so the routes are
> started when the context become leader.
> - an option to warm-up routes or to keep them stopped while not leader
> Then we can also make it exposed in JMX so tooling are able to detect
> which are current master and slaves, and whatnot.
> Some possible DSL/EIP extensions:
> {code:java}
> from("...")
> .routeId("myRoute")
> .master() 
> .group("my-group")
> .consulConfiguration("http://consul-node:8500";)
> .end()
> . to(...)
> {code}
> {code:java}
> camelContext.setDefaultClusteredRouteConfiguration(
> ClusteredRouteConfiguration.builder()
> .withAction(ClusteredRouteAction.SUSPEND)
> .withHealtCheck(...)
> .consulConfiguration("http://consul-node:8500";)
> .build()
> );
>   
> // lookup the cluster configuration from the registry   
> from("clustered:file:/data")
> .routeId("data-files")
> .to(...)
> // lookup the cluster configuration from the registry  
> from("master:file:/share")
> .routeId("shared-files")
> .master()
> .configu

[jira] [Updated] (CAMEL-10320) Provide a LeaderPolicy to ease the implementation of master/slave route/context

2017-05-26 Thread Luca Burgazzoli (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-10320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luca Burgazzoli updated CAMEL-10320:

Description: 
I've been working on some master/slave RoutePolicy and I'm wondering
if we can have a proper LeaderPolicy with a standardized
implementation in Camel 3.0 so one has only to notify when a
leadership is taken

In addition it may be nice to have:
- a support for Leader election from the CmelContext so the routes are
started when the context become leader.
- an option to warm-up routes or to keep them stopped while not leader

Then we can also make it exposed in JMX so tooling are able to detect
which are current master and slaves, and whatnot.

Some possible DSL/EIP extensions:

{code:java}
from("...")
.routeId("myRoute")
.master() 
.group("my-group")
.consulConfiguration("http://consul-node:8500";)
.end()
. to(...)
{code}

{code:java}
camelContext.setDefaultClusteredRouteConfiguration(
ClusteredRouteConfiguration.builder()
.withAction(ClusteredRouteAction.SUSPEND)
.withHealtCheck(...)
.consulConfiguration("http://consul-node:8500";)
.build()
);
  
// lookup the cluster configuration from the registry   
from("clustered:file:/data")
.routeId("data-files")
.to(...)

// lookup the cluster configuration from the registry  
from("master:file:/share")
.routeId("shared-files")
.to(...)
{code}

{code:xml}















   
   





{code}


  was:
I've been working on some master/slave RoutePolicy and I'm wondering
if we can have a proper LeaderPolicy with a standardized
implementation in Camel 3.0 so one has only to notify when a
leadership is taken

In addition it may be nice to have:
- a support for Leader election from the CmelContext so the routes are
started when the context become leader.
- an option to warm-up routes or to keep them stopped while not leader

Then we can also make it exposed in JMX so tooling are able to detect
which are current master and slaves, and whatnot.

Some possible DSL/EIP extensions:

{code:java}
from("...")
.routeId("myRoute")
.master() 
.group("my-group")
.consulConfiguration("http://consul-node:8500";)
.end()
. to(...)
{code}

{code:java}
camelContext.setDefaultClusteredRouteConfiguration(
ClusteredRouteConfiguration.builder()
.withAction(ClusteredRouteAction.SUSPEND)
.withHealtCheck(...)
.consulConfiguration("http://consul-node:8500";)
.build()
);
  
// lookup the cluster configuration from the registry   
from("clustered:file:/data")
.routeId("data-files")
.to(...)

// lookup the cluster configuration from the registry  
from("master:file:/share")
.routeId("shared-files")
.to(...)
{code}

{code:xml}















   
   





{code}



> Provide a LeaderPolicy to ease the implementation of master/slave 
> route/context
> ---
>
> Key: CAMEL-10320
> URL: https://issues.apache.org/jira/browse/CAMEL-10320
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Luca Burgazzoli
>Assignee: Dhiraj Bokde
> Fix For: 2.20.0
>
>
> I've been working on some master/slave RoutePolicy and I'm wondering
> if we can have a proper LeaderPolicy with a standardized
> implementation in Camel 3.0 so one has only to notify when a
> leadership is taken
> In addition it may be nice to have:
> - a support for Leader election from the CmelContext so the routes are
> started when the context become leader.
> - an option to warm-up routes or to keep them stopped while not leader
> Then we can also make it exposed in JMX so tooling are able to detect
> which are current master and slaves, and whatnot.
> Some possible DSL/EIP extensions:
> {code:java}
> from("...")
> .routeId("myRoute")
> .master() 
> .group("my-group")
> .consulConfiguration("http://consul-node:8500";)
> .end()
> . to(...)
> {code}
> {code:java}
> camelContext.setDefaultClusteredRouteConfiguration(
> ClusteredRouteConfiguration.builder()
> .withAction(ClusteredRouteAction.SUSPEND)
> .withHealtCheck(...)
> .consulConfiguration("http://consul-node:8500";)
> .build()
> );
>   
> // lookup the cluster configuration from the registry   
> from("clustered:file:/data")
> .routeId("data-files")
> .to(...)
> // lookup the cluster configuration from the registry  
> from("master:file:/share")
> .routeId("shared-files")
> .to(...)
> {code}
> {code:xml}
> 
> 
> 
> 
> 
> 
> 
>  

[jira] [Updated] (CAMEL-10320) Provide a LeaderPolicy to ease the implementation of master/slave route/context

2017-05-26 Thread Luca Burgazzoli (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-10320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luca Burgazzoli updated CAMEL-10320:

Description: 
I've been working on some master/slave RoutePolicy and I'm wondering
if we can have a proper LeaderPolicy with a standardized
implementation in Camel 3.0 so one has only to notify when a
leadership is taken

In addition it may be nice to have:
- a support for Leader election from the CmelContext so the routes are
started when the context become leader.
- an option to warm-up routes or to keep them stopped while not leader

Then we can also make it exposed in JMX so tooling are able to detect
which are current master and slaves, and whatnot.

Some possible DSL/EIP extensions:

{code:java}
from("...")
.routeId("myRoute")
.master() 
.group("my-group")
.consulConfiguration("http://consul-node:8500";)
.end()
. to(...)
{code}

{code:java}
camelContext.setDefaultClusteredRouteConfiguration(
ClusteredRouteConfiguration.builder()
.withAction(ClusteredRouteAction.SUSPEND)
.withHealtCheck(...)
.consulConfiguration("http://consul-node:8500";)
.build()
);
  
// lookup the cluster configuration from the registry   
from("clustered:file:/data")
.routeId("data-files")
.to(...)

// lookup the cluster configuration from the registry  
from("master:file:/share")
.routeId("shared-files")
.to(...)
{code}

{code:xml}















   
   





{code}


  was:
I've been working on some master/slave RoutePolicy and I'm wondering
if we can have a proper LeaderPolicy with a standardized
implementation in Camel 3.0 so one has only to notify when a
leadership is taken

In addition it may be nice to have:
- a support for Leader election from the CmelContext so the routes are
started when the context become leader.
- an option to warm-up routes or to keep them stopped while not leader

Then we can also make it exposed in JMX so tooling are able to detect
which are current master and slaves, and whatnot.

Some possible DSL/EIP extensions:

{code:java}
from("...")
.routeId("myRoute")
.master() 
.group("my-group")
.consulConfiguration("http://consul-node:8500";)
.end()
. to(...)
{code}

{code:java}
camelContext.setDefaultClusteredRouteConfiguration(
ClusteredRouteConfiguration.builder()
.withAction(ClusteredRouteAction.SUSPEND)
.withHealtCheck(...)
.consulConfiguration("http://consul-node:8500";)
.build()
);
  
// lookup the cluster configuration from the registry   
from("clustered:file:/data")
.routeId("data-files")
.to(...)

// lookup the cluster configuration from the registry  
from("master:file:/share")
.routeId("shared-files")
.to(...)
{code}

{code:xml}


  









{code}



> Provide a LeaderPolicy to ease the implementation of master/slave 
> route/context
> ---
>
> Key: CAMEL-10320
> URL: https://issues.apache.org/jira/browse/CAMEL-10320
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Luca Burgazzoli
>Assignee: Dhiraj Bokde
> Fix For: 2.20.0
>
>
> I've been working on some master/slave RoutePolicy and I'm wondering
> if we can have a proper LeaderPolicy with a standardized
> implementation in Camel 3.0 so one has only to notify when a
> leadership is taken
> In addition it may be nice to have:
> - a support for Leader election from the CmelContext so the routes are
> started when the context become leader.
> - an option to warm-up routes or to keep them stopped while not leader
> Then we can also make it exposed in JMX so tooling are able to detect
> which are current master and slaves, and whatnot.
> Some possible DSL/EIP extensions:
> {code:java}
> from("...")
> .routeId("myRoute")
> .master() 
> .group("my-group")
> .consulConfiguration("http://consul-node:8500";)
> .end()
> . to(...)
> {code}
> {code:java}
> camelContext.setDefaultClusteredRouteConfiguration(
> ClusteredRouteConfiguration.builder()
> .withAction(ClusteredRouteAction.SUSPEND)
> .withHealtCheck(...)
> .consulConfiguration("http://consul-node:8500";)
> .build()
> );
>   
> // lookup the cluster configuration from the registry   
> from("clustered:file:/data")
> .routeId("data-files")
> .to(...)
> // lookup the cluster configuration from the registry  
> from("master:file:/share")
> .routeId("shared-files")
> .to(...)
> {code}
> {code:xml}
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>

[jira] [Updated] (CAMEL-10320) Provide a LeaderPolicy to ease the implementation of master/slave route/context

2017-05-26 Thread Luca Burgazzoli (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-10320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luca Burgazzoli updated CAMEL-10320:

Description: 
I've been working on some master/slave RoutePolicy and I'm wondering
if we can have a proper LeaderPolicy with a standardized
implementation in Camel 3.0 so one has only to notify when a
leadership is taken

In addition it may be nice to have:
- a support for Leader election from the CmelContext so the routes are
started when the context become leader.
- an option to warm-up routes or to keep them stopped while not leader

Then we can also make it exposed in JMX so tooling are able to detect
which are current master and slaves, and whatnot.

Some possible DSL/EIP extensions:

{code:java}
from("...")
.routeId("myRoute")
.master() 
.group("my-group")
.consulConfiguration("http://consul-node:8500";)
.end()
. to(...)
{code}

{code:java}
camelContext.setDefaultClusteredRouteConfiguration(
ClusteredRouteConfiguration.builder()
.withAction(ClusteredRouteAction.SUSPEND)
.withHealtCheck(...)
.consulConfiguration("http://consul-node:8500";)
.build()
);
  
// lookup the cluster configuration from the registry   
from("clustered:file:/data")
.routeId("data-files")
.to(...)

// lookup the cluster configuration from the registry  
from("master:file:/share")
.routeId("shared-files")
.to(...)
{code}

{code:xml}


  









{code}


  was:
I've been working on some master/slave RoutePolicy and I'm wondering
if we can have a proper LeaderPolicy with a standardized
implementation in Camel 3.0 so one has only to notify when a
leadership is taken

In addition it may be nice to have:
- a support for Leader election from the CmelContext so the routes are
started when the context become leader.
- an option to warm-up routes or to keep them stopped while not leader

Then we can also make it exposed in JMX so tooling are able to detect
which are current master and slaves, and whatnot.

Some possible DSL/EIP extensions:

{code:java}
from("...")
.routeId("myRoute")
.clustered() 
.group("my-group")
.consulConfiguration("http://consul-node:8500";)
.end()
. to(...)
{code}

{code:java}
camelContext.setDefaultClusteredRouteConfiguration(
ClusteredRouteConfiguration.builder()
.withAction(ClusteredRouteAction.SUSPEND)
.withHealtCheck(...)
.consulConfiguration("http://consul-node:8500";)
.build()
);
  
// lookup the cluster configuration from the registry   
from("clustered:file:/data")
.routeId("data.files")
.to(...)

// lookup the cluster configuration from the registry  
from("clustered:file:/share")
.routeId("shared-files")
.to(...)
{code}

If the camel context detects a route is subject to clustering it should 
delegate the start/stop to a "RouteController" instead of starting the standard 
startup code.


> Provide a LeaderPolicy to ease the implementation of master/slave 
> route/context
> ---
>
> Key: CAMEL-10320
> URL: https://issues.apache.org/jira/browse/CAMEL-10320
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Luca Burgazzoli
>Assignee: Dhiraj Bokde
> Fix For: 2.20.0
>
>
> I've been working on some master/slave RoutePolicy and I'm wondering
> if we can have a proper LeaderPolicy with a standardized
> implementation in Camel 3.0 so one has only to notify when a
> leadership is taken
> In addition it may be nice to have:
> - a support for Leader election from the CmelContext so the routes are
> started when the context become leader.
> - an option to warm-up routes or to keep them stopped while not leader
> Then we can also make it exposed in JMX so tooling are able to detect
> which are current master and slaves, and whatnot.
> Some possible DSL/EIP extensions:
> {code:java}
> from("...")
> .routeId("myRoute")
> .master() 
> .group("my-group")
> .consulConfiguration("http://consul-node:8500";)
> .end()
> . to(...)
> {code}
> {code:java}
> camelContext.setDefaultClusteredRouteConfiguration(
> ClusteredRouteConfiguration.builder()
> .withAction(ClusteredRouteAction.SUSPEND)
> .withHealtCheck(...)
> .consulConfiguration("http://consul-node:8500";)
> .build()
> );
>   
> // lookup the cluster configuration from the registry   
> from("clustered:file:/data")
> .routeId("data-files")
> .to(...)
> // lookup the cluster configuration from the registry  
> from("master:file:/share")
> .routeId("shared-files")
> .to(...)
> {code}
> {code:xml}
> 
> 
>   
> 
> 
> 

[jira] [Updated] (CAMEL-10320) Provide a LeaderPolicy to ease the implementation of master/slave route/context

2017-05-25 Thread Luca Burgazzoli (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-10320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luca Burgazzoli updated CAMEL-10320:

Description: 
I've been working on some master/slave RoutePolicy and I'm wondering
if we can have a proper LeaderPolicy with a standardized
implementation in Camel 3.0 so one has only to notify when a
leadership is taken

In addition it may be nice to have:
- a support for Leader election from the CmelContext so the routes are
started when the context become leader.
- an option to warm-up routes or to keep them stopped while not leader

Then we can also make it exposed in JMX so tooling are able to detect
which are current master and slaves, and whatnot.

Some possible DSL/EIP extensions:

{code:java}
from("...")
.routeId("myRoute")
.clustered() 
.group("my-group")
.consulConfiguration("http://consul-node:8500";)
.end()
. to(...)
{code}

{code:java}
camelContext.setDefaultClusteredRouteConfiguration(
ClusteredRouteConfiguration.builder()
.withAction(ClusteredRouteAction.SUSPEND)
.withHealtCheck(...)
.consulConfiguration("http://consul-node:8500";)
.build()
);
  
// lookup the cluster configuration from the registry   
from("clustered:file:/data")
.routeId("data.files")
.to(...)

// lookup the cluster configuration from the registry  
from("clustered:file:/share")
.routeId("shared-files")
.to(...)
{code}

If the camel context detects a route is subject to clustering it should 
delegate the start/stop to a "RouteController" instead of starting the standard 
startup code.

  was:
I've been working on some master/slave RoutePolicy and I'm wondering
if we can have a proper LeaderPolicy with a standardized
implementation in Camel 3.0 so one has only to notify when a
leadership is taken

In addition it may be nice to have:
- a support for Leader election from the CmelContext so the routes are
started when the context become leader.
- an option to warm-up routes or to keep them stopped while not leader

Then we can also make it exposed in JMX so tooling are able to detect
which are current master and slaves, and whatnot.

Some possible DSL/EIP extensions:

{code:java}
from("...")
.routeId("myRoute")
.clustered() 
.group("my-group")
.consulConfiguration("http://consul-node:8500";)
.end()
. to(...)
{code}

{code:java}
camelContext.setDefaultClusteredRouteConfiguration(
ClusteredRouteConfiguration.builder()
.withAction(ClusteredRouteAction.SUSPEND)
.withHealtCheck(...)
.consulConfiguration("http://consul-node:8500";)
.build()
);
  
// lookup the cluster configuration from the registry   
from("clustered:file:/data")
.routeId("data.files")
.to(...)

// lookup the cluster configuration from the registry  
from("clustered:file:/share")
.routeId("shared-files")
.to(...)
{code}


> Provide a LeaderPolicy to ease the implementation of master/slave 
> route/context
> ---
>
> Key: CAMEL-10320
> URL: https://issues.apache.org/jira/browse/CAMEL-10320
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Luca Burgazzoli
> Fix For: 2.20.0
>
>
> I've been working on some master/slave RoutePolicy and I'm wondering
> if we can have a proper LeaderPolicy with a standardized
> implementation in Camel 3.0 so one has only to notify when a
> leadership is taken
> In addition it may be nice to have:
> - a support for Leader election from the CmelContext so the routes are
> started when the context become leader.
> - an option to warm-up routes or to keep them stopped while not leader
> Then we can also make it exposed in JMX so tooling are able to detect
> which are current master and slaves, and whatnot.
> Some possible DSL/EIP extensions:
> {code:java}
> from("...")
> .routeId("myRoute")
> .clustered() 
> .group("my-group")
> .consulConfiguration("http://consul-node:8500";)
> .end()
> . to(...)
> {code}
> {code:java}
> camelContext.setDefaultClusteredRouteConfiguration(
> ClusteredRouteConfiguration.builder()
> .withAction(ClusteredRouteAction.SUSPEND)
> .withHealtCheck(...)
> .consulConfiguration("http://consul-node:8500";)
> .build()
> );
>   
> // lookup the cluster configuration from the registry   
> from("clustered:file:/data")
> .routeId("data.files")
> .to(...)
> // lookup the cluster configuration from the registry  
> from("clustered:file:/share")
> .routeId("shared-files")
> .to(...)
> {code}
> If the camel context detects a route is subject to clustering it should 
> delegate the start/stop to a "RouteController" instead of starting the 
> standard startup code.



--
This messa

[jira] [Updated] (CAMEL-10320) Provide a LeaderPolicy to ease the implementation of master/slave route/context

2017-05-25 Thread Luca Burgazzoli (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-10320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luca Burgazzoli updated CAMEL-10320:

Description: 
I've been working on some master/slave RoutePolicy and I'm wondering
if we can have a proper LeaderPolicy with a standardized
implementation in Camel 3.0 so one has only to notify when a
leadership is taken

In addition it may be nice to have:
- a support for Leader election from the CmelContext so the routes are
started when the context become leader.
- an option to warm-up routes or to keep them stopped while not leader

Then we can also make it exposed in JMX so tooling are able to detect
which are current master and slaves, and whatnot.

Some possible DSL/EIP extensions:

{code:java}
from("...")
.routeId("myRoute")
.clustered() 
.group("my-group")
.consulConfiguration("http://consul-node:8500";)
.end()
. to(...)
{code}

{code:java}
camelContext.setDefaultClusteredRouteConfiguration(
ClusteredRouteConfiguration.builder()
.withAction(ClusteredRouteAction.SUSPEND)
.withHealtCheck(...)
.consulConfiguration("http://consul-node:8500";)
.build()
);
  
// lookup the cluster configuration from the registry   
from("clustered:file:/data")
.routeId("data.files")
.to(...)

// lookup the cluster configuration from the registry  
from("clustered:file:/share")
.routeId("shared-files")
.to(...)
{code}

  was:
I've been working on some master/slave RoutePolicy and I'm wondering
if we can have a proper LeaderPolicy with a standardized
implementation in Camel 3.0 so one has only to notify when a
leadership is taken

In addition it may be nice to have:
- a support for Leader election from the CmelContext so the routes are
started when the context become leader.
- an option to warm-up routes or to keep them stopped while not leader

Then we can also make it exposed in JMX so tooling are able to detect
which are current master and slaves, and whatnot.


> Provide a LeaderPolicy to ease the implementation of master/slave 
> route/context
> ---
>
> Key: CAMEL-10320
> URL: https://issues.apache.org/jira/browse/CAMEL-10320
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Luca Burgazzoli
> Fix For: 2.20.0
>
>
> I've been working on some master/slave RoutePolicy and I'm wondering
> if we can have a proper LeaderPolicy with a standardized
> implementation in Camel 3.0 so one has only to notify when a
> leadership is taken
> In addition it may be nice to have:
> - a support for Leader election from the CmelContext so the routes are
> started when the context become leader.
> - an option to warm-up routes or to keep them stopped while not leader
> Then we can also make it exposed in JMX so tooling are able to detect
> which are current master and slaves, and whatnot.
> Some possible DSL/EIP extensions:
> {code:java}
> from("...")
> .routeId("myRoute")
> .clustered() 
> .group("my-group")
> .consulConfiguration("http://consul-node:8500";)
> .end()
> . to(...)
> {code}
> {code:java}
> camelContext.setDefaultClusteredRouteConfiguration(
> ClusteredRouteConfiguration.builder()
> .withAction(ClusteredRouteAction.SUSPEND)
> .withHealtCheck(...)
> .consulConfiguration("http://consul-node:8500";)
> .build()
> );
>   
> // lookup the cluster configuration from the registry   
> from("clustered:file:/data")
> .routeId("data.files")
> .to(...)
> // lookup the cluster configuration from the registry  
> from("clustered:file:/share")
> .routeId("shared-files")
> .to(...)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CAMEL-10320) Provide a LeaderPolicy to ease the implementation of master/slave route/context

2017-04-05 Thread Luca Burgazzoli (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-10320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luca Burgazzoli updated CAMEL-10320:

Fix Version/s: (was: 2.19.0)
   2.20.0

> Provide a LeaderPolicy to ease the implementation of master/slave 
> route/context
> ---
>
> Key: CAMEL-10320
> URL: https://issues.apache.org/jira/browse/CAMEL-10320
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Luca Burgazzoli
> Fix For: 2.20.0
>
>
> I've been working on some master/slave RoutePolicy and I'm wondering
> if we can have a proper LeaderPolicy with a standardized
> implementation in Camel 3.0 so one has only to notify when a
> leadership is taken
> In addition it may be nice to have:
> - a support for Leader election from the CmelContext so the routes are
> started when the context become leader.
> - an option to warm-up routes or to keep them stopped while not leader
> Then we can also make it exposed in JMX so tooling are able to detect
> which are current master and slaves, and whatnot.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CAMEL-10320) Provide a LeaderPolicy to ease the implementation of master/slave route/context

2017-02-06 Thread Luca Burgazzoli (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-10320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luca Burgazzoli updated CAMEL-10320:

Fix Version/s: (was: 3.0.0)
   2.19.0

> Provide a LeaderPolicy to ease the implementation of master/slave 
> route/context
> ---
>
> Key: CAMEL-10320
> URL: https://issues.apache.org/jira/browse/CAMEL-10320
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Luca Burgazzoli
> Fix For: 2.19.0
>
>
> I've been working on some master/slave RoutePolicy and I'm wondering
> if we can have a proper LeaderPolicy with a standardized
> implementation in Camel 3.0 so one has only to notify when a
> leadership is taken
> In addition it may be nice to have:
> - a support for Leader election from the CmelContext so the routes are
> started when the context become leader.
> - an option to warm-up routes or to keep them stopped while not leader
> Then we can also make it exposed in JMX so tooling are able to detect
> which are current master and slaves, and whatnot.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CAMEL-10320) Provide a LeaderPolicy to ease the implementation of master/slave route/context

2016-09-15 Thread Luca Burgazzoli (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-10320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luca Burgazzoli updated CAMEL-10320:

Description: 
I've been working on some master/slave RoutePolicy and I'm wondering
if we can have a proper LeaderPolicy with a standardized
implementation in Camel 3.0 so one has only to notify when a
leadership is taken

In addition it may be nice to have:
- a support for Leader election from the CmelContext so the routes are
started when the context become leader.
- an option to warm-up routes or to keep them stopped while not leader

Then we can also make it exposed in JMX so tooling are able to detect
which are current master and slaves, and whatnot.

  was:
I've been working on some master/slave RoutePolicy and I'm wondering
if we can have a proper LeaderPolicy with a standardized
implementation in Camel 3.0 so one has only to notify when a
leadership is taken

In addition it may be nice to have:
- a support for Leader election from the CmelContext so the routes are
started when the context become leader.
- an option to warm-up routes or to keep them stopped while not leader


Make sense ?


> Provide a LeaderPolicy to ease the implementation of master/slave 
> route/context
> ---
>
> Key: CAMEL-10320
> URL: https://issues.apache.org/jira/browse/CAMEL-10320
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Luca Burgazzoli
> Fix For: 3.0.0
>
>
> I've been working on some master/slave RoutePolicy and I'm wondering
> if we can have a proper LeaderPolicy with a standardized
> implementation in Camel 3.0 so one has only to notify when a
> leadership is taken
> In addition it may be nice to have:
> - a support for Leader election from the CmelContext so the routes are
> started when the context become leader.
> - an option to warm-up routes or to keep them stopped while not leader
> Then we can also make it exposed in JMX so tooling are able to detect
> which are current master and slaves, and whatnot.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)