-
Notifications
You must be signed in to change notification settings - Fork 2
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
Remove node-calls-python #55
Comments
Another issue coming up is that the python modules have to be DESIGNED to be long lived. You have to think very carefully about what gets instantiated where. Right now the logger has to be created inside main and given a unique id. Module-scoped loggers will forever log to the wrong file. And the same with any clients, you need to think about when it gets instantiated, and be sure you're not accidentally using the wrong client. This is fairly hard engineering stuff. I'd actually PREFER that each python gets loaded, run and destroyed on every call - it's so much safer. I suppose we could keep node-calls-python in always-reload mode, but in local dev that feels a little bit unstable (the server keeps dying and I haven't yet diagnosed why), but I also hope that some of the other libraries will make getting the stdout easier. |
Sadly,
node-calls-python
isn't going to be sustainable fit for this project. It's a real shame.The two issue are:
Admittedly questions are open about concurrency, but at the very least it gives us problems with logging.
The problem is this:
node-calls-python
creates a single thread (so far as I understand it) in which all python executesPossible solutions:
node-calls-python
for each job. But what's the point? We may as well just dochild_process.exec(0
Basically I think that, for now at least, it's going to be just as easy to do
child_process.exec
and create a new python context each time. At this point I don;'t even care if that's a little slow in production - but I don't even have a reading on HOW slow.TODO:
The text was updated successfully, but these errors were encountered: