Github user nickwallen commented on the issue:

    https://github.com/apache/metron/pull/740
  
    This is a replay of an offline conversation....  
    
    > Sorry for the confusion on my part @ottobackwards . I know much of the 
innards of Stellar is only documented in the code (if that), so let's level set 
on that.  
    > 
    > A "StellarExecutor" is responsible for running Stellar code for the REPL. 
 The executor can maintain additional "Context" that provides resources for the 
Stellar code that it is executing.  Each of these resources in the "Context" 
are called "Capabilities".   For example, a Zookeeper Client is available as a 
Capability called "ZOOKEEPER_CLIENT".  There is also the "GLOBAL_CONFIG" 
capability that exposes Metron's global configuration to Stellar code.
    > 
    > These capabilities, like the GLOBAL_CONFIG, are exposed to Stellar code 
in the same way when running either in the REPL or in a topology.  A Stellar 
function can be written that fails if the GLOBAL_CONFIG is not available.  It 
can also be written to use acceptable defaults, if a GLOBAL_CONFIG does not 
exist.
    > 
    > Previously the only way to create the GLOBAL_CONFIG in the REPL, was to 
have a Zookeeper service running with the Metron config deployed and then 
launch the REPL with `bin/stellar -z node1:2181".  Without doing that there was 
no GLOBAL_CONFIG.  Any function that was written to expect a GLOBAL_CONFIG, was 
not usable in the REPL, unless you launched and configured a Zk instance.
    > 
    > This PR provides the ability to...
    > (1) Create a GLOBAL_CONFIG manually in the REPL without the need for Zk 
and 
    > (2) Modify a GLOBAL_CONFIG manually within a single session, without 
modifying Zk.
    > 
    > There really is no such thing as an "incompletely formed" GLOBAL_CONFIG.  
The GLOBAL_CONFIG is just a key/value store.  It contains whatever it contains. 
 But if there is a missing value in the GLOBAL_CONFIG that your function needs, 
then this change only makes it far simpler to add that missing value to the 
GLOBAL_CONFIG. 
    > 
    > And this is something you would need per your PR #690.  If you expect to 
run the REPL disconnected from a Metron cluster, then you need a way to create 
a GLOBAL_CONFIG without a Zk instance.


---

Reply via email to