I am a bit confused, Tornado is web server like a apache http server, or a framework like django, or both?
Thanks
Tornado is a server and framework if you want to make some apps with it.
I use Tornado to serve my django apps, with help of nginx (load balancer to run more than 1 Tornado instance) and supervisor to make those tornados live if my apps fail.
I use WebFaction and the performance of my apps got better with Tornado instead of serving them with apache.
Tornado is both a non-blocking web server and a lightweight web framework.
It can act as web server to other web frameworks such as Django through the use of tornado.wsgi, but also possesses a core web framework with functionality such as templating (tornado.template), SQL database integration (tornado.database), and OpenID authorization (tornado.auth). Many developers use it for its superior performance as a non-blocking web server in conjunction with other wsgi capable frameworks, but it's much more than just a web server.
Tornado Documentation
Tornado is asynchronous (+ single threaded) and event-driven. Apache http and django are not.
The "Django vs Tornado" is an ongoing flame war
IMHO I would start with Tornado (or Deft if you like the JVM).
Disclaimer: I'm a Deft committer.
Related
I'm in the process of researching possible ways to deploy web site along with a web application. I'm using Python/Django with gunicorn as the webserver and AngularJS (front-end) for the web application, which will be deployed on some PaaS like Heroku.
The web site (mainly used for marketing purposes), what are some recommending ways to deploy this site along with the web application? My concern is that users hitting the site will slow down performance for users of the web application. If I'm using Django for the web application backend, is it ok to use Django for the web site and deploy it...say on a different port/server? Perhaps use nginx to serve just static content for the site? What are some best practices out there on solving this? Many thanks
If your "web site" is all static files, could you load it all up into a single folder and have it served directly by nginx?
Alternatively, you could look at something like CloudFlare
My friend has developed a recommend system in C++, now we want to make a web information system based on his work. As we both do not have no Web technology knowledge, I have some questions:
If we want to develop a web site which based on this recommend system, we should implement the recommend system in the application server and make a web server that could return the pages, right?
Then what web server we should use or use what technique to develop a web server to call the function in the recommend system? How the web server communicates with the application server?
Some web frameworks, such as Django, does it act as web server or application server or it is both?
As we have so much basic questions, do you have some books or website to recommend?
You can think of your C++ app as a service that your Django app can execute to return values to your users. You could easily execute any application on the same server as Django and capture the response or you could create a thin HTTP API and put your C++ app on its own server and call it by HTTP from your Django app to make requests for your users.
https://www.djangoproject.com/ is a great place to start.
I have a CakePHP based web application deployed on Apache (LAMP stack). Now I am doing a Web Services API using bottlePy that will expose services to be consumed by an Android application. The thing is both the applications will be working of the same MySql DB tables and reading/writing to the same. The reason its been done this way is because the CakaPHP based application is already available and was done a while back. Now we have a need to do an Android app and hence need to expose a Web Services API and since I am more comfortable with Python I would rather use. But before I dive deep in this direction I wanted to get answer to the following:
Can I have both the CakePHP web app and BottlePy based Web Services API served from the same Apache server? If not what will be an alternate?
Will two different apps accessing the same MySQL DB cause any issues in terms of locks, data integrity etc?
Anything else I need to be careful about?
So, I have implemented it anyways and it has been working great. I guess that answers the question, that yes it can be done.
I have both cakephp and bottlepy app served from same apache server.
I havent seen any issues and data gets written from both cakephp web app and bottlepy web api connected to android app.
Getting cakephp and bottlepy served from same apache server was a bit tricky but I got it working. I am not a webserver expert so dont know if the problems I faced were trivial or I solved something difficult. In either case it is working. If you face similar issues, let me know and I will post a detailed reply on how I did the setup.
Hi Java Agent DEvelopment Framework developers! I want to use WAMP with JADE, can I do that, simple because I am well averse with WAMP. Or does JADE recommend only Java related technologies to be interfaced? Thanks for the answer.
I think you want to use WAMP for developing some front-end logic. You can do this but you probably have to develop JADE as a web service which requires it to be deployed to a web container like tomcat. and communicate with JADE agents via SOAP messages or use tomcat connectors to integrate apache web server with tomcat and service the requests using Java Servlets. Either way you need some Java web container.
Since Django is a web development framework and Drupal is a CMS.
Is it possible to use them both together instead of a preferred database on Django like apache?
Maybe that question isn't clear enough.
Is it possible to use Django and Drupal simultaneously on the server side to provide a better web development solution?
You can use Drupal and Django side-by-side on the same server for different portions of your web site, but they will be entirely separate systems. They cannot interact in any meaningful fashion (except possibly a Django app making web API calls to Drupal, if Drupal has a web API).
Django is a Python-based web development framework. Drupal is a CMS (and framework, through its module system) written in PHP. They really can't use each other.
Communication between Drupal and any other system is possible and very common, especially using their Services module, and by calling other SOAP (and other) web services.
You can, if you want, to make both Django and Drupal work on the same server, and to call "localhost" for the services you are using, both ways. For Drupal, it is irrelevant where the actual server sits.
If you have a certain Django application you want to integrate with Drupal just write down what it is, and accordingly you will be able to get more help...
Regards,
Shushu