Implementing a video call interface in Django - django

Hey there im trying to implement a video call interface in my django application but unable to find docs .I found twilio but the support was for javascript and webrtc for nodejs.
Are there any third party libs that i can integrate in django app

You can use a third party service for this. Or you can use WebRTC. There are some nodejs packages which can help you do this. I like "EasyRTC" for that.
Or if you want to use Python, you can use Twisted. Here's a tutorial (found on Google, not tested by myself - https://ferretfarmer.net/2013/09/05/tutorial-real-time-chat-with-django-twisted-and-websockets-part-1/)
In essence, Django doesn't handle the video streaming/chat part. You can use Django for authentication and serving the required html and other stuff. But the video chat needs to depend on other services
Do like it and accept the answer if you are satisfied Thanks!

Related

Django WebRTC TURN/STUN/ICE Server

So I have a basic question about WebRTC with Python Django.
Maybe I start at the beginning:
So is it possible that Python Django can serve as a Server for WebRTC? I think in generell it shouldn't be that hard, because how I saw the WebRTC client only needs a Websocket connection. I hope anybody can help me with that. Btw. I use Django Channels, so I think it is possible to build this connection, but how? :)
I would guess they're not recommending it above because it gets complicated very quickly implementing WebRTC video calls on your own with cross-browser support (Safari, especially). Using existing video APIs that have done that work for you can be a great option for a lot of companies to avoid all the edge cases that affect video quality. Daily, Agora, Twilio are all video API options that can handle this work for you.
It's not impossible but I do not recommend!
Instead, there are some WebRTC media servers like Jitsi, AntMedia and Janus. I used the last one on one of our project with Django.
Checkout microservices achitecture and find a way to combine your project with Django (for Authentication, Authorization and other processes) + WebRTC Media Server + Frontend and/or Mobile App. May Frontend could be in same code base with Django, up to you.

How can I implement video chat in my website using Django?

I want to develop a website in which users can have video chat and they can connect to other user anonymously without had been added by the other person as friend. I also want that all the active users list is displayed on the website. So somebody please suggest me how can I implement it on django?
You can use a third party service for this. Or you can use WebRTC. There are some nodejs packages which can help you do this. I like "EasyRTC" for that.
Or if you want to use Python, you can use Twisted. Here's a tutorial (found on Google, not tested by myself - https://ferretfarmer.net/2013/09/05/tutorial-real-time-chat-with-django-twisted-and-websockets-part-1/)
In essence, Django doesn't handle the video streaming/chat part. You can use Django for authentication and serving the required html and other stuff. But the video chat needs to depend on other services.
If you are looking to create a video calling and chat application using django, django_channels, you can refer to this Github Repository .
It also tells you how to deploy your app to google app engine flex with Redis instance.
It took me a long time to build this, so I created a detailed basic public repository to help someone like myself and for future reference.

Live notification/chat in django

I am making a website with django now and I want to implement a live notification feature like the one on facebook or SE.
I did some research and it seems although there's two options: ajax long polling and websockets, the latter is the way to go.
However, as you know the go to plugin for websocket 'socket.io' turns out to be a node.js plugin and the django port only seems to support python 2 and the project seems pretty much dead. I am using python 2.7 as my project interpreter but I want to future proof myself so that if I upgrade to python3 later, I don't find myself not being able to use this functionality.
So my question is this:
Is there a straight forward and future ready way to implement websocket which will be used to send live notifications and chats in django env?
Django itself is build in blocking manner, i.e. with synchronous approach. So, you cannot open persistent websocket with django app, as it will block entire django thread.
If you want to enable notification/chat within django project environment, i would recommend to use centrifuge. It is written in python, but async (non-blocking) framework is used: tornado.
But, you don't need to even know how it works, as it provides simple REST api to communicate with it.
Simplified workflow, check docs for more details:
Start centrifuge at same server, as your django project (or on another but with low latency between them)
Your front-end will open websocket with centrifuge, not with django project.
When you need to send notification, send it to centrifuge from django via REST api, and centrifuge will deliver it to needed clients!
I've already tried it and it works!
Django doesn't provide what you're looking for out of the box. You'll have to use a third party library. One that works across frameworks is Pusher.
I think you must go for Firebase it gives you awesome synchronization and any how you are going to use chat on frontend so its does not have to do anything with django environment so you can update you backend asynchron in callback with firbase. Also firebase with AngularJS provides you really really awesome three way binding.

Creating and using SOAP based web service in Laravel framework

In Laravel 4 framework, how to create a SOAP based web service. I would like to build a SOA based web application in laravel. Please clarify with an example how to use web service with some step by step examples or links as i am completely new to laravel
Thanks in advance..
You can use "php-wsdl-creator" (also supports SOAP). They have a great tutorial and many demo php files to get you started. It can also easily be implemented in laravel or any other framework for that matter. :)
You can find more information on Google Code: https://code.google.com/p/php-wsdl-creator/
Also note that SOAP requires an extension to be loaded in PHP.
For more recent needs, you should use a Project such as wsdl2phpgenerator or PackageGenerator from WsdlToPhp. This sort of projects, requirable with composer, use an OOP approach and allows to build a SOAP request easily with PHP objects then handle the response just as the request with PHP objects.

ImportError in Django Rest Framework with Google App Engine

I have develop a simple app to learn Django rest framework and then uploaded it into Google app engine. But each time I try to access my data it shows me "no module name rest_framework". it works ok if I dont use Google App engine and stop working if I use (both local install or deploy the codes). I am using django 1.4 and using Cloud SQL. Can anyone please tell me what might be the problem?
regards
Samin
screenshot:
A bit late but might help someone else, I was also trying to get a solution for this error then I came across this link which has all the thirdparty apps, google app engine support. It doesn't have rest_framework.
So a as a solution you will have to copy the third-party library's pure-Python source code into your application's source code.
here is a solution in detail.
Hope that helps!