metron-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otto Fowler <>
Subject Re: [DISCUSS] SIDELOADING PARSERS: Packaging and Loading and Extensions []
Date Fri, 10 Mar 2017 20:39:46 GMT
"The Apache NiFi NAR ‘system’ allows for the packaging and loading of java
resources with classloader isolation.
Although technically it is the Service Provider api that makes the
‘plugins’  part of the system, you can view them
together, and thus look at the NAR features as a system to create, package,
load, and execute plugins in a java system
while maintaining classloader isolation and dependency separation.

While the NiFi problem case ( many plugins possibly executing in the same
vm ) is not universal, the functionality provided
by NAR is commonly needed, and is indeed functionality that I am currently
looking at implementing in the Apache Metron project.”

This is how I put it to Joe.

I think what you are proposing would work.  I think what I have done up
until now will pretty much work.  What I have been thinking about and
is the difference between getting ‘something that works’, and maybe
something better.

So if you look at nar there is the ‘packaging’ part, and the class loading
We are already doing almost the same thing with the assembly of the
.tag.gz.  The Nar is a next step to this which adds more metadata and the
dependency repo.
More of a refinement than a change.

As far as class loading, the Nar is a more refined system for deploying and
consuming jars and dependencies, and setting up classloader instances.  It
has more
functionality than we need at the moment in storm, but in other services
where multiple parsers or plugin types may need to be loaded, it would make
more sense.
Rest may be that case.  Stellar may be that case too, if anyone ever writes
a stellar function with different dependencies than the platform.

On March 10, 2017 at 14:32:00, Casey Stella ( wrote:

So, my question is whether we really need nar here. We have a classloading
mechanism that will allow us to deploy just the parser logic just added
into master for stellar, should we be considering another one?

I would understand using nar if we needed to have multiple nars around that
needed isolation from one another, but in the parser topology, we get that
isolation naturally. It seems to me that, at least for a MVP, we should
use the existing classloader that we just added. That being said, I might
be missing something, so let me know your thoughts.


On Fri, Mar 10, 2017 at 2:18 PM, Matt Foley <> wrote:

> I like the approach. I think Nar constitutes a production-quality
> existing solution meeting highly similar needs to Metron’s.
> Just a ‘btw’ regarding Joe’s input that I transmitted:
> - Joe made clear that he was only giving his personal opinion, since of
> course no individual can speak for the community.
> - Joe also felt that if Metron succeeded in re-using the Nar system
> without having to change it too much, that that would be a good
> argument for later proposing that it become a separate child project.
> - Whereas if we or they tried to break it out as a separate project now,
> we would have to do all the community-building work around it, as well as
> the technical work of adapting it for a different environment from NiFi.
> - So he recommended to copy and appropriate it for now.
> - Which I also agree with.
> Thanks,
> --Matt
> On 3/10/17, 7:42 AM, "Otto Fowler" <> wrote:
> As previously discussed here, I have been working on side loading of
> parsers. The goals of this work are:
> * Make it possible of developers to create, maintain and deploy parsers
> outside of the Metron code tree and not have to fork
> * Create maven archetype support for developers of parsers
> * Introduce a parser ‘lifecycle’ to support multiple instances and
> configurations, states of being installed, under configuration, and
> deployed
> etc.
> I would like to have some discussion based on where I am after rebasing
> onto METRON-671 which revamps deployment to be totally ambari based.
> Packaging and Loading and Extensions
> I have mentioned previously, and we have discussed on list wanting to
> move
> away from uber’s for somethings to using custom class loaders ( from
> hdfs
> possibly ).
> We also want the REST api to work with 3rd parter parsers
> We would like to reduce the size of having so many ubers in the build
> We would benefit from tooling around this, maven building, archetypes
> etc
> We could benefit from explicitly required metadata and information
> We want a generic extension methodology
> We want to be able to upgrade parsers/extensions in some way
> I have also mentioned that this would look or work a lot like NiFi’s
> system.
> Now I’m going to put it differently:
> I propose that we adapt and introduce the NAR system for Metron
> Extensions,
> starting with parsers, with that adoption
> extended to allow for VFS Classloading from hdfs as we are now doing
> with
> Stellar. And that this is done as a follow on to
> the base mvp side loading work.
> This provides a solution to the above issues, and would afford us a
> great
> amount of flexibility going forward.
> Projects+for+Extensions
> The functional concept would be:
> * the archetype and all the parser projects produce nars ( either
> including the configuration and patterns or splitting between runtime
> ( nar
> ) and static ( tar.gz )
> * these are not shaded, but have a ‘repo’ of dependencies for
> non-metron
> jars. Metron jars are provided and loaded through the classloading.
> * possibly the adaption of the Service Provider api/pattern for
> parsers and
> discovery
> * the nar repository/working directory structures would be
> implemented in
> /usr/metron/version/telemetry ( although discussion on having multiple
> extension directories vs. one extension dir are welcome )
> * the storm process only references metron-parsers-common
> * the parser bolt uses the nar class loading system to load the parser
> * the rest api uses the nar class loading system to load the parser
> * etc etc
> * a new version of a parser is deployed as a nar, when the service
> restarts, the new nar is unpacked and replaces the old version in the
> working system ( we could change the restart requirement ……)
> The nar system gives us something that is:
> * production quality
> * small enough to grok and extend as opposed to some other solutions
> * comes with a highly accessible sister project
> * maven plugin tooling to build
> * reference archetype for packaging
> and other things
> There are a few ways we could approach using Nar:
> 1. ‘fork’ and appropriate the components and ‘metronize’ them
> * the maven plugin
> * the nar-utils package
> 2. Ask for and participate in an effort to pull NAR out into it’s own
> project,
> * make it more generic
> * usable by more than one project
> * goal to replace NiFi’s use of nar too
> 3. Create our own generic version as a fork
> * use it in metron
> * submit to NiFi as a proposal
> MattF was nice enough to float this by Joe Witt, who is at Hortonworks
> and
> is the NiFi lead.
> He agrees with the idea of making nar usable for multiple projects, but
> does not see them
> having time to do it soon, and suggests we go with 1.
> I will openly admit to ignorance about apache subproject or other
> things
> that might come into play here.
> I think that 1 is the best option in the near term, and if we can
> socialize
> and see that there is a demand we can move forward with 2/3 down the
> road.
> ??
> Discuss
> Profit

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