general design question:
# development
h
general design question:
I want to make a class that handles HTTP POST requests of asynchronously-received workunits
I imagine this would look in very general terms something like
ZipkinReporter
but the
AsyncWorkunitHandler
instance in
run_console_rules
would need to have access to an instance of this class
and I'm not sure where there right place for this class to live is, or if it should be a
Subsystem
or not
ZipkinReporting
isn't a subsytem, but I'm told that may just be becuase it was written before the subsystem abstraction existed
a
a Subsystem can also be used as an inner Factory class for another class if it really doesn’t make sense to make something a Subsystem itself
see BinaryUtil.Factory (although that’s a bad example because it has to jump through some hoops for legacy reasons)
h
it looks like the entire
Reporting
construct is a subsystem, but I'm told that has a lot of v1 assumptions so maybe I don't want to try to shoehorn my work into it
a
i think making something a subsystem directly makes sense because the engine can easily use it as an optionable rule
subsystems can have dependencies which helps to decouple things and avoids tying to v1 assumptions
h
if I made this a Subsystem I could probably call
global_instance()
within
LegacyGraphSession.run_console_rules
?
a
yes!
h
cool, that makes sense
a
after options are parsed you can use global instance
h
so
run_console_rules
takes
options_bootstrapper
, so I'm not sure if options are parsed at that stage
a
i think that's fine
options_bootstrapper
is what you need to make an
optionable_rule()
, i think, so if
.global_instance()
doesn't work then perhaps adding an
optionable_rule()
might work
that might make no sense, i can also look over any code you might have