Thanks for the support folks.  I've started working on this in a separate
branch.
It looks like a lot will change in the code but actually the simplification
will make it worth it.

We'll have only a few simple levels of locality for variables left when
done:
- the executing party : hop-run, hop-gui, hop-server
- A workflow: actions share the same variables
- A pipeline: transforms share the same variables

Passing IVariables into the metadata was convenient but ultimately a crutch
which required us to continuously synchronize variables all over the place.
This becomes particularly apparent when you change a variable in an
environment and all of a sudden you need to change the metadata in 30
pipelines and workflows in Hop GUI.

What this also brings to light is the incredible value of integration
tests.  Correct passing of variables and parameters really is something
that makes Java unit tests nightmare-ish.
Thank you Hans for starting the work on these integration tests.  They'll
be of incredible value to test this work when it's done.

Cheers,
Matt


On Sun, Dec 6, 2020 at 11:06 AM Bart Maertens <[email protected]> wrote:

> +1
>
>
>
> On Sun, Dec 6, 2020 at 10:00 AM Nicolas ADMENT <[email protected]> wrote:
>
> > Hello,
> >
> > +1
> >
> > I think this is the best time to make this change and simplify APIs.
> >
> > Regards,
> >
> >
> > Le mar. 24 nov. 2020 à 09:59, Matt Casters <[email protected]
> > .invalid>
> > a écrit :
> >
> > > Dear friends,
> > >
> > > I've come across an architectural thing I don't like in the Hop
> codebase.
> > > Yes, I know, one more of those...
> > >
> > > Conceptually the thing I've always chased after was the separation of
> the
> > > metadata (model), the way we interact with it (viewer) and the
> execution
> > > engines that work with the metadata (controller).  On the whole this
> > works
> > > fine and we achieve that goal.
> > > Where things become a bit murky is when we apply variables and
> parameter
> > > values to metadata.
> > > It's a very convenient thing to do since you can just ask a piece of
> > > metadata to resolve a variable expression and change for example
> > > "${HOSTNAME}" into something like "localhost".
> > > However, it forces anyone using the Hop API to create cloned copies of
> > all
> > > the metadata because it now has a state and it's no longer safe to
> > > re-use by other code pieces.
> > >
> > > I realize that a change like this is pretty big but I do think it would
> > > make the code and the API cleaner with an easier time fixing bugs and
> > > adding features as a bonus.
> > > The changes required are pretty much passing in IVariables in a lot of
> > > places.  Some instability and a lot of testing would be required.
> > >
> > > On the one hand I feel like it's longer term goal and on the other
> hand I
> > > think now's the right time to do it.
> > >
> > > Let me know what you think!
> > >
> > > Cheers,
> > > Matt
> > > --
> > > Neo4j Chief Solutions Architect
> > > *✉   *[email protected]
> > > ☎  +32486972937
> > >
> >
>


-- 
Neo4j Chief Solutions Architect
*✉   *[email protected]
☎  +32486972937

Reply via email to