-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make RocketsPlugin and DeflectPlugin separate libraries #524
Conversation
tribal-tec
commented
Aug 17, 2018
•
edited
Loading
edited
- RocketsPlugin is loaded when --http-server is specified
- DeflectPlugin is loaded when --stream-host or DEFLECT_HOST env is specified
brayns/Brayns.cpp
Outdated
// Deflect plugin is a built-in plugin as it still needs access | ||
// to parts of the engine which are not yet exposed in the | ||
// PluginAPI. | ||
if (pluginName == "DeflectPlugin") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not pluginName == "deflect" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libdeflect.so is a different library, not the brayns plugin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And it has to be the library name..? It's just that it's not super intuitive to write "--plugin DeflectPlugin" with all the camel case on the command line; it also doesn't match with the --http-server. I think it would be nice to have an easy shortcut like --streaming or equivalent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For 'normal' plugins it's always the library name. Considering that, only the RocketsPlugin 'misbehaves', but this is almost a core feature rather than a real plugin. The --streaming would not decouple anything from core vs plugins, hence the deflect part shouldn't be a plugin in the first place. As one of the next steps, the DeflectPlugin should be a real plugin that is no longer linked to core, but loaded at runtime when specified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the behavior now: DeflectPlugin is loaded when --stream-host or DEFLECT_HOST env is specified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed offline, sounds good and does not break compatibility with existing launch presets
lgtm |
f3e2421
to
0e836e8
Compare
I think we should throw an exception if you do not have networking enabled but still provide a --http-server command line argument. |
* RocketsPlugin is loaded when --http-server is specified * DeflectPlugin is loaded when --stream-host or DEFLECT_HOST env is specified
0e836e8
to
b84426f
Compare
lgtm |