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

Docs: update REST API wsgi scripts #4488

Merged
merged 2 commits into from
Oct 20, 2020

Conversation

ltalirz
Copy link
Member

@ltalirz ltalirz commented Oct 20, 2020

fixes #4030

Open questions:

  • The old documentation mentioned the possibility of running multiple wsgi scripts using the same daemon process (one.conf). Does this actually work / has it ever been used in production?

@codecov
Copy link

codecov bot commented Oct 20, 2020

Codecov Report

Merging #4488 into develop will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4488      +/-   ##
===========================================
+ Coverage    79.31%   79.32%   +0.01%     
===========================================
  Files          475      475              
  Lines        34840    34840              
===========================================
+ Hits         27630    27632       +2     
+ Misses        7210     7208       -2     
Flag Coverage Δ
#django 73.17% <ø> (+0.01%) ⬆️
#sqlalchemy 72.38% <ø> (-<0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiida/restapi/api.py 76.09% <ø> (ø)
aiida/restapi/run_api.py 90.70% <ø> (ø)
aiida/transports/plugins/local.py 82.83% <0.00%> (+0.26%) ⬆️
aiida/engine/daemon/runner.py 82.76% <0.00%> (+3.45%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 191dc90...1cdc57c. Read the comment docs.

@ltalirz ltalirz force-pushed the issue_4030_wsgi_rest_api branch from aee8235 to 00d3bfa Compare October 20, 2020 14:25
@ltalirz ltalirz marked this pull request as ready for review October 20, 2020 14:25
The wsgi scripts for deploying the AiiDA REST in production were
outdated and are updated.
The how-to on deploying your own REST API server is significantly
streamlined and now includes the wsgi files as well as the examplary
apache virtualhost configuration.
@ltalirz ltalirz force-pushed the issue_4030_wsgi_rest_api branch from 00d3bfa to 5012235 Compare October 20, 2020 14:26
@ltalirz ltalirz requested a review from giovannipizzi October 20, 2020 14:26
Copy link
Member

@giovannipizzi giovannipizzi left a comment

Choose a reason for hiding this comment

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

Thanks!

@giovannipizzi
Copy link
Member

About your question:
The file was added by Fernando here:
8004ae7#diff-32fed9844368101395bbc050c45cf94e4ffbe93d96fd4bd648a3f5639e2cadc0

My guess is that he had actually tested it - but it's also true that it was a very old version of AiiDA so not even sure if this still works.
Do you think this might help us in Materials Cloud?
In this case it would be worth to investigate (or ask someone in the team to investigate)

@giovannipizzi giovannipizzi merged commit 09ac916 into aiidateam:develop Oct 20, 2020
@ltalirz
Copy link
Member Author

ltalirz commented Oct 20, 2020

Do you think this might help us in Materials Cloud?
In this case it would be worth to investigate (or ask someone in the team to investigate)

I didn't really know what the difference was, so I wasn't sure.

I've now had a quick look and I think it wouldn't really make a difference - even WSGI applications running inside the same process (group) will run in separate sub interpreters and thus lead to (practically) the same memory consumption.

There is, however, also the application group directive which lets wsgi applications run inside the same interpreter.
I don't think this would work with the current aiida (profile switching needed), but I've opened an issue to keep track of this possibility for the future #4494

@ltalirz ltalirz deleted the issue_4030_wsgi_rest_api branch December 14, 2020 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: update wsgi example for REST API
2 participants