I am creating a webservice in Python and I have a question. I want to separate the user login user data. For this I am creating two different Python programs.
For example:
login.py -> localhost: 8080
userData.py -> localhost: 8081
My question is: how I can run these two programs on the same server? Is there a Python application server that is easy to use?
Thank you very much!
If the webserver is embedded in the application, you may want to use some “watchdog” application to start/stop/restart.
Ubuntu uses upstart.
I like to use supervisord for this as well.
If the application supports some webserver integration protocol like FCGI or WSGI (python’s standard), you may want to deploy it using a webserver. I’ve used apache mod_wsgi for a long time, lately I tend to use nginx+uwsgi. Apache is a fine webserver, but nginx+wsgi scale better.
[update]
First you should follow the advice on your framework documentation about deployment (bottle is not verbose about this subject, so I understand why you are asking).
B1 comment is right. You definitely want to place the database and application on distinct servers.
For maximum scalability with minimum fuzz you may want to look at some PasS provider like heroku, instructions here. This makes sense specially if you are a developer and not a system administrator.