ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavel Tupitsyn <ptupit...@apache.org>
Subject Re: Replacing NodeFilter functionality with label approach
Date Thu, 08 Aug 2019 12:39:13 GMT
I agree that attribute-based filtering is enough.

We should get rid of predicates in configuration as much as possible:
they introduce a lot of complexity for other platforms (.NET), among other
things mentioned above.

On Thu, Aug 8, 2019 at 2:04 PM Pavel Kovalenko <jokserfn@gmail.com> wrote:

> Ivan,
>
> > And there is also one idea (I am not fan of it but still). Can we use
> > some kind of scripting for nodes filtering? In that case node filter
> > is represented by script string, e.g. javascript.
>
> I guess it can lead to the same situation as in Java NodeFilter's. We can't
> control what happens in a filter in this case.
> We can consider regex as an option instead of just labels. It's still
> string and can be validated on correctness during node start.
> But we still don't have any real examples that require more flexibility
> than labels have.
>
> вт, 6 авг. 2019 г. в 14:46, Павлухин Иван <vololo100@gmail.com>:
>
> > Alexey,
> >
> > It seems that a problem has a solution with using 2 attributes or 2
> > labels. Is not it more clear than using custom code?
> >
> > Folks,
> >
> > > I don't think we should take "hard to implement" as an argument in this
> > discussion :)
> > Did not fully get the point. KISS principle is not true anymore? Or is
> > this discussion somehow special? I believe that every flexibility
> > handle should be critically justified. Would be great to justify
> > NodeFilter flexibility.
> >
> > > Filters based of hostname or ip address.
> > Is it a good idea to use IP address for node filtering? IP can be
> > changed for a node with persistence, does it mean that not relevant
> > data (according to a filter) should be cleared, does it work now?
> >
> > And there is also one idea (I am not fan of it but still). Can we use
> > some kind of scripting for nodes filtering? In that case node filter
> > is represented by script string, e.g. javascript.
> >
> > вт, 6 авг. 2019 г. в 12:22, Alexey Kukushkin <kukushkinalexey@gmail.com
> >:
> > >
> > > Pavel,
> > >
> > > Just a real example you asked for: we have a user attribute "ROLE_DC",
> > > which is a comma separated list like "wfe_a, as_a, db_a" (server role
> and
> > > data center designator) and we have node filters to deploy services and
> > > start caches on servers with specific role (like WFE) and sometimes
> > > specific role and DC (like WFE_A). The node filter splits the list and
> > uses
> > > a regular expression to match each segment.
> > >
> > > If you replace generic node filter with a user attribute filter then we
> > > still can achieve what we need  by creating 3 user attributes (ROLE_DC,
> > > ROLE and DC) but we lose flexibility since now adding a new data center
> > > requires updating all cache and service configurations. With regex
> > matching
> > > we do not need to update the configurations since we still match all
> the
> > > roles in the new DC.
> > >
> > > So we would have a solution with user attributes filter but I we lose
> > some
> > > flexibility.
> > >
> > > --
> > > Best regards,
> > > Alexey
> >
> >
> >
> > --
> > Best regards,
> > Ivan Pavlukhin
> >
>

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