metron-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nickwallen <>
Subject [GitHub] metron issue #1288: METRON-1916 Stellar Classpath Function Resolver Should H...
Date Mon, 03 Dec 2018 14:29:47 GMT
Github user nickwallen commented on the issue:
    > In my mind we don't have a current state where Stellar is running but not all the
functions in the class path are loaded. 
    The same thing would happen today if an `Exception` is thrown in any of the functions
being loaded.  If an Exception is thrown, instead of N functions ready-to-rock, we would have
N-1 functions.  This just expands that behavior to `ClassNotFoundException` which gets thrown
when there is a missing dependency..
    > Before we would have crashed starting up. Now we will run and crash get an error
    I don't see it that way.  Let's look at both scenarios.
    * If I am NOT using the REST function, then things just work as they should.  Yay!   I
don't want to worry about the missing dependency for a function that I have no knowledge about.
    * If I am using the REST function, an exception would still be thrown when the function
definition could not be found.  So the user still gets an exception when there is a problem.
    (Q) Any thoughts on alternative approaches?
    I prefer not to have to worry about classpath dependencies (like those required by the
REST function) that I am not using.  In this example, I was only trying to use the `STATS_*`
functions, but it was the REST function that blew things up for me.  It is difficult for a
user to track this down, because they have no knowledge of the REST function and its dependencies.
    (Alternative 1) An alternative approach would be to be more selective about what functions
we add to `stellar-common`.  Anything added to `stellar-common` forces a required dependency
on all Stellar users.  If the REST function had been a separate project, then a user could
choose to use or not use that projects and not be burdened by the additional dependency
    (Alternative 2) Could the `stellar.function.resolver.includes` and `stellar.function.resolver.excludes`
be enhanced to allow users to exclude functions they don't want to load?


View raw message