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

Support selection of Python implementation on an individual component. #183

Open
rduplain opened this issue Sep 1, 2015 · 10 comments
Open
Milestone

Comments

@rduplain
Copy link
Contributor

rduplain commented Sep 1, 2015

Given the use of ShellBolt, we could consider having a given component in the streamparse-based topology use a Python implementation other than the one that streamparse is using. This could be useful e.g. to have one component running in PyPy while others are running Python 2 and Python 3 simultaneously.

@dan-blanchard
Copy link
Member

I like this idea, but it would require separate virtualenvs per component in the topology. We're going to end up having to do that anyway to avoid race conditions when we switch to using the topology hook to address #99, but it's worth noting.

@rduplain
Copy link
Contributor Author

rduplain commented Sep 2, 2015

Good point. The configuration for this could point to paths for the Python executables within the virtualenvs, as to decouple virtualenv management from the config itself.

path/to/virtualenv/bin/python

@dan-blanchard
Copy link
Member

I was thinking more along the lines of having the config specify the Python version needed and then have the topology hook install the appropriate version.

@rduplain
Copy link
Contributor Author

rduplain commented Sep 2, 2015

Ah. I'm thinking about something similar to virtualenv -p path/to/python.

@dan-blanchard
Copy link
Member

It seems a little simpler to the user to have them just specify the version and not make them care about where things actually end up on the servers (especially since they won't be SSHing into them anymore).

@rduplain
Copy link
Contributor Author

rduplain commented Sep 2, 2015

That makes sense. It'd be great to at least discuss in docs how to configure this. It might be as simple as making sure the $PATH is correct in finding Python executables by name. I generally prefer being able to configure this things, but as long as it's clear how to do it, I'm +1.

@dan-blanchard dan-blanchard added this to the v3.0 milestone Nov 4, 2015
@dan-blanchard
Copy link
Member

Since we now support component-specific config dictionaries via the Python Topology DSL, I think this could probably just be a special setting, maybe called streamparse.python.version. That way people could specify that in their storm.yaml (once we switch to using that instead of config.json) to have it work for all components, and it could be overridden for specific components.

@rduplain
Copy link
Contributor Author

I prefer streamparse.python.path or streamparse.python.executable to allow referencing any Python implementation. If we do want streamparse.python.version, then it would help to expose the mapping of versions to command-line invocation to allow full control.

@dan-blanchard
Copy link
Member

The idea is that each component would have its own separate conda environment (or maybe PEX as in #212), so there wouldn't be one path to refer to.

@rduplain
Copy link
Contributor Author

Sounds interesting. However we do it, I'm advocating that we support "Bring Your Own Python." If we do streamparse.python.version, a user will look for a way to extend the mapping of version identifiers to Python implementations (in whatever way makes sense to the configuration of streamparse).

@dan-blanchard dan-blanchard modified the milestones: v3.0, v3.1 Jul 27, 2016
@dan-blanchard dan-blanchard modified the milestones: v3.1, v3.2 Sep 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants