Communication between Django applications hosted in different servers - django

I have a Django project hosted in a server and it wants to interact with another django application hosted in another server. How do I go about doing this?

It really depends on what exactly you want to communicate. But irrespective of specific technology, RESTful API is one of the best practices when it comes to communication between applications.
There are numerous apps developed to help RESTful implementation in Django. You can try RestifyDjango or Django REST framework

Related

Can Django be used to combine both webapp and moblie api?

I want to use django framework to write a web site with static/dynamic pages (I will not be using angular/react - i.e. SPA technology) but I also want the web app to serve as the backend for a mobile app.
What's the best practice here? Can Django alone be used for it?
Will I need to use Django REST framework?
If you could recommend some specific modules to keep the app as simple as possible and avoid DRY code. That'd be great.
Thanks.
You have the right pointers in your question already.
Use django-rest-framework to create a rest service, create your web app in django to consume that service, create a mobile app to consume the same rest service.
In general, once you have a rest service, you can build anything on top of it. Just consume the service from whichever platform you want to build for.
I hope that helps.

Could Web server and Application server be developed separately?

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.

Can I deploy CakePHP web application and BottlePy base WebServices API on same server?

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.

Communication between Ruby on Rails 3 Web application and C++ Desktop application

According to my requirement I need to provide a communication between a Desktop application developed on C++(QT Framework) and Web application developing on Rails 3.
The requirement is, User can able to upload/download files from Desktop application to Rails application. These files I need to save in live database.
For this requirement, I'm planning to develop an API(Possibly Web Service). First of all is it possible to complete this requirement through Web Services using SOAP/WSDL/REST.
Please let me know the different ways to achieve this.
Thanks,
Kalyan
Rails provides a really nice way of developing an API with it's supported REST protocol. This way you can easy develop a web front end while essentially completing the API at the same time, this way your desktop application can communicate via the API.
As long as you keep your code DRY(Don't Repeat Yourself), your API can co-exist within your same web project. This way you don't have two separate code projects to maintain. This will help with consistency.

Django and Drupal

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