camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavel <pag...@gmail.com>
Subject Re: Idea for camel-scala DSL enhancement.
Date Tue, 21 Dec 2010 18:29:15 GMT
Cool; I guess then for this topic I'm missing a review from core committers
(Gert, are you around?), so that I could address feedback. And propose docs
then.

IMO the next logical and handy DSL enhancement would be introduction of
"every(period)", as alias for
"from(timer:someGeneratedName?period=equivalentInMs)"

Thanks,
Pavel

On Mon, Dec 20, 2010 at 8:20 AM, Claus Ibsen <claus.ibsen@gmail.com> wrote:

> Hi Pavel
>
> Great work. We would love help and contributions with the Scala DSL.
> I think we should ty to unify how you specify period / time as you suggest.
>
> And I dont mind the trade off, so please continue your work.
> I am sure you will even be able to find other spots in the Scala DSL
> which could be improved.
>
>
>
> On Fri, Dec 17, 2010 at 10:55 PM, Pavel <pagrus@gmail.com> wrote:
> > Folks,
> >
> > I have an idea for period DSL enhancement in camel-scala that I want to
> get
> > your feedback on.
> > And a proposed implementation in
> > https://issues.apache.org/jira/browse/CAMEL-3439
> >
> > Basically, there are 3 goals
> > * Support more time units - milliseconds to weeks
> > * Allow mixed units in period spec: 3 hours 20 minutes 30 seconds
> > * Internally remove/minimize duplication, so that units and relevant
> > transformations are defined in one place. Current codebase has these in
> >  - Period
> >  - RichInt
> >  - Frequency
> >  - SDelayDefinition (not sure if DSL uses these methods)
> >  - SThrottleDefinition (not sure if DSL uses these methods)
> >
> > My implementation has a price - it requires DSL to always use period spec
> in
> > parentheses, so that scala compiler knows exactly where its definition
> > starts and ends.
> > Practically, it means no changes to "delay", and extra "()" for
> "throttle",
> > e.g.
> > * throttle (3 per (1 second))
> > * throttle (3 per (1 minute 30 seconds))
> >
> > So, for you scala DSL users, does it sound like a useful enhancement and
> > reasonable tradeoff?
> >
> > Thanks,
> > Pavel
> >
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message