Skip to content
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

Merged
merged 1 commit into from
Aug 21, 2018

Conversation

tribal-tec
Copy link
Contributor

@tribal-tec tribal-tec commented Aug 17, 2018

  • RocketsPlugin is loaded when --http-server is specified
  • DeflectPlugin is loaded when --stream-host or DEFLECT_HOST env is specified

@tribal-tec tribal-tec requested a review from karjonas August 17, 2018 11:50
// 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")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not pluginName == "deflect" ?

Copy link
Contributor Author

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

Copy link

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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

Copy link

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

@karjonas
Copy link
Contributor

lgtm

@karjonas
Copy link
Contributor

I think we should throw an exception if you do not have networking enabled but still provide a --http-server command line argument.

@favreau
Copy link
Member

favreau commented Aug 20, 2018

@karjonas 👍

* RocketsPlugin is loaded when --http-server is specified
* DeflectPlugin is loaded when --stream-host or DEFLECT_HOST env is specified
@tribal-tec
Copy link
Contributor Author

tribal-tec commented Aug 21, 2018

@karjonas
Copy link
Contributor

lgtm

@tribal-tec tribal-tec merged commit 247546b into BlueBrain:master Aug 21, 2018
@tribal-tec tribal-tec deleted the plugin_refactor branch August 21, 2018 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants